chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1330373 - /chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/cookies/CmisCookieStoreImpl.java
Date Wed, 25 Apr 2012 16:00:48 GMT
Author: fmui
Date: Wed Apr 25 16:00:47 2012
New Revision: 1330373

URL: http://svn.apache.org/viewvc?rev=1330373&view=rev
Log:
Fixed an issue with expired cookies

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/cookies/CmisCookieStoreImpl.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/cookies/CmisCookieStoreImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/cookies/CmisCookieStoreImpl.java?rev=1330373&r1=1330372&r2=1330373&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/cookies/CmisCookieStoreImpl.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/cookies/CmisCookieStoreImpl.java
Wed Apr 25 16:00:47 2012
@@ -27,6 +27,7 @@ import java.net.URI;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
+import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
@@ -115,9 +116,11 @@ class CmisCookieStoreImpl implements Ser
     }
 
     private void cleanCookieList(List<CmisHttpCookie> cookies) {
-        for (CmisHttpCookie cookie : cookies) {
+        Iterator<CmisHttpCookie> iter = cookies.iterator();
+        while (iter.hasNext()) {
+            CmisHttpCookie cookie = iter.next();
             if (cookie.hasExpired()) {
-                cookies.remove(cookie);
+                iter.remove();
             }
         }
     }



Mime
View raw message