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 83711 - Code completion for overwritting a method yields assertion
Summary: Code completion for overwritting a method yields assertion
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-08-29 16:14 UTC by swachter1
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Log (30.42 KB, text/plain)
2006-08-29 16:15 UTC, swachter1
Details

Note You need to log in before you can comment on or make changes to this bug.
Description swachter1 2006-08-29 16:14:03 UTC
I planned to overwrite the hashCode method and started the code completion.
After selecting the hashCode method the attached assertion happened.
Comment 1 swachter1 2006-08-29 16:15:17 UTC
Created attachment 33365 [details]
Log
Comment 2 swachter1 2006-08-29 16:16:30 UTC
Maybe the reason is that I was working on a static inner class???
Comment 3 Jiri Prox 2006-08-30 08:35:40 UTC
Can you provide exact steps to reproduce? Is it reproducible with fresh userdir?

Reassigning to java/javacore
Comment 4 swachter1 2006-09-15 14:43:06 UTC
It can be reproduced by the following steps:

1. Create a new Java class file.

2. Add an inner class:

public class Test {
  
  /** Creates a new instance of Test */
  public Test() {
  }
  
  public static class Inner {
    <= go here
  }
}

3. Go with the cursor to the identified position and type "public boolean e"
followed by CTRL-SPACE.

4. Choose to overwrite the equals-method

The next thing happening is the following exception:

javax.jmi.reflect.InvalidObjectException: Object with MOFID
CF85D48B-25EA-11DB-B13B-F3716C0DAA77:0000000000003208 no longer exists, class:
org.netbeans.jmi.javamodel.JavaClass$Impl
	at
org.netbeans.mdr.handlers.BaseObjectHandler._getDelegate(BaseObjectHandler.java:365)
	at
org.netbeans.mdr.handlers.InstanceHandler.getInstanceDelegate(InstanceHandler.java:54)
	at
org.netbeans.mdr.handlers.InstanceHandler._immediateComposite(InstanceHandler.java:257)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.MetadataElement._immediateComposite(MetadataElement.java:1864)
	at
org.netbeans.mdr.handlers.InstanceHandler.refImmediateComposite(InstanceHandler.java:249)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.SemiPersistentElement.checkUpToDate(SemiPersistentElement.java:272)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.JavaClassImpl.getContents(JavaClassImpl.java:417)
	at org.netbeans.jmi.javamodel.JavaClass$Impl.getContents(Unknown Source)
	at
org.netbeans.modules.editor.java.GeneratorUtils.overrideMethod(GeneratorUtils.java:162)
	at
org.netbeans.modules.editor.java.ElementCreatingCompletionProvider$OverrideMethodResultItem.create(ElementCreatingCompletionProvider.java:566)
	at
org.netbeans.modules.editor.java.ElementCreatingCompletionProvider$CreateElementResultItem.defaultAction(ElementCreatingCompletionProvider.java:258)
	at
org.netbeans.modules.editor.completion.CompletionImpl.dispatchKeyEvent(CompletionImpl.java:482)
	at
org.netbeans.modules.editor.completion.CompletionImpl.keyPressed(CompletionImpl.java:292)
	at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:191)
	at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:191)
	at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:191)
	at java.awt.Component.processKeyEvent(Component.java:5446)
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2713)
	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)


PS: What do you mean by a fresh userdir?
Comment 5 Jiri Prox 2006-09-15 15:39:18 UTC
Reproducible, thanks for finding this.

PS: Fresh userdir means to start with -userdir xxx switch, where xxx is some
directory. It can show if the problem is caused by corrupted metadata which are
store there. 
Comment 6 Jan Becicka 2006-10-26 16:26:42 UTC
Javacore module was replaced by Retouche infrastructure. This bug is not valid
in trunk any more.
Comment 7 Quality Engineering 2007-09-20 12:09:55 UTC
Reorganization of java component