Skip to content

Commit

Permalink
WELD-2761 Fix BeanManager not returning empty set if there are no con…
Browse files Browse the repository at this point in the history
…texts for given scope via getContexts() methods
  • Loading branch information
manovotn committed Oct 3, 2023
1 parent d6729a0 commit d194573
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,8 @@ public Context getContext(Class<? extends Annotation> scopeType) {

@Override
public Collection<Context> getContexts(Class<? extends Annotation> scopeType) {
return Collections.unmodifiableList(contexts.get(scopeType));
List<Context> found = this.contexts.get(scopeType);
return found != null ? Collections.unmodifiableList(found) : Collections.EMPTY_LIST;
}

public Context getUnwrappedContext(Class<? extends Annotation> scopeType) {
Expand Down

0 comments on commit d194573

Please sign in to comment.