ekuefler/gwt-supereventbus — pull request #4 by arnor2000 (2013-09-09 02:26:11+00:00)
Title: Fix EventBus.register method. In production mode only class literals can be created by GWT.create.

GWT compiler was complaining about the call of GWT.create with a class variable in EventBus.register method.
It's easy to forget but javadoc is clear:
[GWT.create(java.lang.Class classLiteral)][1]
>The argument to create(Class) must be a class literal because the Production Mode compiler must be able to statically determine the requested type at compile-time. This can be tricky because using a Class variable may appear to work correctly in Development Mode.

I see no other solution than having to externalize the GWT.create, developer has to instantiate himself the EventRegistration interface and pass it to the EventBus.register, as usual.

I changed all unit tests, they are all passing.

[1]: http://www.gwtproject.org/javadoc/latest/com/google/gwt/core/client/GWT.html#create(java.lang.Class)