mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java-inspections] IDEA-289267 Change highlight to unused code on RedundantArrayForVarargsCall and RedundantLambdaParameterType
Also, new tests GitOrigin-RevId: 5dbb45fc400ba8de0a360e05a4eaf0aee07e0e83
This commit is contained in:
committed by
intellij-monorepo-bot
parent
1cae1fd6b5
commit
c2b459a91e
+14
@@ -0,0 +1,14 @@
|
||||
// "Remove explicit array creation" "true"
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
|
||||
public class RedundantArrayForVarargsCall {
|
||||
{
|
||||
try {
|
||||
String.class.getConstructor(String.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Remove explicit array creation" "true"
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
|
||||
public class RedundantArrayForVarargsCall {
|
||||
public List<Date> severalValues() {
|
||||
return Arrays.asList(new Date(), new Date());
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
// "Remove explicit array creation" "true"
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
|
||||
public class RedundantArrayForVarargsCall {
|
||||
{
|
||||
try {
|
||||
String.class.getConstructor(new Class<caret>[]{String.class});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Remove explicit array creation" "true"
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
|
||||
public class RedundantArrayForVarargsCall {
|
||||
public List<Date> severalValues() {
|
||||
return Arrays.asList(new <caret>Date[] {new Date(), new Date()});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user