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 267994

Summary: ClassCastException: com.sun.tools.javac.code.Symbol$VarSymbol cannot be cast to javax.lang.model.element.ExecutableElement
Product: debugger Reporter: Martin Entlicher <mentlicher>
Component: JavaAssignee: Martin Entlicher <mentlicher>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 8.2   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 226206
Attachments: stacktrace

Description Martin Entlicher 2016-09-13 12:16:07 UTC
Build: NetBeans IDE Dev (Build 20160901-eae9874831be)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.102-b14, Java(TM) SE Runtime Environment, 1.8.0_102-b14
OS: Linux

User Comments:
mentlicher: Evaluating this piece of code:
ToLongFunction<String> l = (s -> Long.parseLong(s));
return l;




Stacktrace: 
java.lang.ClassCastException: com.sun.tools.javac.code.Symbol$VarSymbol cannot be cast to javax.lang.model.element.ExecutableElement
   at org.netbeans.modules.debugger.jpda.projects.ScanLocalVars.visitReturn(ScanLocalVars.java:157)
   at org.netbeans.modules.debugger.jpda.projects.ScanLocalVars.visitReturn(ScanLocalVars.java:73)
   at com.sun.tools.javac.tree.JCTree$JCReturn.accept(JCTree.java:1524)
   at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:72)
   at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:91)
   at com.sun.source.util.TreeScanner.scan(TreeScanner.java:106)
Comment 1 Martin Entlicher 2016-09-13 12:16:09 UTC
Created attachment 162026 [details]
stacktrace
Comment 2 Martin Entlicher 2016-09-13 16:47:04 UTC
Fixed together with issue #267941 by changeset:   300697:67f31e5c2c2a
http://hg.netbeans.org/core-main/rev/67f31e5c2c2a
Comment 3 Quality Engineering 2016-09-15 02:04:43 UTC
Integrated into 'main-silver', will be available in build *201609150002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/67f31e5c2c2a
User: mentlicher@netbeans.org
Log: #267941, #267994: Make lambda evaluations more robust.
Comment 4 Martin Entlicher 2016-12-06 06:45:12 UTC
By porting the fix of issue #267941 into release82 branch, this one got fixed in 8.2 as well.