Reviewers: zundel, tobyr,

Description:
Handle arrays of generic types, in rpc result cacheability checking


Please review this at http://gwt-code-reviews.appspot.com/1463809/

Affected files:
  M user/src/com/google/gwt/user/rebind/rpc/CachedRpcTypeInformation.java


Index: user/src/com/google/gwt/user/rebind/rpc/CachedRpcTypeInformation.java
===================================================================
--- user/src/com/google/gwt/user/rebind/rpc/CachedRpcTypeInformation.java (revision 10394) +++ user/src/com/google/gwt/user/rebind/rpc/CachedRpcTypeInformation.java (working copy)
@@ -154,21 +154,17 @@
    * Finds a last modified time for a type, for testing cacheability.
    */
   private long getLastModifiedTime(JType type) {
-    JType typeToCheck;
     if (type instanceof JArrayType) {
-      typeToCheck = type.getLeafType();
+      return getLastModifiedTime(type.getLeafType());
     } else if (type instanceof JRawType) {
-      typeToCheck = ((JRawType) type).getGenericType();
-    } else {
-      assert type instanceof JRealClassType;
-      typeToCheck = type;
-    }
-
-    if (typeToCheck instanceof JRealClassType) {
-      return ((JRealClassType) typeToCheck).getLastModifiedTime();
+      return getLastModifiedTime(((JRawType) type).getGenericType());
+    }
+
+    if (type instanceof JRealClassType) {
+      return ((JRealClassType) type).getLastModifiedTime();
     } else {
       // we have a type that is an array with a primitive leafType
-      assert typeToCheck instanceof JPrimitiveType;
+      assert type instanceof JPrimitiveType;
       // this type is never out of date
       return Long.MAX_VALUE;
     }


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

Reply via email to