1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Fixed a couple of FindBugs errors in DSF examples.

Change-Id: Ibce2e1ec4f128900989c1420488bf2d1d636e6fc
Signed-off-by: Jesper Eskilson <jesper.eskilson@iar.com>
This commit is contained in:
Jesper Eskilson 2015-06-24 09:53:55 +02:00 committed by Gerrit Code Review @ Eclipse.org
parent 0d7432318e
commit f07ed550d7
2 changed files with 10 additions and 0 deletions

View file

@ -662,6 +662,9 @@ public class PDAVirtualMachine {
try { try {
if (allThreadsSuspended || fCommandReceiveStream.ready()) { if (allThreadsSuspended || fCommandReceiveStream.ready()) {
line = fCommandReceiveStream.readLine(); line = fCommandReceiveStream.readLine();
if (line == null)
return;
processDebugCommand(line); processDebugCommand(line);
} }
} catch (IOException e) { } catch (IOException e) {
@ -698,6 +701,10 @@ public class PDAVirtualMachine {
System.exit(1); System.exit(1);
return; return;
} }
if (line == null)
break;
processDebugCommand(line); processDebugCommand(line);
} }

View file

@ -139,6 +139,9 @@ public class PDAExpressions extends AbstractDsfService implements ICachingServic
@Override @Override
public boolean equals(Object other) { public boolean equals(Object other) {
if (other == null)
return false;
return super.baseEquals(other) && return super.baseEquals(other) &&
fExpression == null fExpression == null
? ((InvalidExpressionDMContext) other).getExpression() == null ? ((InvalidExpressionDMContext) other).getExpression() == null