From: bananeweizen Date: Sun, 22 Jan 2006 20:14:14 +0000 (+0000) Subject: avoid NullPointerException in debug X-Git-Url: http://git.phpeclipse.com?hp=531786704ecb306ec642d6de4569e3d7ba108df1 avoid NullPointerException in debug --- diff --git a/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/model/PHPThread.java b/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/model/PHPThread.java index c6508e8..49a432e 100644 --- a/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/model/PHPThread.java +++ b/net.sourceforge.phpeclipse.debug.core/src/net/sourceforge/phpdt/internal/debug/core/model/PHPThread.java @@ -121,7 +121,7 @@ public class PHPThread extends PHPDebugElement implements IThread { } public IBreakpoint[] getBreakpoints() { - return null; + return new IBreakpoint[0]; } public String getModelIdentifier() { @@ -164,7 +164,7 @@ public class PHPThread extends PHPDebugElement implements IThread { state.setSuspended (false); // We will leave the suspended state this.frames = null; // Reset the stackframes - ev = new DebugEvent (this, DebugEvent.RESUME, de); // Create an event resume by stepping + ev = new DebugEvent (this, DebugEvent.RESUME, de); // Create an event resume by stepping DebugPlugin.getDefault ().fireDebugEventSet (new DebugEvent[] { ev }); // Fire the event } @@ -210,7 +210,7 @@ public class PHPThread extends PHPDebugElement implements IThread { */ public boolean canStepInto () { return isSuspended () && // Is the thread in suspended mode (stopped) - isStepping () && // and ??? + isStepping () && // and ??? this.hasStackFrames (); // and does this thread have stack frames? } @@ -219,7 +219,7 @@ public class PHPThread extends PHPDebugElement implements IThread { */ public boolean canStepOver () { return isSuspended () && // Is the thread in suspended mode (stopped) - isStepping () && // and ??? + isStepping () && // and ??? this.hasStackFrames (); // and does this thread have stack frames? } @@ -228,7 +228,7 @@ public class PHPThread extends PHPDebugElement implements IThread { */ public boolean canStepReturn () { return isSuspended () && // Is the thread in suspended mode (stopped) - isStepping () && // and ??? + isStepping () && // and ??? this.hasStackFrames (); // and does this thread have stack frames? }