You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@deltaspike.apache.org by Thomas Frühbeck <t....@gmail.com> on 2023/12/30 14:24:06 UTC

2.0.0 MessageBundleExtension - Weld - NullPointer

Profile Weld, Test: MessageContextTest#testSimpleMessage: NPE

In MessageBudleExtension:

final InjectionTarget<T> *injectionTarget* = new DummyInjectionTarget<>();

addInjectionPoints(injectionTarget.getInjectionPoints());

createWith(c -> {

T *instance = injectionTarget.produce(c);*

injectionTarget.inject(instance, c);

injectionTarget.postConstruct(instance);

return instance;

});

But:

public class DummyInjectionTarget<T> implements InjectionTarget<T>

{

public T *produce(CreationalContext<T> **ctx)*

{

return null;

}

}


How is this intended to work?