From ea2e67e3e6ea774b414881e6510aa2591e8f979c Mon Sep 17 00:00:00 2001 From: anna Date: Mon, 23 May 2011 14:30:06 +0400 Subject: [PATCH] EA-27916 - SOE: RefMethodImpl.updateReturnValueTemplate --- .../intellij/codeInspection/reference/RefMethodImpl.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/java/java-impl/src/com/intellij/codeInspection/reference/RefMethodImpl.java b/java/java-impl/src/com/intellij/codeInspection/reference/RefMethodImpl.java index 1ab4f888c691..f5aa2c90b0a7 100644 --- a/java/java-impl/src/com/intellij/codeInspection/reference/RefMethodImpl.java +++ b/java/java-impl/src/com/intellij/codeInspection/reference/RefMethodImpl.java @@ -179,6 +179,9 @@ public class RefMethodImpl extends RefJavaElementImpl implements RefMethod { @NotNull public Collection getSuperMethods() { if (mySuperMethods == null) return EMPTY_METHOD_LIST; + if (mySuperMethods.size() > 10) { + LOG.info("method: " + getName() + " owner:" + getOwnerClass().getQualifiedName()); + } return mySuperMethods; } @@ -216,7 +219,7 @@ public class RefMethodImpl extends RefJavaElementImpl implements RefMethod { } public void addSuperMethod(RefMethodImpl refSuperMethod) { - if (!getSuperMethods().contains(refSuperMethod)) { + if (!getSuperMethods().contains(refSuperMethod) && !refSuperMethod.getSuperMethods().contains(this)) { if (mySuperMethods == null){ mySuperMethods = new ArrayList(1); } @@ -225,7 +228,7 @@ public class RefMethodImpl extends RefJavaElementImpl implements RefMethod { } public void markExtended(RefMethodImpl method) { - if (!getDerivedMethods().contains(method)) { + if (!getDerivedMethods().contains(method) && !method.getDerivedMethods().contains(this)) { if (myDerivedMethods == null) { myDerivedMethods = new ArrayList(1); }