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:07:29 GMT
noel        2003/02/08 00:07:29

  Modified:    src/java/org/apache/james/mailrepository Tag: branch_2_1_fcs
                        AvalonMailRepository.java
  Log:
  Fixed synchronization bug - addAll not synchronized over parameter
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.20.4.2  +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.20.4.1
  retrieving revision 1.20.4.2
  diff -u -r1.20.4.1 -r1.20.4.2
  --- AvalonMailRepository.java	4 Feb 2003 19:51:16 -0000	1.20.4.1
  +++ AvalonMailRepository.java	8 Feb 2003 08:07:28 -0000	1.20.4.2
  @@ -382,7 +382,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