mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
LVTI: var -> explicit type (IDEA-179177)
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
// "Replace 'var' with explicit type" "true"
|
||||
class Main {
|
||||
|
||||
{
|
||||
String b = java.util.Arrays.asList("", "").get(0);
|
||||
final int i = b.compareTo("");
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
// "Replace 'var' with explicit type" "true"
|
||||
class Main {
|
||||
|
||||
{
|
||||
List<Serializable> b = java.util.Arrays.asList("", 2);
|
||||
final Object o = b.get(0);
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Replace 'var' with explicit type" "true"
|
||||
class Main {
|
||||
|
||||
{
|
||||
int b = 0;
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Replace 'var' with explicit type" "true"
|
||||
class Main {
|
||||
|
||||
void m(java.util.List<? extends String> args){
|
||||
String s = args.get(0);
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Replace 'var' with explicit type" "true"
|
||||
class Main {
|
||||
|
||||
{
|
||||
<caret>var b = java.util.Arrays.asList("", "").get(0);
|
||||
final int i = b.compareTo("");
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Replace 'var' with explicit type" "false"
|
||||
class Main {
|
||||
|
||||
{
|
||||
<caret>var b = java.util.Arrays.asList("", 2);
|
||||
final int i = b.get(0).compareTo("");
|
||||
java.io.Serializable s = b.get(0);
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Replace 'var' with explicit type" "false"
|
||||
class Main {
|
||||
|
||||
{
|
||||
<caret>var b = java.util.Arrays.asList("", 2);
|
||||
final Object o = b.get(0);
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Replace 'var' with explicit type" "true"
|
||||
class Main {
|
||||
|
||||
{
|
||||
<caret>var b = 0;
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Replace 'var' with explicit type" "false"
|
||||
class Main {
|
||||
|
||||
{
|
||||
<caret>var b = java.util.Arrays.asList("", 2).get(0);
|
||||
final int i = b.compareTo("");
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Replace 'var' with explicit type" "true"
|
||||
class Main {
|
||||
|
||||
void m(java.util.List<? extends String> args){
|
||||
<caret>var s = args.get(0);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user