Closed GoogleCodeExporter closed 9 years ago
Original comment by gael.laz...@gmail.com
on 2 Aug 2011 at 10:37
Original comment by gael.laz...@gmail.com
on 6 Aug 2011 at 7:41
[deleted comment]
I wrote my own abstract class to test if your code would work during a real GWT
module load.
So, my abstract class which implements Messages :
public abstract class AbstractMessage implements Messages {
}
And the onModuleLoad code :
public void onModuleLoad() {
AbstractMessage abstractMessage = GWT.create(AbstractMessage.class);
System.out.println(abstractMessage);
}
GWT Debug output :
[DEBUG] [test_messages] - Rebinding com.glz.client.AbstractMessage
[DEBUG] [test_messages] - Invoking generator
com.google.gwt.i18n.rebind.LocalizableGenerator
[ERROR] [test_messages] - AbstractMessage must be an interface
The module failed to load.
This explains why gwt-test-utils is expecting an interface instead of a class,
regardless of how gwt-test-utils would implements the Messages subinterface.
Indeed, I have improved the message stack trace, you will not see the
Caused by: java.lang.IllegalArgumentException: CustomAbstractClass is not an
interface
at java.lang.reflect.Proxy.getProxyClass(Proxy.java:362)
anymore. Instead of that, a GwtTestI18NException will be thrown with the same
message as GWT : 'AbstractMessage must be an interface'.
I've deployed new 0.32-SNAPSHOT, 0.22.3-SNAPSHOT, 0.25.3-SNAPSHOT and
0.28.6-SNAPSHOT with this improvement.
But I may have missed/misunderstood something about your problem.. If so, could
you be more specific ?
Original comment by gael.laz...@gmail.com
on 6 Aug 2011 at 8:37
Actually, the MyMessages was created with a customised Generator declared in
.ui.xml.
LocalizableGenerator cannot generate instance for classes, only for interfaces.
Original comment by gael.laz...@gmail.com
on 8 Aug 2011 at 9:55
Original issue reported on code.google.com by
stefan.s...@googlemail.com
on 2 Aug 2011 at 10:34