LGTM pending confirmation that the compiler can compile out
Class.getName() in prod mode.


http://gwt-code-reviews.appspot.com/931801/diff/8001/9001
File user/src/com/google/gwt/user/client/ui/AbsolutePanel.java (right):

http://gwt-code-reviews.appspot.com/931801/diff/8001/9001#newcode272
user/src/com/google/gwt/user/client/ui/AbsolutePanel.java:272: String
className = getClass().getName();
Verify with scott (or manually) that calling Class.getName() will not
cause the compiler to include all Class names in the compiled output (a
notorious cause of file size explosion).  I'm pretty sure the compiler
is smart enough to compile it out when wrapped in a if
(!GWT.isProdMode()), but I don't know if its smart enough to figure it
out if the GWT.isProdMode() is used to exit early, as it is in this
case.

If the compiler won't figure it out, then wrap this in an
if(!GWT.isProdMode()) and add a comment that its needed for the compiler
to prune out getName().

http://gwt-code-reviews.appspot.com/931801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to