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 210056 - NullPointerException at org.netbeans.modules.java.editor.codegen.RemoveSurroundingCodeAction$Deleter.addStat
Summary: NullPointerException at org.netbeans.modules.java.editor.codegen.RemoveSurrou...
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
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
Exception Reporter: 186254


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