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 204556 - [71cat] ClassCastException: com.sun.tools.javac.code.Symbol$TypeSymbol cannot be cast to javax.lang.model.element.TypeElement
Summary: [71cat] ClassCastException: com.sun.tools.javac.code.Symbol$TypeSymbol cannot...
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.1
Hardware: All All
: P2 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-02 06:34 UTC by dbell
Modified: 2011-11-04 15:03 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 182503


Attachments
stacktrace (1.61 KB, text/plain)
2011-11-02 06:34 UTC, dbell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dbell 2011-11-02 06:34:21 UTC
Build: NetBeans IDE Dev (Build 201110290600)
VM: Java HotSpot(TM) 64-Bit Server VM, 20.1-b02-383, Java(TM) SE Runtime Environment, 1.6.0_26-b03-383-11A511
OS: Mac OS X

User Comments:
dbell: Editing java document. Added text shown in  brackets (simplified version).

Before:

private C getResult(A a, B b) {
    return doSomething(b);
}

private C doSomething(B b) {
...


After:
private C getResult([A a, ]B b) {
    return doSomething(a, b);
}

private C doSomething(B b) {




Stacktrace: 
java.lang.ClassCastException: com.sun.tools.javac.code.Symbol$TypeSymbol cannot be cast to javax.lang.model.element.TypeElement
   at org.netbeans.modules.java.hints.errors.ChangeMethodParameters.isSameType(ChangeMethodParameters.java:297)
   at org.netbeans.modules.java.hints.errors.ChangeMethodParameters.findNextByType(ChangeMethodParameters.java:284)
   at org.netbeans.modules.java.hints.errors.ChangeMethodParameters.analyze(ChangeMethodParameters.java:189)
   at org.netbeans.modules.java.hints.errors.ChangeMethodParameters.run(ChangeMethodParameters.java:94)
   at org.netbeans.modules.java.hints.infrastructure.CreatorBasedLazyFixList.compute(CreatorBasedLazyFixList.java:147)
   at org.netbeans.modules.java.hints.infrastructure.LazyHintComputation.run(LazyHintComputation.java:112)
Comment 1 dbell 2011-11-02 06:34:24 UTC
Created attachment 112706 [details]
stacktrace
Comment 2 Ralph Ruijs 2011-11-03 11:44:36 UTC
Changeset: 3ba08b47bc36
Author:    Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Date:      2011-11-03 12:36
Message:   improved storing of scopes into preferences
Issue #204556 - [71cat] ClassCastException: com.sun.tools.javac.code.Symbol$TypeSymbol cannot be cast to javax.lang.model.element.TypeElement
Comment 3 Quality Engineering 2011-11-04 15:03:32 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/3ba08b47bc36
User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Log: improved storing of scopes into preferences
Issue #204556 - [71cat] ClassCastException: com.sun.tools.javac.code.Symbol$TypeSymbol cannot be cast to javax.lang.model.element.TypeElement