mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
Java inspection: Simplify stream API call chains - error handling added, inspection description improved, tests added (IDEA-140724, IDEA-156324)
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
// "Replace Arrays.asList().stream() with Stream.of()" "true"
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
class AsListIncompleteArgsStream {
|
||||
Stream<String> abc() {
|
||||
return Stream.of("a", , );
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Replace Arrays.asList().stream() with Stream.of()" "true"
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
class AsListIncompleteArgsStream {
|
||||
Stream<String> abc() {
|
||||
return Ar<caret>rays.asList("a", , ).stream();
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Replace Arrays.asList().stream() with Arrays.stream()" "false"
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
class AsListParallelStream {
|
||||
String max(String[] args) {
|
||||
return Arrays.asL<caret>ist(args).parallelStream().max(String::compareTo);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user