GP-0: Fixing unnecessary semicolon warnings

This commit is contained in:
Ryan Kurtz 2025-05-30 06:46:11 -04:00
parent 5fe25f1cfd
commit 2e0c098c25
21 changed files with 43 additions and 72 deletions

View file

@ -540,7 +540,7 @@ public interface LogicalBreakpoint {
Mode mode = this.mode.sameAddress(that.mode); Mode mode = this.mode.sameAddress(that.mode);
Consistency consistency = this.consistency.sameAddress(that.consistency); Consistency consistency = this.consistency.sameAddress(that.consistency);
return fromFields(mode, consistency); return fromFields(mode, consistency);
}; }
/** /**
* For logical breakpoints which appear at the same address, compose their state * For logical breakpoints which appear at the same address, compose their state

View file

@ -498,7 +498,7 @@ public class DebuggerEmulationServicePlugin extends Plugin implements DebuggerEm
/*TraceMemoryRegion region = current.getTrace() /*TraceMemoryRegion region = current.getTrace()
.getMemoryManager() .getMemoryManager()
.getRegionContaining(current.getSnap(), traceLoc.getAddress()); .getRegionContaining(current.getSnap(), traceLoc.getAddress());
return region != null && region.isExecute()*/; return region != null && region.isExecute();*/
return true; return true;
} }

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -75,7 +75,7 @@ public abstract class AbstractBaseDBTraceDefinedUnitsView<T extends AbstractDBTr
ensureInCachedRange(key.snap, key.addr); ensureInCachedRange(key.snap, key.addr);
return getFirstInRangeCacheContaining(key); return getFirstInRangeCacheContaining(key);
} }
}; }
/** /**
* Cache for optimizing {@link AbstractBaseDBTraceDefinedUnitsView#getFloor(long, Address)} and * Cache for optimizing {@link AbstractBaseDBTraceDefinedUnitsView#getFloor(long, Address)} and

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -52,7 +52,7 @@ public abstract class AbstractDBTraceAddressSnapRangePropertyMapOcclusionIterabl
return new PeekableIterator<>() { return new PeekableIterator<>() {
protected Address address = within.getX1(); protected Address address = within.getX1();
protected boolean soughtNext = false; protected boolean soughtNext = false;
protected Entry<TraceAddressSnapRange, T> next = null;; protected Entry<TraceAddressSnapRange, T> next = null;
private void checkSeekNext() { private void checkSeekNext() {
if (soughtNext) { if (soughtNext) {

View file

@ -680,7 +680,7 @@ public class DBTraceProgramView implements TraceProgramView {
protected final DomainObjectEventQueues eventQueues; protected final DomainObjectEventQueues eventQueues;
protected EventTranslator eventTranslator; protected EventTranslator eventTranslator;
private volatile boolean allAddressesValid; private volatile boolean allAddressesValid;
private volatile AddressSetView allAddresses;; private volatile AddressSetView allAddresses;
protected final DBTraceProgramViewBookmarkManager bookmarkManager; protected final DBTraceProgramViewBookmarkManager bookmarkManager;
protected final DBTraceProgramViewEquateTable equateTable; protected final DBTraceProgramViewEquateTable equateTable;

View file

@ -117,7 +117,7 @@ public interface PathFilter {
<T> ListIterator<T> iterator(T[] arr) { <T> ListIterator<T> iterator(T[] arr) {
return iterator(Arrays.asList(arr)); return iterator(Arrays.asList(arr));
}; }
} }
static boolean keyMatches(String pat, String key) { static boolean keyMatches(String pat, String key) {

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -24,4 +24,4 @@ import ghidra.program.model.address.Address;
* @param numAgreements number of agreeing trees * @param numAgreements number of agreeing trees
*/ */
public record SimilarStartRowObject(Address funcStart, int numAgreements) { public record SimilarStartRowObject(Address funcStart, int numAgreements) {
}; }

View file

