Skip to main content
summaryrefslogtreecommitdiffstats
path: root/dsf
diff options
context:
space:
mode:
authorJesper Eskilson2015-06-24 03:53:55 -0400
committerGerrit Code Review @ Eclipse.org2015-08-10 11:27:25 -0400
commitf07ed550d7fc99b5e771f707e2d653da3f1ef8de (patch)
treef1a45484917895e08c5a3dee2c4f3cf0c9aa0251 /dsf
parent0d7432318e8098bf8c50bcfedfccfb36cbce94fd (diff)
downloadorg.eclipse.cdt-f07ed550d7fc99b5e771f707e2d653da3f1ef8de.tar.gz
org.eclipse.cdt-f07ed550d7fc99b5e771f707e2d653da3f1ef8de.tar.xz
org.eclipse.cdt-f07ed550d7fc99b5e771f707e2d653da3f1ef8de.zip
Fixed a couple of FindBugs errors in DSF examples.
Change-Id: Ibce2e1ec4f128900989c1420488bf2d1d636e6fc Signed-off-by: Jesper Eskilson <jesper.eskilson@iar.com>
Diffstat (limited to 'dsf')
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/pdavm/src/org/eclipse/cdt/examples/pdavm/PDAVirtualMachine.java7
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAExpressions.java3
2 files changed, 10 insertions, 0 deletions
diff --git a/dsf/org.eclipse.cdt.examples.dsf.pda/pdavm/src/org/eclipse/cdt/examples/pdavm/PDAVirtualMachine.java b/dsf/org.eclipse.cdt.examples.dsf.pda/pdavm/src/org/eclipse/cdt/examples/pdavm/PDAVirtualMachine.java
index b3051199b4..9735d7f799 100644
--- a/dsf/org.eclipse.cdt.examples.dsf.pda/pdavm/src/org/eclipse/cdt/examples/pdavm/PDAVirtualMachine.java
+++ b/dsf/org.eclipse.cdt.examples.dsf.pda/pdavm/src/org/eclipse/cdt/examples/pdavm/PDAVirtualMachine.java
@@ -662,6 +662,9 @@ public class PDAVirtualMachine {
try {
if (allThreadsSuspended || fCommandReceiveStream.ready()) {
line = fCommandReceiveStream.readLine();
+ if (line == null)
+ return;
+
processDebugCommand(line);
}
} catch (IOException e) {
@@ -698,6 +701,10 @@ public class PDAVirtualMachine {
System.exit(1);
return;
}
+
+ if (line == null)
+ break;
+
processDebugCommand(line);
}
diff --git a/dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAExpressions.java b/dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAExpressions.java
index 9d0f563a69..378d50a4ce 100644
--- a/dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAExpressions.java
+++ b/dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAExpressions.java
@@ -139,6 +139,9 @@ public class PDAExpressions extends AbstractDsfService implements ICachingServic
@Override
public boolean equals(Object other) {
+ if (other == null)
+ return false;
+
return super.baseEquals(other) &&
fExpression == null
? ((InvalidExpressionDMContext) other).getExpression() == null

Back to the top