Reviewers: tobyr, zundel,
Description:
Fix for rpc generator result caching (fix potential NPE)
Please review this at http://gwt-code-reviews.appspot.com/1462809/
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 10389)
+++ user/src/com/google/gwt/user/rebind/rpc/CachedRpcTypeInformation.java
(working copy)
@@ -48,12 +48,16 @@
recordTypes(serializableFromBrowser, instantiableFromBrowser,
typesFromBrowser);
recordTypes(serializableToBrowser, instantiableToBrowser,
typesToBrowser);
- for (JType type : customSerializersUsed) {
- addCustomSerializerType(type);
- }
-
- for (JType type : typesNotUsingCustomSerializers) {
- addTypeNotUsingCustomSerializer(type);
+ if (customSerializersUsed != null) {
+ for (JType type : customSerializersUsed) {
+ addCustomSerializerType(type);
+ }
+ }
+
+ if (typesNotUsingCustomSerializers != null) {
+ for (JType type : typesNotUsingCustomSerializers) {
+ addTypeNotUsingCustomSerializer(type);
+ }
}
}
@@ -190,6 +194,9 @@
private void recordTypes(Set<String> serializable, Set<String>
instantiable,
SerializableTypeOracle sto) {
+ if (sto == null) {
+ return;
+ }
for (JType type : sto.getSerializableTypes()) {
String sourceName = type.getQualifiedSourceName();
lastModifiedTimes.put(sourceName, getLastModifiedTime(type));
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors