visibility inspection: do not suggest private for constants used in class modifier lists and for inner classes used in extends/implements (IDEA-81161)

This commit is contained in:
anna
2012-02-10 16:49:45 +01:00
parent b902b14fc4
commit cb907f4128
4 changed files with 59 additions and 0 deletions
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems>
<problem>
<file>ThisClass.java</file>
<line>5</line>
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Declaration access can be weaker</problem_class>
<hints>
<hint value="packageLocal" />
</hints>
<description>Can be package local</description>
</problem>
<problem>
<file>ThisClass.java</file>
<line>4</line>
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Declaration access can be weaker</problem_class>
<hints>
<hint value="packageLocal" />
</hints>
<description>Can be package local</description>
</problem>
</problems>
@@ -0,0 +1,9 @@
import java.util.ArrayList;
@SuppressWarnings(ThisClass.PUBLICFINALNAME)
public class ThisClass extends ArrayList<ThisClass.FF> {
public static final String PUBLICFINALNAME = "stuff";
public static class FF {}
public static void main(String[] args) {
}
}