mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-10 13:17:09 +07:00
ReplaceInefficientStreamCountInspection: remove generic parameter list if any
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
// "Replace Collection.stream().count() with Collection.size()" "true"
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class Main {
|
||||
public static long test() {
|
||||
List<String> s = new ArrayList<>();
|
||||
/* unused parameter */
|
||||
return (long) s.size();
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// "Replace Collection.stream().count() with Collection.size()" "true"
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class Main {
|
||||
public static long test() {
|
||||
List<String> s = new ArrayList<>();
|
||||
return s.</* unused parameter */String>stream().co<caret>unt();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user