mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 23:31:05 +07:00
[jvm] Fix empty method inspection on default method
#IDEA-374417 Fixed GitOrigin-RevId: 49be25fd495b89b522fa839e1cda17f09b64468e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
8da68397b4
commit
08b951455a
@@ -294,15 +294,8 @@ public sealed class RefMethodImpl extends RefJavaElementImpl implements RefMetho
|
||||
refUtil.addReferencesTo(method, this, method);
|
||||
checkForSuperCall(method);
|
||||
setOnlyCallsSuper(refUtil.isMethodOnlyCallsSuper(method));
|
||||
|
||||
boolean isBodyEmpty = isOnlyCallsSuper() || !isExternalOverride() && isEmptyExpression(method.getUastBody());
|
||||
setBodyEmpty(isBodyEmpty);
|
||||
if (!isAbstract() && (ownerClass == null || !ownerClass.isInterface())) {
|
||||
setHasBody(method.getUastBody() != null);
|
||||
} else {
|
||||
setHasBody(!isBodyEmpty);
|
||||
}
|
||||
|
||||
setHasBody(method.getUastBody() != null);
|
||||
setBodyEmpty(isOnlyCallsSuper() || !isExternalOverride() && isEmptyExpression(method.getUastBody()));
|
||||
refUtil.addTypeReference(method, method.getReturnType(), getRefManager(), this);
|
||||
}
|
||||
|
||||
@@ -619,7 +612,7 @@ public sealed class RefMethodImpl extends RefJavaElementImpl implements RefMetho
|
||||
setFlag(bodyEmpty, IS_BODY_EMPTY_MASK);
|
||||
}
|
||||
|
||||
public void setHasBody(boolean hasBody) {
|
||||
private void setHasBody(boolean hasBody) {
|
||||
setFlag(hasBody, HAS_BODY_MASK);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user