Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using BusConfiguration throws NullPointerException #124

Closed
nikoliazekter opened this issue Aug 28, 2015 · 2 comments
Closed

Using BusConfiguration throws NullPointerException #124

nikoliazekter opened this issue Aug 28, 2015 · 2 comments
Milestone

Comments

@nikoliazekter
Copy link

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
Copy link
Owner

bennidi commented Sep 13, 2015

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 bennidi modified the milestone: 1.2.4 Oct 7, 2015
@bennidi
Copy link
Owner

bennidi commented Oct 15, 2015

I fixed the NPE and replaced it with a more meaningful error message. This is available with the 1.2.4 release.

@bennidi bennidi closed this as completed Oct 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants