Skip to content

Commit

Permalink
Intercepted bean metadata should be derived from topmost creational c…
Browse files Browse the repository at this point in the history
…ontext.
  • Loading branch information
manovotn authored and kenfinnigan committed Oct 11, 2019
1 parent 0c98960 commit 7063a52
Showing 1 changed file with 8 additions and 3 deletions.
Expand Up @@ -15,9 +15,14 @@ public class InterceptedBeanMetadataProvider implements InjectableReferenceProvi
@Override
public Contextual<?> get(CreationalContext<Contextual<?>> creationalContext) {
CreationalContextImpl<?> parent = unwrap(creationalContext).getParent();
if (parent != null) {
// Intercepted bean creational context
return parent.getContextual();
// TODO in some cases, first level CC does the trick but for FT interceptor we need second, why?
while (parent != null) {
CreationalContextImpl<?> newParent = unwrap(parent).getParent();
if (newParent != null) {
parent = newParent;
} else {
return parent.getContextual();
}
}
return null;
}
Expand Down

0 comments on commit 7063a52

Please sign in to comment.