can be final: do not suggest final modifiers for fields which are assigned from class initializer but are qualified (IDEA-76777 )

This commit is contained in:
anna
2011-11-20 19:28:27 +01:00
parent 8e22f97d2c
commit 666ab43848
4 changed files with 29 additions and 1 deletions

View File

@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems/>

View File

@@ -0,0 +1,21 @@
final class Test {
static final Test A = new Test();
private int i = 99;
static {
A.i = 10;
}
}
enum Test1 {
A, B, C;
private int i = 99;
static {
A.i = 10;
B.i = 20;
System.out.println(A.i);
}
}