Skip to content

Adding missing @Override annotations (part 5). Adding RRA/RWA/RUI annotations. Some localization and refactoring - #15

Merged
VISTALL merged 1 commit into
consulo:masterfrom
unv-unv:overrides-5
Jul 29, 2026
Merged

Adding missing @Override annotations (part 5). Adding RRA/RWA/RUI annotations. Some localization and refactoring#15
VISTALL merged 1 commit into
consulo:masterfrom
unv-unv:overrides-5

Conversation

@unv-unv

@unv-unv unv-unv commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@unv-unv

unv-unv commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

@claude review pr with inline comments

@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Claude finished @unv-unv's task in 3m 4s —— View job


PR Review — complete ✅

  • Read the PR diff (51 files, +859/−740)
  • Analyzed changes for correctness & regressions
  • Posted inline suggestions on specific lines
  • Summarized findings

I posted a review with inline suggestions (3 one-click suggestion blocks).

Summary

This is an overwhelmingly mechanical and clean pass — @Override additions, @RequiredReadAction/@RequiredWriteAction annotations, instanceof pattern binding, diamond operator, PairProcessor/ConditionBiPredicate/Predicate, SpringBundleSpringLocalize, and 2→4-space reindentation. I verified the non-trivial refactors and they preserve original behavior:

  • PsiAnnotatedTypePattern.acceptsAnnotationPattern — merged nested if keeps the same fall-through to the qualifiedName check ✔
  • Lambda conversions in ResourceResolverUtils, PsiBeanPointcutExpression, ResolvedConstructorArgsImpl — equivalent ✔
  • hasModifierProperty(PUBLIC/STATIC/FINAL)isPublic()/isStatic()/isFinal() — equivalent convenience methods ✔

Inline suggestions (all minor)

  1. ResourceResolverUtils.java:155 — a for and its nested if were collapsed onto one line during reindentation; split for readability.
  2. SpringManagerImpl.java:185return indented one level too deep (6 spaces vs 4).
  3. QualifierAttribute.java:29 — key comparison migrated to Objects.equals but value still uses Comparing.equal; pick one for consistency.

Worth double-checking (not blocking)

Several sites swap ModuleUtilCore.findModuleForPsiElement(...)/findModuleForFile(...) for xxx.getModule() (SpringManagerImpl.getLocalSpringModel, ResourceResolverUtils.getResourceFileReferenceString, PsiBeanPointcutExpression.acceptsClass). Usually equivalent, but getModule() can resolve differently for library/derived files — a quick run of the existing resolve/highlighting tests would confirm.

No behavioral bugs found. 👍
· branch overrides-5

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review — part 5 (@OverRide / RRA-RWA-RUI / localization / refactoring)

This is an overwhelmingly mechanical and clean pass: @Override additions, @RequiredReadAction/@RequiredWriteAction annotations, instanceof pattern binding, diamond operator, PairProcessor/ConditionBiPredicate/Predicate, SpringBundleSpringLocalize, and 2-space → 4-space reindentation. I checked the non-trivial refactors (the merged condition in PsiAnnotatedTypePattern.acceptsAnnotationPattern, the lambda conversions in ResourceResolverUtils/PsiBeanPointcutExpression/ResolvedConstructorArgsImpl) and they preserve the original behavior. Nice work.

A few small things left inline as one-click suggestions.

One thing worth double-checking (not blocking): several call sites swap ModuleUtilCore.findModuleForPsiElement(...) / findModuleForFile(...) for xxx.getModule() (SpringManagerImpl.getLocalSpringModel, ResourceResolverUtils.getResourceFileReferenceString, PsiBeanPointcutExpression.acceptsClass). These are usually equivalent, but getModule() can resolve differently for elements in library/derived files vs. the ModuleUtilCore lookup — worth a quick confirmation that existing resolve/highlighting tests still pass.

