4 Replies Latest reply on Feb 10, 2009 4:00 PM by alexfu.novell

    Removing non-existing key in UnversionedNode causes data los

    alexfu.novell

      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