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 271366 - ClassCastException: com.sun.tools.javac.tree.JCTree$JCLambda cannot be cast to com.sun.tools.javac.tree.JCTree$JCMethodInvocation
Summary: ClassCastException: com.sun.tools.javac.tree.JCTree$JCLambda cannot be cast t...
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Compiler (show other bugs)
Version: Dev
Hardware: All All
: P2 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-24 17:38 UTC by alied
Modified: 2018-03-29 19:47 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 222969


Attachments
stacktrace (3.18 KB, text/plain)
2017-08-24 17:38 UTC, alied
Details
stacktrace (3.15 KB, text/plain)
2017-08-24 17:53 UTC, alied
Details
stacktrace (3.45 KB, text/plain)
2017-09-27 15:41 UTC, Exceptions Reporter
Details
stacktrace (8.71 KB, text/plain)
2017-09-29 17:29 UTC, Exceptions Reporter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description alied 2017-08-24 17:38:21 UTC
Build: NetBeans IDE Dev (Build 201708240001)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.141-b15, Java(TM) SE Runtime Environment, 1.8.0_141-b15
OS: Linux

User Comments:
JTD: Pasted the following line of code into a source file:

            retVal = WarningDialog.showConfirmDialog(stage, "Are you sure you want to accept this signature?", WarningDialog.SigConfirm);

lhochet: pasting some code

alied: invoked code completion with a stream.




Stacktrace: 
java.lang.ClassCastException: com.sun.tools.javac.tree.JCTree$JCLambda cannot be cast to com.sun.tools.javac.tree.JCTree$JCMethodInvocation
   at com.sun.tools.javac.comp.ArgumentAttr$ResolvedMethodType.dup(ArgumentAttr.java:588)
   at com.sun.tools.javac.comp.ArgumentAttr.processArg(ArgumentAttr.java:236)
   at com.sun.tools.javac.comp.ArgumentAttr.visitLambda(ArgumentAttr.java:289)
   at com.sun.tools.javac.tree.JCTree$JCLambda.accept(JCTree.java:1807)
   at com.sun.tools.javac.comp.ArgumentAttr.attribArg(ArgumentAttr.java:193)
   at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:656)
Comment 1 alied 2017-08-24 17:38:24 UTC
Created attachment 165004 [details]
stacktrace
Comment 2 alied 2017-08-24 17:53:05 UTC
Created attachment 165005 [details]
stacktrace

the error occurred just after I wrote
aCollection.stream()
I selected stream() from the code completion.
Comment 3 Dusan Balek 2017-08-25 12:49:54 UTC
Hard to fix without a reproducible test case. If the issue is reproducible, could you please create a simple test case and attach it to the issue? Thanks.
Comment 4 alied 2017-08-26 03:05:35 UTC
I'm not sure about the pattern. As soon as I'm able to reproduce it reliably I'll attach a sample case.
Comment 5 Exceptions Reporter 2017-09-27 15:38:37 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=222969
Comment 6 Exceptions Reporter 2017-09-27 15:41:39 UTC
Created attachment 165191 [details]
stacktrace

Editing String constant
Comment 7 Exceptions Reporter 2017-09-29 17:29:38 UTC
Created attachment 165209 [details]
stacktrace

Don't know.
Comment 8 Exceptions Reporter 2017-12-31 07:27:39 UTC
This bug already has 20 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=222969