do not warn about visibility of interface methods: they are public

This commit is contained in:
anna
2012-11-30 21:01:28 +01:00
parent c5139a762a
commit 0a0d3b6906
8 changed files with 41 additions and 2 deletions
@@ -0,0 +1,3 @@
package a;
public interface I {
}
@@ -0,0 +1,4 @@
package a;
public interface I1 extends I {
void foo();
}
@@ -0,0 +1,7 @@
package b;
import a.*;
class B {
void f(I1 i1) {
i1.foo();
}
}
@@ -0,0 +1,4 @@
package a;
public interface I {
void foo();
}
@@ -0,0 +1,2 @@
package a;
public interface I1 extends I {}
@@ -0,0 +1,7 @@
package b;
import a.*;
class B {
void f(I1 i1) {
i1.foo();
}
}
@@ -47,14 +47,18 @@ public class PushDownMultifileTest extends MultiFileTestCase {
}
private void doTest(final boolean fail) throws Exception {
doTest(fail, "a.A", "b.B");
}
private void doTest(final boolean fail, final String sourceClassName, final String targetClassName) throws Exception {
try {
doTest(new PerformAction() {
@Override
public void performAction(final VirtualFile rootDir, final VirtualFile rootAfter) throws Exception {
final PsiClass srcClass = myJavaFacade.findClass("a.A", GlobalSearchScope.allScope(myProject));
final PsiClass srcClass = myJavaFacade.findClass(sourceClassName, GlobalSearchScope.allScope(myProject));
assertTrue("Source class not found", srcClass != null);
final PsiClass targetClass = myJavaFacade.findClass("b.B", GlobalSearchScope.allScope(myProject));
final PsiClass targetClass = myJavaFacade.findClass(targetClassName, GlobalSearchScope.allScope(myProject));
assertTrue("Target class not found", targetClass != null);
final PsiMethod[] methods = srcClass.getMethods();
@@ -98,6 +102,10 @@ public class PushDownMultifileTest extends MultiFileTestCase {
doTest();
}
public void testFromInterface() throws Exception {
doTest(false, "a.I", "a.I1");
}
public void testUsagesInXml() throws Exception {
try {
doTest(new PerformAction() {