[jbosscache-commits] JBoss Cache SVN: r6582 - core/trunk/src/main/java/org/jboss/cache/interceptors.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Tue Aug 19 07:26:03 EDT 2008


Author: manik.surtani at jboss.com
Date: 2008-08-19 07:26:03 -0400 (Tue, 19 Aug 2008)
New Revision: 6582

Modified:
   core/trunk/src/main/java/org/jboss/cache/interceptors/MarshalledValueInterceptor.java
Log:
Null chk

Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/MarshalledValueInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/MarshalledValueInterceptor.java	2008-08-19 11:25:48 UTC (rev 6581)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/MarshalledValueInterceptor.java	2008-08-19 11:26:03 UTC (rev 6582)
@@ -19,6 +19,7 @@
 
 import java.io.IOException;
 import java.io.NotSerializableException;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
@@ -165,6 +166,11 @@
    @SuppressWarnings("unchecked")
    protected Map wrapMap(Map<Object, Object> m, Set<MarshalledValue> marshalledValues, InvocationContext ctx) throws NotSerializableException
    {
+      if (m == null)
+      {
+         if (trace) log.trace("Map is nul; returning an empty map.");
+         return Collections.emptyMap();
+      }
       if (trace) log.trace("Wrapping map contents of argument " + m);
       Map copy = new HashMap();
       for (Map.Entry me : m.entrySet())




More information about the jbosscache-commits mailing list