highlighting of overriding methods: reorder warnings (IDEA-199315)

This commit is contained in:
Anna.Kozlova
2019-01-07 19:07:43 +01:00
parent 3a6c465931
commit 361f188984
2 changed files with 3 additions and 3 deletions

View File

@@ -923,12 +923,12 @@ public class HighlightVisitorImpl extends JavaElementVisitor implements Highligh
try {
List<HierarchicalMethodSignature> superMethodSignatures = method.getHierarchicalMethodSignature().getSuperSignatures();
if (!superMethodSignatures.isEmpty()) {
if (!myHolder.hasErrorResults()) myHolder.add(HighlightMethodUtil.checkMethodIncompatibleReturnType(methodSignature, superMethodSignatures, true));
if (aClass != null && !myHolder.hasErrorResults()) myHolder.add(HighlightMethodUtil.checkMethodIncompatibleThrows(methodSignature, superMethodSignatures, true, aClass));
if (!method.hasModifierProperty(PsiModifier.STATIC)) {
if (!myHolder.hasErrorResults()) myHolder.add(HighlightMethodUtil.checkMethodWeakerPrivileges(methodSignature, superMethodSignatures, true, myFile));
if (!myHolder.hasErrorResults()) myHolder.add(HighlightMethodUtil.checkMethodOverridesFinal(methodSignature, superMethodSignatures));
}
if (!myHolder.hasErrorResults()) myHolder.add(HighlightMethodUtil.checkMethodIncompatibleReturnType(methodSignature, superMethodSignatures, true));
if (aClass != null && !myHolder.hasErrorResults()) myHolder.add(HighlightMethodUtil.checkMethodIncompatibleThrows(methodSignature, superMethodSignatures, true, aClass));
}
}
catch (IndexNotReadyException ignored) { }

View File

@@ -1,6 +1,6 @@
interface ConflictWithObject {
<error descr="'notify()' cannot override 'notify()' in 'java.lang.Object'; overridden method is final">public void notify()</error>;
<error descr="'notify()' cannot override 'notify()' in 'java.lang.Object'; overridden method is final">public Object notify()</error>;
}
//--override final-------------------------------------------------------------------------