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 Sun, 06 Jun 2004 11:37:46 GMT
ozeigermann    2004/06/06 04:37:46

  Modified:    transaction/src/java/org/apache/commons/transaction/memory
                        TransactionalMapWrapper.java
  Log:
  Removed completely stupid oldvalue passing in put
  
  Revision  Changes    Path
  1.17      +9 -9      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.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- TransactionalMapWrapper.java	5 Jun 2004 16:33:37 -0000	1.16
  +++ TransactionalMapWrapper.java	6 Jun 2004 11:37:46 -0000	1.17
  @@ -38,7 +38,7 @@
    * reasons. 
    * <br>
    * Start a transaction by calling {@link #startTransaction()}. Then perform the normal
actions on the map and
  - * finally either calls {@link #commitTransaction()} to make your changes permanent or
{@link #rollbackTransaction()} to
  + * finally either call {@link #commitTransaction()} to make your changes permanent or {@link
#rollbackTransaction()} to
    * undo them.
    * <br>
    * <em>Caution:</em> Do not modify values retrieved by {@link #get(Object)}
as this will circumvent the transactional mechanism.
  @@ -365,7 +365,7 @@
           } else {
               for (Iterator it = map.entrySet().iterator(); it.hasNext();) {
                   Map.Entry entry = (Map.Entry) it.next();
  -                txContext.put(entry.getKey(), entry.getValue(), wrapped.get(entry.getKey()));
  +                txContext.put(entry.getKey(), entry.getValue());
               }
           }
       }
  @@ -440,7 +440,7 @@
               return wrapped.put(key, value);
           } else {
               Object oldValue = get(key);
  -            txContext.put(key, value, oldValue);
  +            txContext.put(key, value);
               return oldValue;
           }
   
  @@ -553,11 +553,11 @@
               }
           }
   
  -        protected void put(Object key, Object value, Object oldValue) {
  +        protected void put(Object key, Object value) {
               try {
                   readOnly = false;
                   deletes.remove(key);
  -                if (oldValue != null) {
  +                if (wrapped.get(key) != null) {
                       changes.put(key, value);
                   } else {
                       adds.put(key, value);
  
  
  

---------------------------------------------------------------------
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