james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject cvs commit: jakarta-james/src/java/org/apache/james/mailrepository AvalonMailRepository.java
Date Sat, 08 Feb 2003 08:09:01 GMT
noel        2003/02/08 00:09:01

  Modified:    src/java/org/apache/james/mailrepository
                        AvalonMailRepository.java
  Log:
  Fixed synchronization bug - addAll not synchronized over parameter
  
  Revision  Changes    Path
  1.29      +3 -1      jakarta-james/src/java/org/apache/james/mailrepository/AvalonMailRepository.java
  
  Index: AvalonMailRepository.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/mailrepository/AvalonMailRepository.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- AvalonMailRepository.java	8 Feb 2003 04:12:25 -0000	1.28
  +++ AvalonMailRepository.java	8 Feb 2003 08:09:01 -0000	1.29
  @@ -386,7 +386,9 @@
           // Fix ConcurrentModificationException by cloning
           // the keyset before getting an iterator
           final HashSet clone = new HashSet();
  -        clone.addAll( keys );
  +        synchronized(keys) {
  +            clone.addAll( keys );
  +        }
           return clone.iterator();
       }
   }
  
  
  

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


Mime
View raw message