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.
It's extremely hard for NetBeans (or any tool) to provide automatic conversion of for loops which results in optimal Streams API code. Sometimes it even results in broken code. So in my opinion, I think this hint should not attempt to provide a solution at all. Moreover, this hint will lead to users blindly converting all of their for-loops, complaining about the verbosity of the result, not realizing they ought to use ".collect(toList())" and the likes, introducing subtle concurrency bugs, ... in short: not learning to use the Streams API correctly. In my opinion, the best NetBeans can do is to link to the relevant javadoc, e.g. http://docs.oracle.com/javase/8/docs/api/java/util/stream/Collectors.html or http://docs.oracle.com/javase/8/docs/api/java/util/stream/package-summary.html For example, consider this snippet: List<String> input = Arrays.asList("1", "2"); List<Integer> output = new ArrayList<>(); for(String i : input) { output.add(i.length()); } NetBeans converts it to: List<String> input = Arrays.asList("1", "2"); List<Integer> output = new ArrayList<>(); input.stream().forEach((i) -> { output.add(i.length()); }); While the optimal solution is: List<String> input = Arrays.asList("1", "2"); List<Integer> output = input.stream().map(String::length).collect(toList()); Moreover, if someone later changes the NetBeans-converted code to use parallelStream() instead of stream(), the code is broken because multiple threads will modify "output" without synchronization.
I agree that it is hard to transform the code right. The user may turn the 'Use functional operations' hint off.