mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
java: use interface where possible: don't change class signature (IDEA-258910)
GitOrigin-RevId: 51c5c167d189e98a2c76aca78dec0459a30296f9
This commit is contained in:
committed by
intellij-monorepo-bot
parent
bc552fd34c
commit
60203fa2a1
+1
-1
@@ -269,7 +269,7 @@ public abstract class TurnRefsToSuperProcessorBase extends BaseRefactoringProces
|
||||
if (classReference.getParent() instanceof PsiReferenceList) {
|
||||
final PsiReferenceList referenceList = ((PsiReferenceList)ppparent.getParent());
|
||||
final PsiClass parentClass = PsiTreeUtil.getParentOfType(ref, PsiClass.class);
|
||||
if (parentClass != null) {
|
||||
if (parentClass != null && !parentClass.equals(myClass)) {
|
||||
if (referenceList.equals(parentClass.getExtendsList()) || referenceList.equals(parentClass.getImplementsList())) {
|
||||
final PsiTypeElement[] typeParameterElements = refParameterList.getTypeParameterElements();
|
||||
for (int i = 0; i < typeParameterElements.length; i++) {
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
interface SuperBar<T> { }
|
||||
interface Bar extends SuperBar<Bar> {}
|
||||
@@ -0,0 +1,2 @@
|
||||
interface SuperBar<T> { }
|
||||
interface Bar extends SuperBar<Bar> {}
|
||||
@@ -55,6 +55,7 @@ public class TurnRefsToSuperTest extends LightMultiFileTestCase {
|
||||
public void testTryWithResources1() { doTest("Test.MyResourceImpl", "Test.MyResource", false); }
|
||||
public void testTryWithResources2() { doTest("Test.MyResourceImpl", "Test.MyResource", false); }
|
||||
public void testDifferentNumberOfParams() { doTest("Bar", "SuperBar", false); }
|
||||
public void testSelfReference() { doTest("Bar", "SuperBar", false); }
|
||||
|
||||
//todo[ann] fix and uncomment
|
||||
//public void testStaticCallArguments() throws Exception { doTest("Impl", "Int", false); }
|
||||
|
||||
Reference in New Issue
Block a user