Merge remote-tracking branch 'origin/master' into develar/is
[idea/community.git] / plugins / InspectionGadgets / testsrc / com / intellij / codeInspection / visibility / AccessCanBeTightenedInspectionTest.java
index fb2310c7e6bd6d5282516abf4549ec1f434a2b83..4cd6626c2a5423969165a372c52d265541b31771 100644 (file)
@@ -128,6 +128,18 @@ public class AccessCanBeTightenedInspectionTest extends LightInspectionTestCase
            "}");
   }
 
+  public void testDoNotSuggestPrivateForInnerStaticSubclass() {
+    doTest("class A {\n" +
+           "    <warning descr=\"Access can be package-private\">protected</warning> String myElement;\n" +
+           "    static class B extends A {\n" +
+           "        @Override\n" +
+           "        public String toString() {\n" +
+           "            return myElement;\n" +
+           "        }\n" +
+           "    }\n" +
+           "}");
+  }
+
   public void testStupidTwoPublicClassesInTheSamePackage() {
     myFixture.allowTreeAccessForAllFiles();
     myFixture.addFileToProject("x/Sub.java",