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 160002 - NullPointerException at org.netbeans.modules.java.editor.imports.JavaFixAllImports$ImportVisitor.<init>
Summary: NullPointerException at org.netbeans.modules.java.editor.imports.JavaFixAllIm...
Status: RESOLVED DUPLICATE of bug 160602
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Max Sauer
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-10 14:10 UTC by kahatlen
Modified: 2009-04-10 10:01 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 147150


Attachments
stacktrace (3.54 KB, text/plain)
2009-03-10 14:10 UTC, kahatlen
Details
stacktrace (4.46 KB, text/plain)
2009-03-10 21:41 UTC, Jesse Glick
Details
stacktrace (4.46 KB, text/plain)
2009-03-17 06:47 UTC, Exceptions Reporter
Details
stacktrace (4.38 KB, text/plain)
2009-03-17 20:56 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kahatlen 2009-03-10 14:10:44 UTC
Build: NetBeans IDE Dev (Build 200903040201)
VM: Java HotSpot(TM) Client VM, 11.2-b01, Java(TM) SE Runtime Environment, 1.6.0_12-b04
OS: SunOS, 5.11, x86

User Comments:
GUEST: New Java ME Project.. then deleted an already inserted import statement.. then invoked auto fix imports.

kahatlen: Pressed Ctrl-Shift-I to fix imports.



Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.java.editor.imports.JavaFixAllImports$ImportVisitor.<init>(JavaFixAllImports.java:285)
        at org.netbeans.modules.java.editor.imports.JavaFixAllImports$ImportVisitor.<init>(JavaFixAllImports.java:278)
        at org.netbeans.modules.java.editor.imports.JavaFixAllImports.getImportsFromSamePackage(JavaFixAllImports.java:273)
        at org.netbeans.modules.java.editor.imports.JavaFixAllImports.access$100(JavaFixAllImports.java:84)
        at org.netbeans.modules.java.editor.imports.JavaFixAllImports$1.run(JavaFixAllImports.java:224)
        at org.netbeans.modules.java.editor.imports.JavaFixAllImports$1.run(JavaFixAllImports.java:99)
Comment 1 kahatlen 2009-03-10 14:10:53 UTC
Created attachment 77978 [details]
stacktrace
Comment 2 Jesse Glick 2009-03-10 21:41:40 UTC
Build: NetBeans IDE Dev (Build 090310)
VM: Java HotSpot(TM) Client VM, 11.0-b16, Java(TM) SE Runtime Environment, 1.6.0_11-b03
OS: Linux, 2.6.27-11-generic, i386

User Comments: 


Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.java.editor.imports.JavaFixAllImports$ImportVisitor.<init>(JavaFixAllImports.java:324)
        at org.netbeans.modules.java.editor.imports.JavaFixAllImports$ImportVisitor.<init>(JavaFixAllImports.java:317)
        at org.netbeans.modules.java.editor.imports.JavaFixAllImports.getImportsFromSamePackage(JavaFixAllImports.java:312)
        at org.netbeans.modules.java.editor.imports.JavaFixAllImports.access$100(JavaFixAllImports.java:89)
        at org.netbeans.modules.java.editor.imports.JavaFixAllImports$1.run(JavaFixAllImports.java:229)
        at org.netbeans.modules.java.editor.imports.JavaFixAllImports$1.run(JavaFixAllImports.java:104)
Comment 3 Jesse Glick 2009-03-10 21:41:44 UTC
Created attachment 78014 [details]
stacktrace
Comment 4 Exceptions Reporter 2009-03-17 06:47:01 UTC
Build: NetBeans IDE Dev (Build 200903111543)
VM: Java HotSpot(TM) Client VM, 11.2-b01, Java(TM) SE Runtime Environment, 1.6.0_12-b04
OS: Windows Vista, 6.1, x86

User Comments: 


Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.java.editor.imports.JavaFixAllImports$ImportVisitor.<init>(JavaFixAllImports.java:324)
        at org.netbeans.modules.java.editor.imports.JavaFixAllImports$ImportVisitor.<init>(JavaFixAllImports.java:317)
        at org.netbeans.modules.java.editor.imports.JavaFixAllImports.getImportsFromSamePackage(JavaFixAllImports.java:312)
        at org.netbeans.modules.java.editor.imports.JavaFixAllImports.access$100(JavaFixAllImports.java:89)
        at org.netbeans.modules.java.editor.imports.JavaFixAllImports$1.run(JavaFixAllImports.java:229)
        at org.netbeans.modules.java.editor.imports.JavaFixAllImports$1.run(JavaFixAllImports.java:104)
Comment 5 Exceptions Reporter 2009-03-17 06:47:05 UTC
Created attachment 78279 [details]
stacktrace
Comment 6 Jesse Glick 2009-03-17 20:56:12 UTC
Build: NetBeans IDE Dev (Build 090312)
VM: Java HotSpot(TM) Client VM, 1.5.0_15-b04, Java(TM) 2 Runtime Environment, Standard Edition, 1.5.0_15-b04
OS: Linux, 2.6.27-11-generic, i386

User Comments: 
Added 'Assert.fail("...");' to a new unit test in a new j2seproject and did Fix Imports.

Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.java.editor.imports.JavaFixAllImports$ImportVisitor.<init>(JavaFixAllImports.java:324)
        at org.netbeans.modules.java.editor.imports.JavaFixAllImports$ImportVisitor.<init>(JavaFixAllImports.java:317)
        at org.netbeans.modules.java.editor.imports.JavaFixAllImports.getImportsFromSamePackage(JavaFixAllImports.java:312)
        at org.netbeans.modules.java.editor.imports.JavaFixAllImports.access$100(JavaFixAllImports.java:89)
        at org.netbeans.modules.java.editor.imports.JavaFixAllImports$1.run(JavaFixAllImports.java:229)
        at org.netbeans.modules.java.editor.imports.JavaFixAllImports$1.run(JavaFixAllImports.java:104)
Comment 7 Jesse Glick 2009-03-17 20:56:20 UTC
Created attachment 78327 [details]
stacktrace
Comment 8 Exceptions Reporter 2009-04-09 15:45:26 UTC
This issue has already 20 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=147150
Comment 9 Max Sauer 2009-04-10 10:01:33 UTC
This looks like a duplicate of already fixed #

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