mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-24 13:21:22 +08:00
Merge remote-tracking branch 'origin/GP-2469_dev747368_PR-4420_GameCubeGBA_fix_bad_equals'
This commit is contained in:
+3
-4
@@ -57,9 +57,7 @@ public abstract class AbstractFridaCommand<T> implements FridaCommand<T> {
|
||||
@Override
|
||||
public boolean handle(FridaEvent<?> evt, FridaPendingCommand<?> pending) {
|
||||
if (evt instanceof FridaCommandDoneEvent) {
|
||||
if (pending.getCommand().equals(((FridaCommandDoneEvent) evt).getCmd())) {
|
||||
return true;
|
||||
}
|
||||
return pending.getCommand().equals(((FridaCommandDoneEvent) evt).getCmd());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -117,8 +115,9 @@ public abstract class AbstractFridaCommand<T> implements FridaCommand<T> {
|
||||
} else {
|
||||
manager.getEventListeners().fire.consoleOutput(object+"\n", 0);
|
||||
}
|
||||
if (res.equals("[]")) {
|
||||
if ("[]".equals(res.toString())) {
|
||||
Msg.error(this, "nothing returned for "+this);
|
||||
return;
|
||||
}
|
||||
if (res instanceof JsonArray) {
|
||||
JsonArray arr = (JsonArray) res;
|
||||
|
||||
+1
-1
@@ -283,7 +283,7 @@ public class FileArchive implements Archive {
|
||||
return;
|
||||
}
|
||||
|
||||
if (saveAsFile.equals(getFile())) {
|
||||
if (saveAsFile.equals(archiveFile.getFile(false))) {
|
||||
save();
|
||||
}
|
||||
else {
|
||||
|
||||
+5
-5
@@ -195,7 +195,7 @@ public abstract class DragNDropTree extends JTree implements Draggable, Droppabl
|
||||
}
|
||||
|
||||
// This is tree node transferable...
|
||||
if (draggedNodes.equals(root)) {
|
||||
if (draggedNodes.length > 0 && draggedNodes[0].equals(root)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -208,8 +208,8 @@ public abstract class DragNDropTree extends JTree implements Draggable, Droppabl
|
||||
return false;
|
||||
}
|
||||
|
||||
for (int i = 0; i < draggedNodes.length; i++) {
|
||||
if (targetNode.equals(draggedNodes[i])) {
|
||||
for (ProgramNode draggedNode : draggedNodes) {
|
||||
if (targetNode.equals(draggedNode)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -221,8 +221,8 @@ public abstract class DragNDropTree extends JTree implements Draggable, Droppabl
|
||||
return false;
|
||||
}
|
||||
|
||||
for (int i = 0; i < draggedNodes.length; i++) {
|
||||
if (targetNode.isNodeAncestor(draggedNodes[i])) {
|
||||
for (ProgramNode draggedNode : draggedNodes) {
|
||||
if (targetNode.isNodeAncestor(draggedNode)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -160,11 +160,11 @@ class EditExternalReferencePanel extends EditReferencePanel {
|
||||
extLibName.clearModel();
|
||||
extLibName.addItem(Library.UNKNOWN);
|
||||
Arrays.sort(names);
|
||||
for (int i = 0; i < names.length; i++) {
|
||||
if (Library.UNKNOWN.equals(extLibName)) {
|
||||
for (String name : names) {
|
||||
if (Library.UNKNOWN.equals(name)) {
|
||||
continue;
|
||||
}
|
||||
extLibName.addItem(names[i]);
|
||||
extLibName.addItem(name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -178,7 +178,7 @@ public class ProgramSelection implements AddressSetView {
|
||||
*/
|
||||
@Override
|
||||
public boolean intersects(AddressSetView addrSet) {
|
||||
return addressSet != null ? addressSet.intersects(addrSet) : false;
|
||||
return addressSet != null && addressSet.intersects(addrSet);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user