Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 210056 - NullPointerException at org.netbeans.modules.java.editor.codegen.RemoveSurroundingCodeAction$Deleter.addStat
NullPointerException at org.netbeans.modules.java.editor.codegen.RemoveSurrou...
Status: RESOLVED FIXED
Product: java
Classification: Unclassified
Component: Editor
7.2
All All
: P3 (vote)
: 7.2
Assigned To: Dusan Balek
issues@java
EXCEPTIONS_REPORT
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-25 15:17 UTC by muellermi
Modified: 2012-03-28 13:41 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments
stacktrace (4.82 KB, text/plain)
2012-03-25 15:17 UTC, muellermi
Details
stacktrace (5.08 KB, text/plain)
2012-03-27 09:55 UTC, Jiri Prox
Details

Note You need to log in before you can comment on or make changes to this bug.
Description muellermi 2012-03-25 15:17:24 UTC
Build: NetBeans IDE Dev (Build 201203230400)
VM: Java HotSpot(TM) 64-Bit Server VM, 22.1-b02, Java(TM) SE Runtime Environment, 1.7.0_03-b05
OS: Windows 7

User Comments:
muellermi: invoked "remove surrounding" on if statement




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.java.editor.codegen.RemoveSurroundingCodeAction$Deleter.addStat(RemoveSurroundingCodeAction.java:431)
   at org.netbeans.modules.java.editor.codegen.RemoveSurroundingCodeAction$Deleter.access$500(RemoveSurroundingCodeAction.java:219)
   at org.netbeans.modules.java.editor.codegen.RemoveSurroundingCodeAction$Deleter$1.run(RemoveSurroundingCodeAction.java:284)
   at org.netbeans.modules.java.editor.codegen.RemoveSurroundingCodeAction$Deleter$1.run(RemoveSurroundingCodeAction.java:266)
   at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:665)
   at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:655)
Comment 1 muellermi 2012-03-25 15:17:27 UTC
Created attachment 117211 [details]
stacktrace
Comment 2 Jiri Prox 2012-03-27 09:55:41 UTC
Created attachment 117306 [details]
stacktrace

NPE whne remove surrounding code for single statement (System.out) wrapped in if statement
Comment 3 Dusan Balek 2012-03-28 13:41:03 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/2e8ddec2b10c


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo