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.
In some scenarios the lambda expressions formatting is not ideal, as follow. Original source: import java.util.ArrayList; import java.util.Collection; import java.util.function.BiPredicate; public class NewClass { public static void main(String[] args) { // Working scenario new ArrayList<>().stream() .filter(o -> true) .forEach(o -> System.out.println("")); // Not working scenario merge(new ArrayList<Object>(), (obj, collection) -> collection .stream() .anyMatch(o -> false)); } public static <T> Object merge(final Collection<T> objs, final BiPredicate<T, Collection<Object>> isNew) { return null; } } As we can see at line 12, the 'System.out.println(""));' is correctly indented. But it is not the same at line 17 and 18. My expected behaviour is: // Not working scenario merge(new ArrayList<Object>(), (obj, collection) -> collection .stream() .anyMatch(o -> false)); or even: // Not working scenario merge(new ArrayList<Object>(), (obj, collection) -> collection .stream() .anyMatch(o -> false));
Product Version: NetBeans IDE Dev (Build 20150909-6ff4934e5978) Updates: Updates available Java: 1.8.0_51; Java HotSpot(TM) 64-Bit Server VM 25.51-b03 Runtime: Java(TM) SE Runtime Environment 1.8.0_51-b16 System: Linux version 3.4.63-2.44-desktop running on amd64; UTF-8; en_US (nb)
Created attachment 156163 [details] Sample project I am attaching a project with all the customizations we have in our project due formatting. It may be a issue with some specific property.
Seems that lambda "->" does not increase the base ident