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 70931 - NullPointer found at FeatureImpl
Summary: NullPointer found at FeatureImpl
Status: RESOLVED FIXED
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: 2006-01-03 08:41 UTC by vieiro
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
The important part of messages.log (15.21 KB, text/plain)
2006-01-03 08:45 UTC, vieiro
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vieiro 2006-01-03 08:41:44 UTC
Hi,

This is for NetBeans IDE 5.0 Dev 200512182030 (this is a QBuild I think) under
JDK 5.0_05.

I'm using SwingWorkers in my project (from https://swingworker.dev.java.net) so
I include swingworker.jar in the libraries of my project.

I'm creating an anonymous SwingWorker in my JFrame. So I do this:

SwingWorker<String,String> myWorker = new SwingWorker<String,String>()
{
  (*)
};

and then place the cursor at the "(*)" and press "Ctrl+I" to select the methods
to implement. I can see all the methods correctly (doInBackground(), etc.). I do
select the methods, but after selecting them I get the following exception:

java.lang.NullPointerException
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.FeatureImpl.getPosition(FeatureImpl.java:270)
	at org.netbeans.modules.javacore.JMManager.getElementPosition(JMManager.java:725)
	at org.netbeans.modules.javacore.JMManager.getElementPosition(JMManager.java:711)
	at org.netbeans.modules.java.tools.OverrideAction$1.run(OverrideAction.java:159)
	at
org.netbeans.modules.javacore.internalapi.JavaMetamodel.invokeAfterScanFinished(JavaMetamodel.java:209)
	at
org.netbeans.modules.java.tools.OverrideAction.performAction(OverrideAction.java:176)
	at org.openide.util.actions.NodeAction$3.run(NodeAction.java:531)
	at
org.netbeans.modules.openide.util.ActionsBridge.doPerformAction(ActionsBridge.java:47)
	at
org.openide.util.actions.NodeAction$DelegateAction.actionPerformed(NodeAction.java:527)
	at org.openide.windows.TopComponent.processKeyBinding(TopComponent.java:848)
	at javax.swing.JComponent.processKeyBindings(JComponent.java:2809)
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2726)
	at java.awt.Component.processEvent(Component.java:5265)
	at java.awt.Container.processEvent(Container.java:1966)
	at java.awt.Component.dispatchEventImpl(Component.java:3955)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Component.dispatchEvent(Component.java:3803)
	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1810)
	at
java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:672)
	at
java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:920)
	at
java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:798)
	at
java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:636)
	at java.awt.Component.dispatchEventImpl(Component.java:3841)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Window.dispatchEventImpl(Window.java:1774)
	at java.awt.Component.dispatchEvent(Component.java:3803)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

I'll try to attach a part of messages.log for you to see within two minutes.
Comment 1 vieiro 2006-01-03 08:45:49 UTC
Created attachment 28135 [details]
The important part of messages.log
Comment 2 vieiro 2006-01-03 08:49:08 UTC
It seems I can reproduce the error again.

For the SwingWorker the generated code looks like this:

      protected transient void process(Object[]... )
      {
        super.process();
      }

Whereas the generated code should look like this:

      protected void process( String args ... )
      {
      }

Note that the "process" method in a SwingWorker receives a var-arg argument,
whereas the generated code ("Object[]...") does not make sense.

Comment 3 vieiro 2006-01-03 08:51:19 UTC
Note: This exception is raised when I try to "Source/Override Methods...
(Ctrl+I)" on the method with a var-arg argument only. I can override other
methods correctly.
Comment 4 vieiro 2006-01-03 09:10:28 UTC
I mean it should look like this:

    protected void process( String... args )
    {
    }

Comment 5 Jan Becicka 2006-01-06 08:09:28 UTC
It looks like there is a Feature without Resource (Resource is null). It is strange.
Comment 6 Jan Becicka 2006-10-26 16:26:18 UTC
Javacore module was replaced by Retouche infrastructure. This bug is not valid
in trunk any more.
Comment 7 Quality Engineering 2007-09-20 10:56:47 UTC
Reorganization of java component