Revision: 10397
Author: jbrosenb...@google.com
Date: Fri Jun 24 12:48:13 2011
Log: Handle arrays of generic types, in rpc result cacheability
checking
Review at http://gwt-code-reviews.appspot.com/1463809
http://code.google.com/p/google-web-toolkit/source/detail?r=10397
Modified:
/trunk/user/src/com/google/gwt/user/rebind/rpc/CachedRpcTypeInformation.java
=======================================
---
/trunk/user/src/com/google/gwt/user/rebind/rpc/CachedRpcTypeInformation.java
Fri Jun 24 07:48:08 2011
+++
/trunk/user/src/com/google/gwt/user/rebind/rpc/CachedRpcTypeInformation.java
Fri Jun 24 12:48:13 2011
@@ -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;
+ return getLastModifiedTime(((JRawType) type).getGenericType());
}
- if (typeToCheck instanceof JRealClassType) {
- return ((JRealClassType) typeToCheck).getLastModifiedTime();
+ 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