commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ozeigerm...@apache.org
Subject cvs commit: jakarta-commons-sandbox/transaction/src/java/org/apache/commons/transaction/memory TransactionalMapWrapper.java
Date Sat, 05 Jun 2004 14:52:09 GMT
ozeigermann    2004/06/05 07:52:09

  Modified:    transaction/src/java/org/apache/commons/transaction/memory
                        TransactionalMapWrapper.java
  Log:
  Use putAll in merge for performance and simplicity
  
  Revision  Changes    Path
  1.15      +6 -13     jakarta-commons-sandbox/transaction/src/java/org/apache/commons/transaction/memory/TransactionalMapWrapper.java
  
  Index: TransactionalMapWrapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/transaction/src/java/org/apache/commons/transaction/memory/TransactionalMapWrapper.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- TransactionalMapWrapper.java	4 Jun 2004 12:09:43 -0000	1.14
  +++ TransactionalMapWrapper.java	5 Jun 2004 14:52:09 -0000	1.15
  @@ -496,15 +496,8 @@
                       wrapped.clear();
                   }
   
  -                for (Iterator it = changes.entrySet().iterator(); it.hasNext();) {
  -                    Map.Entry entry = (Map.Entry) it.next();
  -                    wrapped.put(entry.getKey(), entry.getValue());
  -                }
  -
  -                for (Iterator it = adds.entrySet().iterator(); it.hasNext();) {
  -                    Map.Entry entry = (Map.Entry) it.next();
  -                    wrapped.put(entry.getKey(), entry.getValue());
  -                }
  +				wrapped.putAll(changes);
  +				wrapped.putAll(adds);
   
                   for (Iterator it = deletes.iterator(); it.hasNext();) {
                       Object key = it.next();
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message