Skip to content

Commit

Permalink
WELD-2721 Change AfterBeanDiscoveryImpl to correctly check the state …
Browse files Browse the repository at this point in the history
…of invocation before making assumptions about it
  • Loading branch information
manovotn committed Jun 8, 2022
1 parent eee420a commit 8ab35ef
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -102,7 +102,9 @@ public void addBean(Bean<?> bean) {

@Override
public <T> WeldBeanConfigurator<T> addBean() {
return addBean(getReceiver().getClass());
// null is only going to occur if the invocation is outside of OM in which case it will fail in the
// subsequent method inside checkWithinObserverNotification()
return addBean(getReceiver() != null ? getReceiver().getClass() : null);
}

/**
Expand Down

0 comments on commit 8ab35ef

Please sign in to comment.