Java: minor reference graph cleanup

GitOrigin-RevId: 195619e151da5e91e497f7a016f902333fcfa54e
This commit is contained in:
Bas Leijdekkers
2023-07-01 10:01:55 +00:00
committed by intellij-monorepo-bot
parent e39fc292c3
commit 53ae7a29a9
@@ -459,8 +459,9 @@ public final class RefJavaManagerImpl extends RefJavaManager {
PsiModifierListOwner javaModifiersListOwner = ObjectUtils.tryCast(node.getJavaPsi(), PsiModifierListOwner.class);
if (javaModifiersListOwner != null) {
PsiAnnotation externalAnnotation = myExternalAnnotationsManager.findExternalAnnotation(javaModifiersListOwner,
BatchSuppressManager.SUPPRESS_INSPECTIONS_ANNOTATION_NAME);
PsiAnnotation externalAnnotation =
myExternalAnnotationsManager.findExternalAnnotation(javaModifiersListOwner,
BatchSuppressManager.SUPPRESS_INSPECTIONS_ANNOTATION_NAME);
UAnnotation uAnnotation = UastContextKt.toUElement(externalAnnotation, UAnnotation.class);
if (uAnnotation != null) {
retrieveSuppressions(uAnnotation, node);
@@ -471,6 +472,7 @@ public final class RefJavaManagerImpl extends RefJavaManager {
@Override
public boolean visitExpression(@NotNull UExpression node) {
// for lambda expressions and method references
RefElement refElement = myRefManager.getReference(node.getSourcePsi());
if (refElement != null) {
myRefManager.buildReferences(refElement);
@@ -544,7 +546,7 @@ public final class RefJavaManagerImpl extends RefJavaManager {
}
}
if (buf.length() > 0) {
if (!buf.isEmpty()) {
String suppressId = buf.substring(1);
element.addSuppression(suppressId);