introduce field: extract error expression on class level ( IDEA-41570 )

This commit is contained in:
anna
2010-06-01 18:30:49 +04:00
parent 33fdaf1154
commit 941142b346
18 changed files with 140 additions and 14 deletions

View File

@@ -0,0 +1,3 @@
class Test {
public final int anInt = 2 + 2;
}

View File

@@ -0,0 +1,7 @@
class Test {
public final Class aClass = Class.forName(Test.class.getName);
void foo() {
Class clazz = aClass;
}
}

View File

@@ -0,0 +1,5 @@
class Test {
public final int anInt = Integer.parseInt("");
void foo() {int i = anInt;}
}

View File

@@ -0,0 +1,4 @@
class Test {
public final int anInt = Integer.parseInt("");
int i = anInt;
}

View File

@@ -0,0 +1,7 @@
class Test {
public final Integer integer = new Integer(0);
void foo() {
Integer i = integer;
}
}

View File

@@ -0,0 +1,3 @@
class Test {
public final int anInt = Integer.parseInt("");
}

View File

@@ -0,0 +1,3 @@
class Test {
2 <caret> + 2
}

View File

@@ -0,0 +1,7 @@
class Test {
<selection>Class.forName(Test.class.getName)</selection>
void foo() {
Class clazz = Class.forName(Test.class.getName);
}
}

View File

@@ -0,0 +1,4 @@
class Test {
Integer.pa<caret>rseInt("")
void foo() {int i = Integer.parseInt("");}
}

View File

@@ -0,0 +1,4 @@
class Test {
int i = Integer.parseInt("");
Integer.pa<caret>rseInt("")
}

View File

@@ -0,0 +1,7 @@
class Test {
<selection>new Integer(0)</selection>
void foo() {
Integer i = new Integer(0);
}
}

View File

@@ -0,0 +1,3 @@
class Test {
Integer.pa<caret>rseInt("")
}