Comment on lines 155 to 158
for (ResolveResult resolveResult : polyVariantRef.multiResolve(false)) {if (resolveResult.getElement() instanceof PsiFileSystemItem fsItem && filter.test(fsItem)) {
result.add((V) fsItem);
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The for and the nested if got collapsed onto one line here — worth splitting for readability (and consistency with the reindentation done everywhere else in this PR).

Suggested change
for (ResolveResult resolveResult : polyVariantRef.multiResolve(false)) {if (resolveResult.getElement() instanceof PsiFileSystemItem fsItem && filter.test(fsItem)) {
result.add((V) fsItem);
}
}
for (ResolveResult resolveResult : polyVariantRef.multiResolve(false)) {
if (resolveResult.getElement() instanceof PsiFileSystemItem fsItem && filter.test(fsItem)) {
result.add((V) fsItem);
}
}

Collections.singleton(file),
ModuleUtilCore.findModuleForPsiElement(file),
null);
return beans == null ? null : new DomSpringModelImpl2(beans, Collections.singleton(file), file.getModule(), null);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This return is indented one level too deep (6 spaces instead of 4).

Suggested change
return beans == null ? null : new DomSpringModelImpl2(beans, Collections.singleton(file), file.getModule(), null);
return beans == null ? null : new DomSpringModelImpl2(beans, Collections.singleton(file), file.getModule(), null);

@Override
public boolean equals(QualifierAttribute o1, QualifierAttribute o2) {
return Comparing.equal(o1.getAttributeKey(), o2.getAttributeKey()) && Comparing.equal(o1.getAttributeValue(), o2.getAttributeValue());
return Objects.equals(o1.getAttributeKey(), o2.getAttributeKey()) && Comparing.equal(o1.getAttributeValue(), o2.getAttributeValue());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor consistency nit: the key comparison was migrated to Objects.equals but the value comparison still uses Comparing.equal. Both are null-safe and behave the same, but using one style reads cleaner. (If you'd rather, keep both as Comparing.equal — either way, just pick one.)

Suggested change
return Objects.equals(o1.getAttributeKey(), o2.getAttributeKey()) && Comparing.equal(o1.getAttributeValue(), o2.getAttributeValue());
return Objects.equals(o1.getAttributeKey(), o2.getAttributeKey()) && Objects.equals(o1.getAttributeValue(), o2.getAttributeValue());

…otations. Some localization and refactoring.
@unv-unv

unv-unv commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

@claude review pr with inline comments

@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Claude finished @unv-unv's task in 2m 37s —— View job


PR Review — part 5 (@OverRide / RRA-RWA-RUI / localization / refactoring)

  • Read the PR diff (51 files, +859/−740)
  • Analyze non-trivial refactors for correctness
  • Post inline suggestions on specific lines
  • Summarize findings

Posted a review with 2 inline comments.

Summary

This is an overwhelmingly mechanical and clean pass. I re-verified the non-trivial refactors against the actual checked-out tree and they preserve behavior:

  • PsiAnnotatedTypePattern.acceptsAnnotationPattern — the merged element != null && ... instanceof PsiClass ... && annoPattern.accepts(...) condition keeps the exact same fall-through to the qualifiedName check, and the shoulBeInheritedshouldBeInherited typo fix is name-only. ✔
  • Lambda conversions in ResourceResolverUtils, PsiBeanPointcutExpression (incl. RefSimpleReference, ProcessorPredicate), and ResolvedConstructorArgsImpl (CTOR_COMPARATOR/ARG_COMPARATOR) — equivalent. ✔
  • hasModifierProperty(PUBLIC)isPublic(), diamonds, Integer.intValue() unboxing — equivalent. ✔

Inline findings (both minor)

  1. QualifierAttribute.java:4Comparing is now an unused import: both key and value comparisons in equals(...) were migrated to Objects.equals. Left a one-click suggestion to drop the import.
  2. PropertyReferenceSet.java — reindented to 4 spaces, while the rest of this PR and the neighbouring PropertyReference.java (same package) use 2 spaces. Worth normalizing back to 2.

Note: the 3 suggestions from the earlier automated pass (ResourceResolverUtils for/if split, SpringManagerImpl return indent, QualifierAttribute value comparison) no longer apply — the current tree already has those lines in their correct form; they appear to have been GitHub diff-wrapping artifacts rather than real issues.

Worth double-checking (not blocking)

Several sites swap ModuleUtilCore.findModuleForPsiElement(...) / findModuleForFile(...) for xxx.getModule() (SpringManagerImpl.getLocalSpringModel, ResourceResolverUtils.getResourceFileReferenceString, PsiBeanPointcutExpression.acceptsClass). Usually equivalent, but getModule() can resolve differently for elements in library/derived files — a quick run of the existing resolve/highlighting tests would confirm.

No behavioral bugs found. 👍
· branch overrides-5

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Part 5 — one more accurate pass over the non-trivial refactors. The mechanical work (@Override, RRA/RWA/RUI, instanceof patterns, diamonds, PairProcessor/ConditionBiPredicate/Predicate, SpringBundleSpringLocalize) all preserves behavior — including the merged condition in PsiAnnotatedTypePattern.acceptsAnnotationPattern (same fall-through to the qualifiedName check) and the lambda conversions in ResourceResolverUtils / PsiBeanPointcutExpression / ResolvedConstructorArgsImpl. Two small leftovers below.

import consulo.util.lang.Comparing;
import consulo.util.collection.HashingStrategy;

import consulo.util.lang.Comparing;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comparing is now unused — both the key and value comparisons in equals(...) were migrated to Objects.equals, so this import can be dropped.

Suggested change
import consulo.util.lang.Comparing;

private final ConvertContext myContext;
private final CommonSpringBean myBean;
public class PropertyReferenceSet extends ReferenceSetBase<PropertyReference> {
@Nullable

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file was reindented to 4 spaces, but the rest of this PR and the surrounding code (including the closely-related PropertyReference.java in the same package) use 2-space indentation. Worth reindenting back to 2 spaces for consistency.

@VISTALL
VISTALL merged commit e3bc704 into consulo:master Jul 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants