mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 02:59:33 +07:00
initialize in setup: add field initialization instead of variable declaration (IDEA-62451)
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import junit.framework.TestCase;
|
||||
public class T extends TestCase {
|
||||
private String i;
|
||||
|
||||
public void setUp() throws Exception {
|
||||
i = getName();
|
||||
myName = " second " + i;
|
||||
}
|
||||
|
||||
public void test() throws Exception {
|
||||
}
|
||||
|
||||
private String getName() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import junit.framework.TestCase;
|
||||
public class T extends TestCase {
|
||||
public void setUp() throws Exception {
|
||||
String na<caret>me = getName();
|
||||
myName = " second " + name;
|
||||
}
|
||||
|
||||
public void test() throws Exception {
|
||||
}
|
||||
|
||||
private String getName() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user