Closed JohT closed 2 years ago
Thanks for the report, will look into it this week.
@Inject BeanManager beanManager;works as expected.
This is a safe replacement as BeanManager
directly implements BeanContainer
(and Weld should give you the same object for both).
So this is in fact a pretty serious oversight in Weld, see https://issues.redhat.com/browse/WELD-2731 It will be fixed in Weld 5.0.2.Final, pending PR is here.
I noticed that your projects doesn't declare any Weld version. I'd recommend you declare it explicitly as the version brought in with this weld-testing
is more likely to be the minimal required version and not the latest release.
I am talking about this dependency on Weld SE core - https://github.com/weld/weld-testing/blob/master/pom.xml#L73-L77
I'll close this issue as it isn't directly related to this project.
You're safe to use BeanManager
for now; later on you can use Weld 5.0.2.Final and it should work just fine :)
Thanks for reporting it downstream and for your advices.👍
Description
@Inject BeanContainer beanContainer;
in a bean and test it with weld-junit5@EnableAutoWeld
, i getUnsatisfied dependencies for type BeanContainer with qualifiers @Default
.@Inject BeanManager beanManager;
works as expected.BeanContainer beanContainer = CDI.current().getBeanContainer();
also works as expected.Reproducer
JohT/livecoding#67
StackTrace