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 210190 - ClassCastException: com.sun.tools.javac.code.Symbol$ClassSymbol cannot be cast to javax.lang.model.element.ExecutableElement
Summary: ClassCastException: com.sun.tools.javac.code.Symbol$ClassSymbol cannot be cas...
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-27 13:05 UTC by aldobrucale
Modified: 2012-03-27 14:15 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 186339


Attachments
stacktrace (5.00 KB, text/plain)
2012-03-27 13:05 UTC, aldobrucale
Details

Note You need to log in before you can comment on or make changes to this bug.
Description aldobrucale 2012-03-27 13:05:15 UTC
Build: NetBeans IDE Dev (Build 201203260401)
VM: Java HotSpot(TM) Client VM, 22.1-b02, Java(TM) SE Runtime Environment, 1.7.0_03-b04
OS: Linux

User Comments:
aldobrucale: Tried to add parameter for an undeclared variable i.e.

public void method() {
    unknown.doSomething();
}

select "unknown" and invoke "introduce parameter"




Stacktrace: 
java.lang.ClassCastException: com.sun.tools.javac.code.Symbol$ClassSymbol cannot be cast to javax.lang.model.element.ExecutableElement
   at org.netbeans.modules.refactoring.java.ui.ChangeParametersUI.create(ChangeParametersUI.java:119)
   at org.netbeans.modules.refactoring.java.ui.ContextAnalyzer$1.createRefactoringUI(ContextAnalyzer.java:99)
   at org.netbeans.modules.refactoring.java.ui.ContextAnalyzer$TextComponentTask.run(ContextAnalyzer.java:355)
   at org.netbeans.modules.refactoring.java.ui.ContextAnalyzer$TextComponentTask.run(ContextAnalyzer.java:278)
   at org.netbeans.api.java.source.JavaSource$MultiTask.run(JavaSource.java:482)
   at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:583)
Comment 1 aldobrucale 2012-03-27 13:05:19 UTC
Created attachment 117330 [details]
stacktrace
Comment 2 Ralph Ruijs 2012-03-27 14:15:12 UTC
Changeset: 526a79f147d7
Author:    Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Date:      2012-03-27 16:12
Message:   
Issue #210190 - ClassCastException: com.sun.tools.javac.code.Symbol$ClassSymbol cannot be cast to javax.lang.model.element.ExecutableElement