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

Elias Ross genman at noderunner.net
Mon Nov 20 02:33:14 EST 2006


  User: genman  
  Date: 06/11/20 02:33:14

  Modified:    src/org/jboss/cache/loader    AbstractCacheLoader.java
                        AsyncCacheLoader.java JDBCCacheLoader.java
  Log:
  JBCACHE-867 -- Fix some data copying issues of Node.getData()
  
  Revision  Changes    Path
  1.12      +2 -1      JBossCache/src/org/jboss/cache/loader/AbstractCacheLoader.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: AbstractCacheLoader.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/loader/AbstractCacheLoader.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -b -r1.11 -r1.12
  --- AbstractCacheLoader.java	20 Nov 2006 03:53:55 -0000	1.11
  +++ AbstractCacheLoader.java	20 Nov 2006 07:33:14 -0000	1.12
  @@ -12,6 +12,7 @@
   import org.jboss.cache.Modification;
   import org.jboss.cache.RegionManager;
   import org.jboss.cache.buddyreplication.BuddyManager;
  +import org.jboss.cache.util.MapCopy;
   
   import java.io.ObjectInputStream;
   import java.io.ObjectOutputStream;
  @@ -40,7 +41,7 @@
         }
   
         // JBCACHE-769 -- make a defensive copy
  -      Map attrs = (attributes == null ? null : new HashMap(attributes));
  +      Map attrs = (attributes == null ? null : new MapCopy(attributes));
         put(fqn, attrs);
      }
   
  
  
  
  1.23      +2 -1      JBossCache/src/org/jboss/cache/loader/AsyncCacheLoader.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: AsyncCacheLoader.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/loader/AsyncCacheLoader.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -b -r1.22 -r1.23
  --- AsyncCacheLoader.java	26 Oct 2006 19:30:20 -0000	1.22
  +++ AsyncCacheLoader.java	20 Nov 2006 07:33:14 -0000	1.23
  @@ -12,6 +12,7 @@
   import org.jboss.cache.Fqn;
   import org.jboss.cache.Modification;
   import org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
  +import org.jboss.cache.util.MapCopy;
   
   import java.io.IOException;
   import java.util.ArrayList;
  @@ -178,7 +179,7 @@
         if (config.getUseAsyncPut())
         {
            // JBCACHE-769 -- make a defensive copy
  -         Map attrs = (attributes == null ? null : new HashMap(attributes));
  +         Map attrs = (attributes == null ? null : new MapCopy(attributes));
            Modification mod = new Modification(Modification.ModificationType.PUT_DATA, name, attrs);
            enqueue(mod);
         }
  
  
  
  1.23      +3 -2      JBossCache/src/org/jboss/cache/loader/JDBCCacheLoader.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: JDBCCacheLoader.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/loader/JDBCCacheLoader.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -b -r1.22 -r1.23
  --- JDBCCacheLoader.java	16 Nov 2006 15:03:00 -0000	1.22
  +++ JDBCCacheLoader.java	20 Nov 2006 07:33:14 -0000	1.23
  @@ -11,6 +11,7 @@
   import org.jboss.cache.Fqn;
   import org.jboss.cache.Modification;
   import org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
  +import org.jboss.cache.util.MapCopy;
   
   import javax.naming.InitialContext;
   import javax.naming.NamingException;
  @@ -79,7 +80,7 @@
    *
    * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
    * @author <a href="mailto:hmesha at novell.com">Hany Mesha </a>
  - * @version <tt>$Revision: 1.22 $</tt>
  + * @version <tt>$Revision: 1.23 $</tt>
    */
   public class JDBCCacheLoader extends AbstractCacheLoader
   {
  @@ -624,7 +625,7 @@
      public void put(Fqn name, Map attributes, boolean override) throws Exception
      {
         // JBCACHE-769 -- make a defensive copy
  -      Map attrs = (attributes == null ? null : new HashMap(attributes));
  +      Map attrs = (attributes == null ? null : new MapCopy(attributes));
   
         Map oldNode = loadNode(name);
         if (oldNode != null)
  
  
  



More information about the jboss-cvs-commits mailing list