[jboss-cvs] JBossCache/src/org/jboss/cache ...

Manik Surtani manik at jboss.org
Fri Jul 20 05:52:09 EDT 2007


  User: msurtani
  Date: 07/07/20 05:52:09

  Modified:    src/org/jboss/cache   UnversionedNode.java NodeSPI.java
  Log:
  JBCACHE-1148
  
  Revision  Changes    Path
  1.39      +3 -3      JBossCache/src/org/jboss/cache/UnversionedNode.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: UnversionedNode.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/UnversionedNode.java,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -b -r1.38 -r1.39
  --- UnversionedNode.java	17 Jul 2007 02:10:41 -0000	1.38
  +++ UnversionedNode.java	20 Jul 2007 09:52:09 -0000	1.39
  @@ -14,7 +14,6 @@
   import org.jboss.cache.marshall.MethodDeclarations;
   import org.jboss.cache.optimistic.DataVersion;
   import org.jboss.cache.transaction.GlobalTransaction;
  -import org.jboss.cache.util.MapCopy;
   
   import java.util.Collections;
   import java.util.HashMap;
  @@ -202,7 +201,8 @@
   
      public Map<K, V> getDataDirect()
      {
  -      return new MapCopy<K, V>(data);
  +      if (data == null) return Collections.emptyMap();
  +      return Collections.unmodifiableMap(data);
      }
   
      public V put(K key, V value)
  
  
  
  1.23      +2 -0      JBossCache/src/org/jboss/cache/NodeSPI.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: NodeSPI.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/NodeSPI.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -b -r1.22 -r1.23
  --- NodeSPI.java	12 Jul 2007 14:29:04 -0000	1.22
  +++ NodeSPI.java	20 Jul 2007 09:52:09 -0000	1.23
  @@ -350,6 +350,8 @@
       * This data should only be modified by the cache itself.
       * This method should never return null.
       * <p/>
  +    * Also note that this method returns an unmodifiable reference to the underlying data map.
  +    * <p/>
       * The caller needs to ensure a proper lock has been obtained prior to calling this method, otherwise a
       * {@link org.jboss.cache.lock.LockingException} will be thrown.
       * <p/>
  
  
  



More information about the jboss-cvs-commits mailing list