[jbosscache-commits] JBoss Cache SVN: r5460 - core/trunk/src/main/java/org/jboss/cache/interceptors.
jbosscache-commits at lists.jboss.org
jbosscache-commits at lists.jboss.org
Tue Mar 25 14:59:14 EDT 2008
Author: genman
Date: 2008-03-25 14:59:14 -0400 (Tue, 25 Mar 2008)
New Revision: 5460
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/MarshalledValueInterceptor.java
Log:
Optimize iteration
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/MarshalledValueInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/MarshalledValueInterceptor.java 2008-03-25 17:52:13 UTC (rev 5459)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/MarshalledValueInterceptor.java 2008-03-25 18:59:14 UTC (rev 5460)
@@ -107,12 +107,13 @@
}
@SuppressWarnings("unchecked")
- protected Map wrapMap(Map m, Set<MarshalledValue> marshalledValues, InvocationContext ctx) throws NotSerializableException
+ protected Map wrapMap(Map<Object, Object> m, Set<MarshalledValue> marshalledValues, InvocationContext ctx) throws NotSerializableException
{
Map copy = new HashMap();
- for (Object key : m.keySet())
+ for (Map.Entry me : m.entrySet())
{
- Object value = m.get(key);
+ Object key = me.getKey();
+ Object value = me.getValue();
copy.put((key == null || MarshalledValueHelper.isTypeExcluded(key.getClass())) ? key : createAndAddMarshalledValue(key, marshalledValues, ctx),
(value == null || MarshalledValueHelper.isTypeExcluded(value.getClass())) ? value : createAndAddMarshalledValue(value, marshalledValues, ctx));
}
More information about the jbosscache-commits
mailing list