If you pass a map created using Google Collections ImmutableMap into a Velocity context, and try to access its values using "map.key" style property syntax, it fails to resolve.
I believe the problem is in MapGetExecutor:
Specifically, this code:
Class  interfaces = clazz.getInterfaces();
for (int i = 0 ; i < interfaces.length; i++)
The sneaky thing about ImmutableMap is that ImmutableMap.of(...) doesn't return an instance of ImmutableMap, but one of serveral subclasses optimized for however many items are in the map. These subclasses extend ImmutableMap but do not directly implement Map, so that code above fails to recognize them.
A simpler and more accurate way to tell whether the class implements Map, either directory or indirectly, is "if (Map.class.isAssignableFrom(clazz))..."
|Field||Original Value||New Value|
|Summary||Property references don't work with Google Collections ImmutableMap||Property references don't work with maps that implement Map indirectly (such as Google Collections ImmutableMap)|
|Status||Open [ 1 ]||Resolved [ 5 ]|
|Fix Version/s||1.7 [ 12313453 ]|
|Resolution||Fixed [ 1 ]|
|Workflow||jira [ 12471865 ]||Default workflow, editable Closed status [ 12551632 ]|
|Workflow||Default workflow, editable Closed status [ 12551632 ]||jira [ 12552511 ]|
|Transition||Time In Source Status||Execution Times||Last Executer||Last Execution Date|
|1d 3h 18m||1||Nathan Bubna||30/Jul/09 22:12|