@ -634,7 +634,6 @@ public class VarnodeContext implements ProcessorContext {
stateLayer = null; stateLayer = null;
layer--; layer--;
} }
;
if (stateLayer == null) { if (stateLayer == null) {
return null; return null;

View file

@ -62,7 +62,7 @@ public class ClosedPatternTableModel extends ThreadedTableModelStub<ClosedPatter
Component component = super.getTableCellRendererComponent(data); Component component = super.getTableCellRendererComponent(data);
component.setFont(Gui.getFont(FONT_ID)); component.setFont(Gui.getFont(FONT_ID));
return component; return component;
}; }
@Override @Override
public String getFilterString(String t, Settings settings) { public String getFilterString(String t, Settings settings) {

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -47,7 +47,7 @@ public class ImageSections_Oreo extends ArtImageSections {
kSectionClassTable, kSectionClassTable,
kSectionImageBitmap, kSectionImageBitmap,
kSectionCount, // Number of elements in enum. kSectionCount, // Number of elements in enum.
}; }
public ImageSections_Oreo(BinaryReader reader, ArtHeader header) { public ImageSections_Oreo(BinaryReader reader, ArtHeader header) {
super(reader, header); super(reader, header);

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -20,12 +20,8 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import ghidra.app.util.bin.BinaryReader; import ghidra.app.util.bin.BinaryReader;
import ghidra.file.formats.android.fbpk.FBPK; import ghidra.file.formats.android.fbpk.*;
import ghidra.file.formats.android.fbpk.FBPK_Constants; import ghidra.program.model.data.*;
import ghidra.file.formats.android.fbpk.FBPK_Partition;
import ghidra.program.model.data.DataType;
import ghidra.program.model.data.Structure;
import ghidra.program.model.data.StructureDataType;
import ghidra.util.exception.DuplicateNameException; import ghidra.util.exception.DuplicateNameException;
public class FBPKv2 implements FBPK { public class FBPKv2 implements FBPK {
@ -98,7 +94,7 @@ public class FBPKv2 implements FBPK {
public String getString2() { public String getString2() {
return string2; return string2;
}; }
@Override @Override
public DataType toDataType() throws DuplicateNameException, IOException { public DataType toDataType() throws DuplicateNameException, IOException {

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -30,7 +30,7 @@ public interface OatBundle {
public enum HeaderType { public enum HeaderType {
ART, CDEX, DEX, VDEX, ART, CDEX, DEX, VDEX,
}; }
public static final String APK = ".apk"; public static final String APK = ".apk";
public static final String ART = ".art"; public static final String ART = ".art";

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -364,7 +364,7 @@ public abstract class AbstractEmuUnixSyscallUseropLibrary<T>
types("int", "void *", "size_t")); types("int", "void *", "size_t"));
/** "Extern" declaration of {@code unix_write} */ /** "Extern" declaration of {@code unix_write} */
final UseropDecl unix_write = userop(type("size_t"), "unix_write", final UseropDecl unix_write = userop(type("size_t"), "unix_write",
types("int", "void *", "size_t"));; types("int", "void *", "size_t"));
/** /**
* Inline the gather or scatter pattern for an iovec syscall * Inline the gather or scatter pattern for an iovec syscall

View file

@ -15,8 +15,7 @@
*/ */
package ghidra.pcode.struct.sub; package ghidra.pcode.struct.sub;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.*;
import static org.junit.Assert.assertTrue;
import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodHandles.Lookup; import java.lang.invoke.MethodHandles.Lookup;
@ -82,7 +81,7 @@ public class StructuredSleighTest extends AbstractGhidraHeadlessIntegrationTest
@Test @Test
public void testUseRegister() throws Exception { public void testUseRegister() throws Exception {
StructuredSleigh ss = new TestStructuredSleigh() { StructuredSleigh ss = new TestStructuredSleigh() {
final Var vR0 = reg(r0, type("int"));; final Var vR0 = reg(r0, type("int"));
@StructuredUserop(type = "int") @StructuredUserop(type = "int")
public void my_userop() { public void my_userop() {

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -15,16 +15,7 @@
*/ */
package ghidra.feature.vt.gui.util; package ghidra.feature.vt.gui.util;
import ghidra.feature.vt.gui.util.VTMatchApplyChoices.CallingConventionChoices; import ghidra.feature.vt.gui.util.VTMatchApplyChoices.*;
import ghidra.feature.vt.gui.util.VTMatchApplyChoices.CommentChoices;
import ghidra.feature.vt.gui.util.VTMatchApplyChoices.FunctionNameChoices;
import ghidra.feature.vt.gui.util.VTMatchApplyChoices.FunctionSignatureChoices;
import ghidra.feature.vt.gui.util.VTMatchApplyChoices.HighestSourcePriorityChoices;
import ghidra.feature.vt.gui.util.VTMatchApplyChoices.LabelChoices;
import ghidra.feature.vt.gui.util.VTMatchApplyChoices.ParameterDataTypeChoices;
import ghidra.feature.vt.gui.util.VTMatchApplyChoices.ReplaceChoices;
import ghidra.feature.vt.gui.util.VTMatchApplyChoices.ReplaceDataChoices;
import ghidra.feature.vt.gui.util.VTMatchApplyChoices.SourcePriorityChoices;
import ghidra.framework.options.Options; import ghidra.framework.options.Options;
public class VTOptionDefines { public class VTOptionDefines {
@ -200,7 +191,7 @@ public class VTOptionDefines {
"Duplicate Function Correlator Minimum Function Length"; "Duplicate Function Correlator Minimum Function Length";
public static final String DUPE_FUNCTION_CORRELATOR_MIN_LEN_OPTION = public static final String DUPE_FUNCTION_CORRELATOR_MIN_LEN_OPTION =
AUTO_VT_OPTIONS_NAME + "." + AUTO_VT_DUPLICATE_FUNCTION_CORRELATOR + AUTO_VT_OPTIONS_NAME + "." + AUTO_VT_DUPLICATE_FUNCTION_CORRELATOR +
"." + DUPE_FUNCTION_CORRELATOR_MIN_LEN_OPTION_TEXT;; "." + DUPE_FUNCTION_CORRELATOR_MIN_LEN_OPTION_TEXT;
public static final String REF_CORRELATOR_MIN_SCORE_OPTION_TEXT = public static final String REF_CORRELATOR_MIN_SCORE_OPTION_TEXT =
"Reference Correlators Minimum Score"; "Reference Correlators Minimum Score";

View file

@ -72,7 +72,6 @@ public interface PcodeMachine<T> {
private AccessKind(boolean trapsRead, boolean trapsWrite) { private AccessKind(boolean trapsRead, boolean trapsWrite) {
this.trapsRead = trapsRead; this.trapsRead = trapsRead;
this.trapsWrite = trapsWrite; this.trapsWrite = trapsWrite;
;
} }
/** /**

View file

@ -77,7 +77,7 @@ public class DecoderForOneStride {
private final AddrCtx start; private final AddrCtx start;
final List<Instruction> instructions = new ArrayList<>(); final List<Instruction> instructions = new ArrayList<>();
final List<PcodeOp> opsForStride = new ArrayList<>();; final List<PcodeOp> opsForStride = new ArrayList<>();
/** /**
* Construct a stride decoder * Construct a stride decoder

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -31,7 +31,7 @@ public class PathKey {
} }
public PathKey(String path) { public PathKey(String path) {
Objects.requireNonNull(path, "Path cannot be null");; Objects.requireNonNull(path, "Path cannot be null");
this.path = path.replace('\\', '/'); this.path = path.replace('\\', '/');
} }

View file

@ -91,7 +91,7 @@ public class ArmBranchReturnDetectionTest extends AbstractGhidraHeadedIntegratio
builder.disassemble("0x00015d9c", 27, true); builder.disassemble("0x00015d9c", 27, true);
builder.createFunction("0x00015d9c"); builder.createFunction("0x00015d9c");
builder.createLabel("0x00015d9c", "func1");; builder.createLabel("0x00015d9c", "func1");
program = builder.getProgram(); program = builder.getProgram();

View file

@ -655,7 +655,6 @@ public class JavaMethodsTest extends AbstractJavaTraceRmiTest {
txPut(conn, "Frames"); txPut(conn, "Frames");
waitForValuesPass("VMs[].Threads[main].Stack[0]._display", waitForValuesPass("VMs[].Threads[main].Stack[0]._display",
pcs -> assertContainsString("checkAccess", pcs.get(0).getValue().toString())); pcs -> assertContainsString("checkAccess", pcs.get(0).getValue().toString()));
;
} }
} }
} }

View file

@ -16,22 +16,10 @@
package ghidra.doclets.typestubs; package ghidra.doclets.typestubs;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.util.Arrays; import java.util.*;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import javax.lang.model.element.Element; import javax.lang.model.element.*;
import javax.lang.model.element.Modifier; import javax.lang.model.type.*;
import javax.lang.model.element.Name;
import javax.lang.model.element.PackageElement;
import javax.lang.model.element.QualifiedNameable;
import javax.lang.model.element.TypeElement;
import javax.lang.model.type.ArrayType;
import javax.lang.model.type.DeclaredType;
import javax.lang.model.type.TypeMirror;
import javax.lang.model.type.WildcardType;
/** /**
* Base class providing access to sanitized names (Python safe). * Base class providing access to sanitized names (Python safe).
@ -313,7 +301,7 @@ abstract class PythonTypeStubElement<T extends Element> {
static void addNeededTypes(Set<TypeElement> imports, TypeMirror type) { static void addNeededTypes(Set<TypeElement> imports, TypeMirror type) {
switch (type.getKind()) { switch (type.getKind()) {
case DECLARED: case DECLARED:
DeclaredType dt = (DeclaredType) type;; DeclaredType dt = (DeclaredType) type;
imports.add((TypeElement) dt.asElement()); imports.add((TypeElement) dt.asElement());
for (TypeMirror genericType : dt.getTypeArguments()) { for (TypeMirror genericType : dt.getTypeArguments()) {
addNeededTypes(imports, genericType); addNeededTypes(imports, genericType);