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 204285 - [71cat] ClassCastException: com.sun.tools.javac.code.Symbol$ClassSymbol cannot be cast to javax.lang.model.element.PackageElement
Summary: [71cat] ClassCastException: com.sun.tools.javac.code.Symbol$ClassSymbol canno...
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.1
Hardware: All All
: P3 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-26 15:13 UTC by javydreamercsw
Modified: 2011-10-27 07:59 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 182335


Attachments
stacktrace (3.79 KB, text/plain)
2011-10-26 15:13 UTC, javydreamercsw
Details
stacktrace (3.79 KB, text/plain)
2011-10-26 15:26 UTC, dbell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description javydreamercsw 2011-10-26 15:13:02 UTC
Build: NetBeans IDE Dev (Build 201110250600)
VM: Java HotSpot(TM) Client VM, 21.1-b02, Java(TM) SE Runtime Environment, 1.7.0_01-b08
OS: Windows 7

User Comments:
javydreamercsw: Refactoring class with errors from test to source packages




Stacktrace: 
java.lang.ClassCastException: com.sun.tools.javac.code.Symbol$ClassSymbol cannot be cast to javax.lang.model.element.PackageElement
   at org.netbeans.modules.refactoring.java.plugins.MoveTransformer.visitImport(MoveTransformer.java:420)
   at org.netbeans.modules.refactoring.java.plugins.MoveTransformer.visitImport(MoveTransformer.java:68)
   at com.sun.tools.javac.tree.JCTree$JCImport.accept(JCTree.java:519)
   at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:67)
   at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:80)
   at com.sun.source.util.TreeScanner.scan(TreeScanner.java:90)
Comment 1 javydreamercsw 2011-10-26 15:13:05 UTC
Created attachment 112466 [details]
stacktrace
Comment 2 dbell 2011-10-26 15:26:37 UTC
Created attachment 112468 [details]
stacktrace

Moved unit test class between packages
Comment 3 Jan Becicka 2011-10-27 06:54:06 UTC
please take a look at his one
Comment 4 Ralph Ruijs 2011-10-27 07:59:36 UTC
Changeset: 8fb26c2f57c9
Author:    Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Date:      2011-10-27 09:57
Message:   
Issue #204285 - [71cat] ClassCastException: com.sun.tools.javac.code.Symbol$ClassSymbol cannot be cast to javax.lang.model.element.PackageElement