Tweaks Class.setName to avoid an autobox and thus avoid needing the Integer class to be initialized. Review by: scottb git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@5494 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/super/com/google/gwt/emul/java/lang/Class.java b/user/super/com/google/gwt/emul/java/lang/Class.java index 1285c8b..3526d69 100644 --- a/user/super/com/google/gwt/emul/java/lang/Class.java +++ b/user/super/com/google/gwt/emul/java/lang/Class.java
@@ -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()); } }