Author: [email protected]
Date: Tue Jun 2 08:28:10 2009
New Revision: 5494
Modified:
trunk/user/super/com/google/gwt/emul/java/lang/Class.java
Log:
Tweaks Class.setName to avoid an autobox and thus avoid
needing the Integer class to be initialized.
Review by: scottb
Modified: trunk/user/super/com/google/gwt/emul/java/lang/Class.java
==============================================================================
--- trunk/user/super/com/google/gwt/emul/java/lang/Class.java (original)
+++ trunk/user/super/com/google/gwt/emul/java/lang/Class.java Tue Jun 2
08:28:10 2009
@@ -114,8 +114,13 @@
if (clazz.isClassMetadataEnabled()) {
clazz.typeName = packageName + className;
} else {
+ /*
+ * The initial "" + in the below code is to prevent clazz.hashCode()
from
+ * being autoboxed. The class literal creation code is run very early
+ * during application start up, before class Integer has been
initialized.
+ */
clazz.typeName = "Class$"
- + (seedName != null ? seedName : clazz.hashCode());
+ + (seedName != null ? seedName : "" + clazz.hashCode());
}
}
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---