Skip to content

Commit

Permalink
[ioc] @ApplicationScoped subclasses should respect Java LangSpec 6.6.…
Browse files Browse the repository at this point in the history
…2 (protected methods)
  • Loading branch information
rmannibucau committed Feb 25, 2024
1 parent 91f7582 commit 15e06fd
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,10 @@ public GeneratedClass get() {
!modifiers.contains(ABSTRACT) &&
!modifiers.contains(DEFAULT) /*more for later for interfaces*/ &&
// other methods can't be subclasses/overriden like this
(modifiers.contains(PUBLIC) || modifiers.contains(PROTECTED));
(modifiers.contains(PUBLIC) ||
(modifiers.contains(PROTECTED) &&
m.getEnclosingElement() instanceof TypeElement te &&
te.getQualifiedName().contentEquals(typeElement.getQualifiedName())));
})
.map(m -> {
// note: if we start supporting interceptors,
Expand Down

0 comments on commit 15e06fd

Please sign in to comment.