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 243011 - Converting valid lambda to anon inner class generates invalid code that cannot compile due to syntax errors.
Summary: Converting valid lambda to anon inner class generates invalid code that canno...
Status: RESOLVED DUPLICATE of bug 254165
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-18 16:02 UTC by xarax
Modified: 2015-09-25 13:02 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
First version with for loop (914 bytes, text/plain)
2014-03-18 16:08 UTC, xarax
Details
For loop converted to stream with lambda (969 bytes, text/x-java)
2014-03-18 16:08 UTC, xarax
Details
Lambda converted to anonymous inner class with bad syntax (1.12 KB, text/x-java)
2014-03-18 16:08 UTC, xarax
Details

Note You need to log in before you can comment on or make changes to this bug.
Description xarax 2014-03-18 16:02:09 UTC
Product Version = NetBeans IDE 8.0 RC1 (Build 201402242200)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.8.0
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.0-b70
Comment 1 xarax 2014-03-18 16:08:06 UTC
I attached the sample source showing the original for loop, converted to stream with a lambda, then the lambda converted incorrectly to anonymous inner class.
Comment 2 xarax 2014-03-18 16:08:09 UTC
Created attachment 146108 [details]
First version with for loop
Comment 3 xarax 2014-03-18 16:08:11 UTC
Created attachment 146109 [details]
For loop converted to stream with lambda
Comment 4 xarax 2014-03-18 16:08:12 UTC
Created attachment 146110 [details]
Lambda converted to anonymous inner class with bad syntax
Comment 5 Svata Dedic 2015-09-25 13:02:12 UTC
seems fixed as part of issue #254165

*** This bug has been marked as a duplicate of bug 254165 ***