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.
Build: NetBeans IDE Dev (Build web-main-10182-on-20130327) VM: Java HotSpot(TM) 64-Bit Server VM, 23.7-b01, Java(TM) SE Runtime Environment, 1.7.0_15-b03 OS: Mac OS X User Comments: pjiricka: I was doing something very unrelated, namely creating new PHP project. But previously I was playing with JPA features and had an SQL file open in the editor - though at the time this exception occurred, that editor window was already closed. GUEST: Try to excute statement Stacktrace: java.lang.NullPointerException at org.netbeans.modules.db.sql.loader.SQLCloneableEditor$SQLExecutionImpl$3.run(SQLCloneableEditor.java:773) at org.netbeans.modules.db.sql.loader.SQLCloneableEditor$SQLExecutionImpl$3.run(SQLCloneableEditor.java:769) at org.openide.util.Mutex.doEventAccess(Mutex.java:1363) at org.openide.util.Mutex.readAccess(Mutex.java:273) at org.netbeans.modules.db.sql.loader.SQLCloneableEditor$SQLExecutionImpl.isSelection(SQLCloneableEditor.java:769) at org.netbeans.modules.db.sql.editor.ui.actions.RunSQLSelectionAction.getDisplayName(RunSQLSelectionAction.java:80)
Created attachment 133124 [details] stacktrace
Based on this: http://hg.netbeans.org/web-main/file/deb0dadc091e/db.core/src/org/netbeans/modules/db/sql/loader/SQLCloneableEditor.java I would move the code in line 773 down and put this in between: if(editorPane == null) { return false; } ==> No EditorPane, no selection, although without an editor pane also no current statement, but then for just displaying the action name this is IMHO the right way ...
(In reply to comment #2) > I would move the code in line 773 down and put this in between: > > if(editorPane == null) { > return false; > } > > ==> No EditorPane, no selection, although without an editor pane also no > current statement, but then for just displaying the action name this is IMHO > the right way ... http://hg.netbeans.org/core-main/rev/a684976d8ae2 It's reasonable. Thank you, Matthias.