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 253359

Summary: wrap line before dot in lambda
Product: java Reporter: homberghp
Component: EditorAssignee: Dusan Balek <dbalek>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.1   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description homberghp 2015-07-08 12:55:18 UTC
It would be nice if you could chose where the line break takes place when
wrapping a lambda.
My personal preference is breaking before the dot in a fluent expression, so that 
a continued line start with that dot.

This is what I currently get (8.0.2, Linux) when wrapping

long sum = getLines().
                stream().
                mapToLong( InvoiceLine::getConsumerPrice ).
                sum();


This is what I would like
long sum = getLines()
                .stream()
                .mapToLong( InvoiceLine::getConsumerPrice )
                .sum();
Comment 1 homberghp 2015-07-08 12:58:48 UTC
Probably the description should read "wrap before chained method calls"