Reviewers: skybrian,
Description:
Prevent compilation failures due to type inferencing bugs (bug 6302954
at bugs.sun.com) in older versions of JDK6.
Please review this at http://gwt-code-reviews.appspot.com/1736805/
Affected files:
M user/src/com/google/gwt/core/client/GWT.java
M user/src/com/google/gwt/core/server/LocalizableInstantiator.java
M user/src/com/google/gwt/core/server/ServerGwtBridge.java
Index: user/src/com/google/gwt/core/client/GWT.java
===================================================================
--- user/src/com/google/gwt/core/client/GWT.java (revision 11056)
+++ user/src/com/google/gwt/core/client/GWT.java (working copy)
@@ -82,7 +82,7 @@
* In Production Mode, the compiler directly replaces calls to this
method
* with a new Object() type expression of the correct rebound type.
*/
- return com.google.gwt.core.shared.GWT.create(classLiteral);
+ return com.google.gwt.core.shared.GWT.<T>create(classLiteral);
}
/**
Index: user/src/com/google/gwt/core/server/LocalizableInstantiator.java
===================================================================
--- user/src/com/google/gwt/core/server/LocalizableInstantiator.java
(revision 11056)
+++ user/src/com/google/gwt/core/server/LocalizableInstantiator.java
(working copy)
@@ -37,20 +37,20 @@
GwtLocale locale = ServerGwtBridge.getLocale(properties);
for (GwtLocale search : locale.getCompleteSearchList()) {
String suffix = "_" + search.getAsString();
- T obj = tryCreate(pkgName + "." + className + suffix);
+ T obj = this.<T>tryCreate(pkgName + "." + className + suffix);
if (obj != null) {
return obj;
}
- obj = tryCreate(pkgName + ".impl." + className + suffix);
+ obj = this.<T>tryCreate(pkgName + ".impl." + className + suffix);
if (obj != null) {
return obj;
}
- obj = tryCreate(pkgName + "." + className + "Impl" + suffix);
+ obj = this.<T>tryCreate(pkgName + "." + className + "Impl" + suffix);
if (obj != null) {
return obj;
}
if (enclosingClass != null) {
- obj = tryCreate(enclosingClass.getCanonicalName() + "$" +
className + suffix);
+ obj = this.<T>tryCreate(enclosingClass.getCanonicalName() + "$" +
className + suffix);
if (obj != null) {
return obj;
}
Index: user/src/com/google/gwt/core/server/ServerGwtBridge.java
===================================================================
--- user/src/com/google/gwt/core/server/ServerGwtBridge.java (revision
11056)
+++ user/src/com/google/gwt/core/server/ServerGwtBridge.java (working copy)
@@ -241,7 +241,7 @@
while (!stack.isEmpty()) {
Node node = stack.pop();
for (ClassInstantiator inst : node.instantiators) {
- T obj = inst.create(classLiteral, properties);
+ T obj = inst.<T>create(classLiteral, properties);
if (obj != null) {
return obj;
}
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors