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 103957 - Random NPE on unparseable file on fix imports
Summary: Random NPE on unparseable file on fix imports
Status: RESOLVED DUPLICATE of bug 103540
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-15 05:23 UTC by _ tboudreau
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ tboudreau 2007-05-15 05:23:05 UTC
Just invoked fix imports and this popped up.  File was Utils in
contrib/refactorings, with the following method partially written:

    public static TypeMirror hackFqn (TypeMirror mirror, TreeMaker maker, Trees
trees) {
        VariableElement ve;
        Tree typeTree = maker.Type(mirror);
        
    }

java.lang.NullPointerException
	at
org.netbeans.modules.java.editor.imports.FixDuplicateImportStmts.getSelections(FixDuplicateImportStmts.java:134)
	at
org.netbeans.modules.java.editor.imports.JavaFixAllImports$1.run(JavaFixAllImports.java:150)
	at
org.netbeans.modules.java.editor.imports.JavaFixAllImports$1.run(JavaFixAllImports.java:64)
	at org.netbeans.api.java.source.JavaSource.runModificationTask(JavaSource.java:705)
	at
org.netbeans.modules.java.editor.imports.JavaFixAllImports.fixAllImports(JavaFixAllImports.java:175)
	at
org.netbeans.modules.editor.java.JavaKit$JavaFixImports.actionPerformed(JavaKit.java:633)
	at org.netbeans.editor.BaseAction.actionPerformed(BaseAction.java:263)
	at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1636)
	at javax.swing.JComponent.processKeyBinding(JComponent.java:2844)
	at javax.swing.JComponent.processKeyBindings(JComponent.java:2879)
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2807)
	at java.awt.Component.processEvent(Component.java:5815)
	at java.awt.Container.processEvent(Container.java:2058)
	at java.awt.Component.dispatchEventImpl(Component.java:4410)
	at java.awt.Container.dispatchEventImpl(Container.java:2116)
	at java.awt.Component.dispatchEvent(Component.java:4240)
	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1848)
	at
java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:693)
	at
java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:958)
	at
java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:830)
	at
java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:657)
	at java.awt.Component.dispatchEventImpl(Component.java:4282)
	at java.awt.Container.dispatchEventImpl(Container.java:2116)
	at java.awt.Window.dispatchEventImpl(Window.java:2429)
	at java.awt.Component.dispatchEvent(Component.java:4240)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
	at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Comment 1 Jiri Prox 2007-05-15 08:00:26 UTC
What build do you use? Similar issue 103540 was fixed recently 
Comment 2 Jan Lahoda 2007-05-15 09:01:00 UTC

*** This issue has been marked as a duplicate of 103540 ***
Comment 3 _ tboudreau 2007-05-16 02:38:43 UTC
070510 - exactly the day Standa fixed it.  So I'm guessing my sources were pre-fix.