mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
do not warn about visibility of interface methods: they are public
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user