[jboss-dev-forums] [Design of JBossCache] - Removing non-existing key in UnversionedNode causes data los

AlexFu.Novell do-not-reply at jboss.com
Tue Feb 10 11:21:40 EST 2009


Manik,

In jboss.cache.UnversionedNode.java, when it is a singletonMap the mapping will be dropped when remove(K key) is called, no matter if the key matches. This is in trunk and at least 3.0.2.GA.



   public V remove(K key)
   {
      if (data == null) return null;
      V value;
      if (data instanceof FastCopyHashMap)
      {
         value = data.remove(key);
         downgradeDataMapIfNeeded();
      }
      else
      {
         // singleton maps cannot remove!
         value = data.get(key);
         data = null;
      }
      return value;
   }


Should I file a bug and fix it or you are going to fix it?

Thanks,
-Alex

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4208654#4208654

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4208654



More information about the jboss-dev-forums mailing list