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 267279 - ClassCastException: com.sun.tools.javac.code.Symbol$MethodSymbol cannot be cast to com.sun.tools.javac.code.Symbol$ClassSymbol
Summary: ClassCastException: com.sun.tools.javac.code.Symbol$MethodSymbol cannot be ca...
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Compiler (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-24 11:16 UTC by PeteSL
Modified: 2016-07-24 11:19 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 210152


Attachments
stacktrace (3.99 KB, text/plain)
2016-07-24 11:16 UTC, PeteSL
Details

Note You need to log in before you can comment on or make changes to this bug.
Description PeteSL 2016-07-24 11:16:22 UTC
Build: NetBeans IDE 8.1 (Build 201510222201)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.102-b14, Java(TM) SE Runtime Environment, 1.8.0_102-b14
OS: Windows 10

User Comments:
GUEST: ????

GUEST: I've opened NetBeans 8.1 on Linux x86_64 and, when it's finished to load all the projects, NetBeans's sent me notification of this exception.
Then the IDE hasn't found errors in sources code.

GUEST: Trying to extend one class from another

GUEST: Same as before

PeteSL: ciProperties extends java.util.Properties.  I believe the issue was when I changed get and put from public to private to hide them.

GUEST: Syntax errors in some files in the project aren't detected by the IDE




Stacktrace: 
java.lang.ClassCastException: com.sun.tools.javac.code.Symbol$MethodSymbol cannot be cast to com.sun.tools.javac.code.Symbol$ClassSymbol
   at org.netbeans.lib.nbjavac.services.NBMessager.error(NBMessager.java:112)
   at com.sun.tools.javac.comp.Check.checkProfile(Check.java:3313)
   at com.sun.tools.javac.comp.Attr.checkIdInternal(Attr.java:3815)
   at com.sun.tools.javac.comp.Attr.checkMethodIdInternal(Attr.java:3705)
   at com.sun.tools.javac.comp.Attr.checkMethodId(Attr.java:3678)
   at com.sun.tools.javac.comp.Attr.checkId(Attr.java:3666)
Comment 1 PeteSL 2016-07-24 11:16:25 UTC
Created attachment 161404 [details]
stacktrace
Comment 2 PeteSL 2016-07-24 11:19:48 UTC
This did occur when I tried to hide get and put by making them private.  While this is an illegal operation, it should be flagged as an error in the UI, not causing an exception without noting why.