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 45341 - IllegalStateException: cannot map class member to source hierarchy
Summary: IllegalStateException: cannot map class member to source hierarchy
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Martin Matula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-22 11:08 UTC by Marek Grummich
Modified: 2007-09-26 09:14 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Exception (4.56 KB, text/plain)
2004-06-22 11:08 UTC, Marek Grummich
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Grummich 2004-06-22 11:08:25 UTC
Build 200406211800, j2sdk1.4.2
Sorry, I don't know exact steps, but an attached
exception happened after some refactoring action
(rename, move)
<snip>
Annotation: member: class abc.B
Annotation: name: abc.B
Annotation: class
org.netbeans.jmi.javamodel.JavaClass$Impl
java.lang.IllegalStateException: cannot map class
member to source hierarchy
element
        at
org.netbeans.modules.java.ui.nodes.BridgeUtils.throwIllegalState(BridgeUtils.jav
a:164)
        at
org.netbeans.modules.java.ui.nodes.BridgeUtils.chooseElement(BridgeUtils.java:15
3)
        at
org.netbeans.modules.java.ui.nodes.BridgeUtils.getElement(BridgeUtils.java:98)
        at
org.netbeans.modules.java.ui.nodes.BridgeElement2Source.createClassNode(BridgeEl
ement2Source.java:54)
        at
o
</snip>
Comment 1 Marek Grummich 2004-06-22 11:08:50 UTC
Created attachment 15908 [details]
Exception
Comment 2 Martin Matula 2004-06-22 11:15:08 UTC
Honzo, any idea what's going on?
Comment 3 Jan Pokorsky 2004-06-22 13:08:32 UTC
It means exactly what it says. It is impossible to find a
java/srcmodel element corresponding to JavaClass element (class abc.B)
when SourceChildren creates the class node.
Comment 4 Martin Matula 2004-06-22 13:41:21 UTC
The problem was probably introduced by adding parameterized types.
Classes may be wrapped by the ParameterizedType and the equals method
no longer works (one needs to unwrap the wrapped objects before they
are compared using ParameterizedType.getDefinition()). I am not sure
if this is the real cause, but likely it is.
Comment 5 Jan Pokorsky 2004-06-22 13:51:00 UTC
Then it should be simply reproducible, shouldn't it?
Comment 6 Martin Matula 2004-08-23 14:13:52 UTC
I have never been able to reproduce this. Seems that it is fixed.
Comment 7 Marek Grummich 2004-10-07 11:30:02 UTC
Verified - 200410070525 - can not reproduce
Comment 8 Quality Engineering 2007-09-20 09:56:53 UTC
Reorganization of java component