Skip to content

Commit

Permalink
Merge pull request #44640 from Ladicek/arc-improve-interception-candi…
Browse files Browse the repository at this point in the history
…dates-search

ArC: improve how intercepted methods are searched for
  • Loading branch information
gsmet authored Nov 22, 2024
2 parents f138000 + 4c6af39 commit 9007580
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,15 @@ private static Set<MethodInfo> addInterceptedMethodCandidates(BeanDeployment bea
Set<AnnotationInstance> bindings = mergeBindings(beanDeployment, originalClassInfo, classLevelBindings,
ignoreMethodLevelBindings, method, noClassInterceptorsMethods, bindingsDiscovery);
boolean possiblyIntercepted = !bindings.isEmpty() || targetHasAroundInvokes;
if (!possiblyIntercepted) {
candidates.put(key, bindings);
continue;
}
if (skipPredicate.test(method)) {
continue;
}
boolean addToCandidates = true;
if (Modifier.isFinal(method.flags()) && possiblyIntercepted) {
if (Modifier.isFinal(method.flags())) {
if (transformUnproxyableClasses && !isNoninterceptableKotlinMethod(method)) {
methodsFromWhichToRemoveFinal.add(new MethodKey(method));
} else {
Expand All @@ -207,7 +211,7 @@ private static Set<MethodInfo> addInterceptedMethodCandidates(BeanDeployment bea
}
}
if (addToCandidates) {
candidates.putIfAbsent(key, bindings);
candidates.put(key, bindings);
}
}
skipPredicate.methodsProcessed();
Expand Down

0 comments on commit 9007580

Please sign in to comment.