Using BusConfiguration throws NullPointerException
Closed this issue · 2 comments
nikoliazekter commented
This code throws NullPointerException:
BusConfiguration config = new BusConfiguration();
MBassador<Object> eventBus = new MBassador<Object>(config);
Exception in thread "LWJGL Application" java.lang.NullPointerException
at net.engio.mbassy.bus.AbstractPubSubSupport.(AbstractPubSubSupport.java:49)
at net.engio.mbassy.bus.AbstractSyncAsyncMessageBus.(AbstractSyncAsyncMessageBus.java:36)
at net.engio.mbassy.bus.MBassador.(MBassador.java:45)
bennidi commented
True. This way of construction was not meant to be supported. Either use default constructor of bus or specify full configuration object. I might reconsider this decision as it seems bad design that this code simply errors with an NPE.
bennidi commented
I fixed the NPE and replaced it with a more meaningful error message. This is available with the 1.2.4 release.