mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-10 13:17:09 +07:00
StreamToLoop: do not trim trailing whitespace for block lambdas
Fixes trailing line comment handling
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
// "Fix all 'Stream API call chain can be replaced with loop' problems in file" "true"
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
|
||||
class X {
|
||||
|
||||
void x(File[] files) {
|
||||
for (File s: files) {
|
||||
File dest = new File(s.getAbsolutePath());
|
||||
System.out.println("unable to rename " + s + " to " + dest); //comment
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
// "Fix all 'Stream API call chain can be replaced with loop' problems in file" "true"
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
|
||||
class X {
|
||||
|
||||
void x(File[] files) {
|
||||
Arrays.stream(files).forEachOrdered(s -> {
|
||||
File dest = new File(s.getAbsolutePath());<caret>
|
||||
System.out.println("unable to rename " + s + " to " + dest); //comment
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user