Skip to content

Commit

Permalink
fix: Non-public @observes methods should be implicitly used
Browse files Browse the repository at this point in the history
Signed-off-by: Fred Bricon <[email protected]>
  • Loading branch information
fbricon authored and angelozerr committed Oct 16, 2023
1 parent 0ed538e commit b07373d
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public boolean isImplicitRead(@NotNull PsiElement element) {
private boolean isObserverMethod(@NotNull PsiElement element) {
if (element instanceof PsiMethod) {
PsiMethod method = (PsiMethod) element;
return isPublicNonAbstract(method) && observesOneParameter(method);
return isNonAbstract(method) && observesOneParameter(method);
}
return false;
}
Expand All @@ -71,9 +71,8 @@ private boolean observesOneParameter(PsiMethod method) {
return observesAnnotationCount == 1;
}

private boolean isPublicNonAbstract(@NotNull PsiMethod method) {
private boolean isNonAbstract(@NotNull PsiMethod method) {
return !method.isConstructor() &&
method.hasModifierProperty(PsiModifier.PUBLIC) &&
!method.hasModifierProperty(PsiModifier.ABSTRACT);
}

Expand Down

0 comments on commit b07373d

Please sign in to comment.