mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
Java: When generating return statement where the returned type is a primitive array don't suggest Collection.toArray() (IDEA-163341)
This commit is contained in:
+9
@@ -0,0 +1,9 @@
|
||||
// "Add 'return' statement" "true"
|
||||
import java.util.*;
|
||||
class T {
|
||||
String[] f() {
|
||||
List<String> list = Arrays.asList("a", "b");
|
||||
String[] arr = {"c", "d"};
|
||||
return arr;
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Add 'return' statement" "true"
|
||||
import java.util.*;
|
||||
class T {
|
||||
int[] f() {
|
||||
Set<Integer> set = new HashSet<>();
|
||||
set.add(42);
|
||||
return new int[0];
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Add 'return' statement" "true"
|
||||
import java.util.*;
|
||||
class T {
|
||||
String[] f() {
|
||||
List<String> list = Arrays.asList("a", "b");
|
||||
String[] arr = {"c", "d"};
|
||||
<caret>}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Add 'return' statement" "true"
|
||||
import java.util.*;
|
||||
class T {
|
||||
int[] f() {
|
||||
Set<Integer> set = new HashSet<>();
|
||||
set.add(42);
|
||||
<caret>}
|
||||
}
|
||||
Reference in New Issue
Block a user