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 179981 - java.lang.ClassCastException in inaccuracy tests
Summary: java.lang.ClassCastException in inaccuracy tests
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: PC Linux
: P2 normal (vote)
Assignee: Vladimir Kvashin
URL:
Keywords:
: 193133 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-01-29 01:35 UTC by soldatov
Modified: 2010-12-09 18:17 UTC (History)
1 user (show)

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 soldatov 2010-01-29 01:35:26 UTC
Almost all inaccuracy tests has 'error' status (it is not in e-mail).
Exception:

      org.openide.util.RequestProcessor$SlowItem: task failed due to: java.lang.ClassCastException: org.netbeans.modules.cnd.modelimpl.csm.ConstructorDefinitionImpl cannot be cast to org.netbeans.modules.cnd.api.model.CsmMethod
	at org.openide.util.RequestProcessor.post(RequestProcessor.java:341)
	at org.netbeans.modules.cnd.model.tasks.CsmFileTaskFactory.post(CsmFileTaskFactory.java:334)
	at org.netbeans.modules.cnd.model.tasks.CsmFileTaskFactory.stateChangedImpl(CsmFileTaskFactory.java:242)
	at org.netbeans.modules.cnd.model.tasks.CsmFileTaskFactory.access$300(CsmFileTaskFactory.java:74)
	at org.netbeans.modules.cnd.model.tasks.CsmFileTaskFactory$2.run(CsmFileTaskFactory.java:122)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:641)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1123)
Caused by: java.lang.ClassCastException: org.netbeans.modules.cnd.modelimpl.csm.ConstructorDefinitionImpl cannot be cast to org.netbeans.modules.cnd.api.model.CsmMethod
	at org.netbeans.modules.cnd.navigation.overrides.ComputeAnnotations.computeAnnotation(ComputeAnnotations.java:87)
	at org.netbeans.modules.cnd.navigation.overrides.ComputeAnnotations.computeAnnotations(ComputeAnnotations.java:72)
	at org.netbeans.modules.cnd.navigation.overrides.ComputeAnnotations.computeAnnotations(ComputeAnnotations.java:80)
	at org.netbeans.modules.cnd.navigation.overrides.ComputeAnnotations.computeAnnotations(ComputeAnnotations.java:80)
	at org.netbeans.modules.cnd.navigation.overrides.OverridesTaskFactory$PhaseRunnerImpl.addAnnotations(OverridesTaskFactory.java:155)
	at org.netbeans.modules.cnd.navigation.overrides.OverridesTaskFactory$PhaseRunnerImpl.run(OverridesTaskFactory.java:140)
	at org.netbeans.modules.cnd.model.tasks.CsmFileTaskFactory$5.run(CsmFileTaskFactory.java:452)
	at org.netbeans.modules.cnd.model.tasks.CsmFileTaskFactory$CsmSafeRunnable.run(CsmFileTaskFactory.java:468)
	... 2 more
Comment 1 soldatov 2010-01-29 01:45:06 UTC
Same exception appears on this code (28/01 build from netbeans.org)
class A {
public:
    void b();
};

void A::b() {
}

void foo() {

    A aa;
}

int main() {
    return 0;
}
Comment 2 Vladimir Kvashin 2010-01-29 07:47:03 UTC
fixed:
http://hg.netbeans.org/cnd-main/rev/96b67f983138
Comment 3 Quality Engineering 2010-02-03 21:46:27 UTC
Integrated into 'main-golden', will be available in build *201002040200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/96b67f983138
User: Vladimir Kvashin <vkvashin@netbeans.org>
Log: fix  + test for #179981 ClassCastException
Comment 4 Vladimir Voskresensky 2010-12-09 18:17:41 UTC
*** Bug 193133 has been marked as a duplicate of this bug. ***