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 206440 - [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: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.1
Hardware: All All
: P2 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
: 208922 210626 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-12-15 13:31 UTC by stefanocrosta
Modified: 2012-04-06 11:00 UTC (History)
7 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 183808


Attachments
stacktrace (3.79 KB, text/plain)
2011-12-15 13:31 UTC, stefanocrosta
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stefanocrosta 2011-12-15 13:31:34 UTC
This bug was originally marked as duplicate of bug 204285, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE 7.1 RC2 (Build 201111302200)
VM: Java HotSpot(TM) 64-Bit Server VM, 21.0-b17, Java(TM) SE Runtime Environment, 1.7.0-b147
OS: Windows 7

User Comments:
stefanocrosta: refactoring

gilbertoca: refactory->move

aldobrucale: Move class

Lolo_101: Move an interface to another package

dbell: Moved unit test class between 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:421)
   at org.netbeans.modules.refactoring.java.plugins.MoveTransformer.visitImport(MoveTransformer.java:67)
   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 stefanocrosta 2011-12-15 13:31:37 UTC
Created attachment 114226 [details]
stacktrace
Comment 2 Ralph Ruijs 2011-12-21 13:31:18 UTC
Changeset: 2c4fe1d37eec
Author:    Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Date:      2011-12-21 14:25
Message:   
Issue #206440 - [71cat] ClassCastException: com.sun.tools.javac.code.Symbol$ClassSymbol cannot be cast to javax.lang.model.element.PackageElement
Comment 3 Quality Engineering 2011-12-24 15:58:11 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/2c4fe1d37eec
User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Log: Issue #206440 - [71cat] ClassCastException: com.sun.tools.javac.code.Symbol$ClassSymbol cannot be cast to javax.lang.model.element.PackageElement
Comment 4 Ralph Ruijs 2012-02-29 13:50:48 UTC
*** Bug 208922 has been marked as a duplicate of this bug. ***
Comment 5 Ralph Ruijs 2012-04-03 14:50:06 UTC
*** Bug 210626 has been marked as a duplicate of this bug. ***
Comment 6 Marian Mirilovic 2012-04-04 07:14:06 UTC
I agree with nomination for Patch 2, Jirka please verify ... Ralph, please integrate into releases/release71_fixes 
http://wiki.netbeans.org/NetBeansPatchesProcess.
Comment 7 Jiri Prox 2012-04-04 09:12:34 UTC
verified in trunk
Comment 8 Quality Engineering 2012-04-05 01:20:39 UTC
Integrated into 'releases', will be available in build *201204042205* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/f59eec0722cc
User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Log: Issue #206440 - [71cat] ClassCastException: com.sun.tools.javac.code.Symbol$ClassSymbol cannot be cast to javax.lang.model.element.PackageElement
(transplanted from 2c4fe1d37eec06f5b878eef418edd46daf1ec53a)
Comment 9 Jiri Prox 2012-04-06 11:00:11 UTC
verified in 7.1.2