Ok, great that GWT automatically removes dead code.
-- I invoke the compiler using the maven plugin so I assume it is a production compile (right?).
But this simple code fails on compilation:
public class MyEntryPoint implements EntryPoint {
@Override
public void onModuleLoad() {
methodCompileOk();
}
public void methodCompileOk() {
Logger.getLogger("").info("This compiles with GWT");
}
public void methodCompileNotOk() {
// Logger.getAnonymousLogger() is not emulated by GWT so this code doesn't compile with GWT
Logger.getAnonymousLogger().warning("This doesn't compile with GWT");
}
}
I'm getting this error: The method getAnonymousLogger() is undefined for the type Logger
even if my code actually doesn't call the second method.
Shouldn't the second method be considered as dead code and automatically removed by GWT?
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment