mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
replace constant duplicates (IDEA-43784)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
public class Model {
|
||||
public static final Runnable FO<caret>O = new Runnable() {
|
||||
public void run() {
|
||||
System.out.println("abc");
|
||||
}
|
||||
};
|
||||
|
||||
public void foo() {
|
||||
new Runnable() {
|
||||
public void run() {
|
||||
System.out.println("abc");
|
||||
}
|
||||
}.run();
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
public class Model {
|
||||
public static final Runnable FOO = new Runnable() {
|
||||
public void run() {
|
||||
System.out.println("abc");
|
||||
}
|
||||
};
|
||||
|
||||
public void foo() {
|
||||
FOO.run();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
class Test {
|
||||
public static final String A<caret>BC = "abc";
|
||||
void foo() {
|
||||
System.out.println("abc");
|
||||
}
|
||||
}
|
||||
|
||||
class Foo {
|
||||
void bar() {
|
||||
System.out.println("abc");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
class Test {
|
||||
public static final String ABC = "abc";
|
||||
void foo() {
|
||||
System.out.println(ABC);
|
||||
}
|
||||
}
|
||||
|
||||
class Foo {
|
||||
void bar() {
|
||||
System.out.println(Test.ABC);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user