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 200971 - java.lang.ClassCastException: org.netbeans.modules.cnd.modelimpl.uid.UIDProviderIml$SelfUID cannot be cast to org.netbeans.modules.cnd.repository.support.SelfPersistent
Summary: java.lang.ClassCastException: org.netbeans.modules.cnd.modelimpl.uid.UIDProvi...
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 7.0.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-15 19:07 UTC by Alexander Simon
Modified: 2011-08-17 08:36 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 Alexander Simon 2011-08-15 19:07:58 UTC
Exception occurs on instance class declaration.
For example see class in hotspot:
src/share/vm/memory/referenceProcessor.cpp
Code:
uint ReferenceProcessor::count_jni_refs() {
  class AlwaysAliveClosure: public BoolObjectClosure {
  public:
    virtual bool do_object_b(oop obj) { return true; }
    virtual void do_object(oop obj) { assert(false, "Don't call"); }
  };
....
}

Exception:
java.lang.ClassCastException: org.netbeans.modules.cnd.modelimpl.uid.UIDProviderIml$SelfUID cannot be cast to org.netbeans.modules.cnd.repository.support.SelfPersistent
	at org.netbeans.modules.cnd.modelimpl.uid.UIDObjectFactory.writeUID(UIDObjectFactory.java:130)
	at org.netbeans.modules.cnd.modelimpl.csm.InheritanceImpl.write(InheritanceImpl.java:203)
	at org.netbeans.modules.cnd.repository.support.AbstractObjectFactory.writeSelfPersistent(AbstractObjectFactory.java:69)
...
Comment 1 Alexander Simon 2011-08-16 18:08:20 UTC
fixed, change set:
http://hg.netbeans.org/cnd-main/rev/8182f14abec3
Comment 2 Alexander Simon 2011-08-17 08:36:42 UTC
better fix:
http://hg.netbeans.org/cnd-main/rev/4842eb8f3acb