[infinispan-commits] Infinispan SVN: r1093 - trunk/core/src/main/java/org/infinispan.

infinispan-commits at lists.jboss.org infinispan-commits at lists.jboss.org
Tue Nov 3 08:49:07 EST 2009


Author: manik.surtani at jboss.com
Date: 2009-11-03 08:49:06 -0500 (Tue, 03 Nov 2009)
New Revision: 1093

Modified:
   trunk/core/src/main/java/org/infinispan/CacheDelegate.java
Log:
Added a warning

Modified: trunk/core/src/main/java/org/infinispan/CacheDelegate.java
===================================================================
--- trunk/core/src/main/java/org/infinispan/CacheDelegate.java	2009-11-03 08:16:58 UTC (rev 1092)
+++ trunk/core/src/main/java/org/infinispan/CacheDelegate.java	2009-11-03 13:49:06 UTC (rev 1093)
@@ -150,6 +150,10 @@
    }
 
    public final boolean remove(Object key, Object value) {
+      if (value instanceof Flag) {
+         // this can happen!
+         log.warn("Did you intend to call Cache.remove(Object, Object), with a Flag as value, or did you intend to call Cache.remove(Object, Flag... )?  If it was the latter and you are just passing in one flag, please cast this to an array of Flag, e.g., remove(key, new Flag[]{flag}) to ensure the correct method gets called!");
+      }
       return remove(key, value, (Flag[]) null);
    }
 



More information about the infinispan-commits mailing list