mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
ReplaceCollectionStreamFix: handle comments
GitOrigin-RevId: 739c49a0f24a980ce19574b70cfe35c88c657026
This commit is contained in:
committed by
intellij-monorepo-bot
parent
a3a485a202
commit
b04be5706b
+11
@@ -0,0 +1,11 @@
|
||||
// "Replace with findFirst()" "true"
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public class Main {
|
||||
public static String find() {
|
||||
//comment
|
||||
return Stream.of("foo", "bar", "baz").filter(s -> s.contains("z")).findFirst().orElse("");
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// "Replace with findFirst()" "true"
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
public class Main {
|
||||
public static String find() {
|
||||
for(String s : Arrays.//comment
|
||||
<caret>asList("foo", "bar", "baz")) {
|
||||
if (s.contains("z")) return s;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user