This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 93862

Summary: NPE from GoToOppositeAction.checkDirection()
Product: java Reporter: _ rkubacki <rkubacki>
Component: JUnitAssignee: Marian Petras <mpetras>
Status: RESOLVED DUPLICATE    
Severity: blocker Keywords: SIMPLEFIX
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description _ rkubacki 2007-02-01 21:19:25 UTC
todays dev build, I had no opened editors and all remaining TC (projects, files,
runtimes) slided when I opened a project and get NPE:

java.lang.NullPointerException
	at
org.netbeans.modules.junit.GoToOppositeAction.checkDirection(GoToOppositeAction.java:366)
	at
org.netbeans.modules.junit.GoToOppositeAction.isEnabled(GoToOppositeAction.java:334)
	at org.openide.awt.Actions$MenuBridge.updateState(Actions.java:820)
Comment 1 Marian Petras 2007-02-12 11:27:07 UTC
Accepted.
Comment 2 Marian Petras 2007-02-12 11:30:28 UTC
Fixed in the trunk.

The exception was thrown if no TopComponent was activated. I added a check for this.

Modified file:
   junit/src/org/netbeans/modules/junit/GoToOppositeAction.java   (1.14)

Diff:
http://junit.netbeans.org/source/browse/junit/src/org/netbeans/modules/junit/GoToOppositeAction.java?r1=1.13&r2=1.14&diff_format=u
Comment 3 Marian Petras 2007-02-12 12:08:05 UTC
Reopened so that it can be marked as a duplicate of another bug.
Comment 4 Marian Petras 2007-02-12 12:10:18 UTC

*** This issue has been marked as a duplicate of 93684 ***