Automated [] rollback of changelist
*** Reason for rollback ***
[]
*** Original change description ***
Have CollectCssRuntime return a map directly
The soy plugin infrastructure was recently enhanced to support this and do the coercion implicitly.
***
@@ -29,11 +29,9 @@ import com.google.template.soy.plugin.java.restricted.JavaValue;
import com.google.template.soy.plugin.java.restricted.MethodSignature;
import com.google.template.soy.plugin.java.restricted.SoyJavaSourceFunction;
import com.google.template.soy.types.IntType;
-import com.google.template.soy.types.LegacyObjectMapType;
import com.google.template.soy.types.ListType;
import com.google.template.soy.types.MapType;
import com.google.template.soy.types.NullType;
-import com.google.template.soy.types.RecordType;
import com.google.template.soy.types.SoyType;
import com.google.template.soy.types.SoyTypeRegistry;
import com.google.template.soy.types.UnionType;
@@ -125,11 +123,7 @@ public class JavaPluginValidator {
return;
}
} else if (Map.class.isAssignableFrom(actualClass)) {
- // maps are allowed as long as the value is one of our static map types. We don't allow
- // maps to be returned as ? (unlike lists which are less ambiguous)
- if (expectedType instanceof MapType
- || expectedType instanceof RecordType
- || expectedType instanceof LegacyObjectMapType) {
+ if (expectedType instanceof MapType) {
actualSoyType = expectedType;
} else {
reporter.invalidReturnType(actualClass, expectedType, method);
