suggest to replace with constant reference rather than its value

This commit is contained in:
peter
2013-07-15 16:42:36 +02:00
parent 7c1918b7a0
commit 4774b1e0e2
8 changed files with 49 additions and 38 deletions
@@ -2,7 +2,7 @@ class Test {
public static final String CONST = "foo bar";
private void test() {
String s = CONST;
System.out.println(<caret><warning descr="Value 's' is always 'foo bar'">s</warning>);
System.out.println(<caret><warning descr="Value 's' is always 'CONST'">s</warning>);
}
}
@@ -2,7 +2,7 @@ class Test {
public static final String CONST = "foo bar";
private void test() {
String s = CONST;
System.out.println("foo bar");
System.out.println(CONST);
}
}