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

Summary: Converting valid lambda to anon inner class generates invalid code that cannot compile due to syntax errors.
Product: java Reporter: xarax
Component: HintsAssignee: Svata Dedic <sdedic>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P3    
Version: 8.0   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:
Attachments: First version with for loop
For loop converted to stream with lambda
Lambda converted to anonymous inner class with bad syntax

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 ***