camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmuel...@apache.org
Subject git commit: CAMEL-6252: camel-aws - Possible concurrent modification exception
Date Thu, 27 Jun 2013 21:54:55 GMT
Updated Branches:
  refs/heads/camel-2.10.x ced7d77c5 -> 6162e83db


CAMEL-6252: camel-aws - Possible concurrent modification exception


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/6162e83d
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6162e83d
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6162e83d

Branch: refs/heads/camel-2.10.x
Commit: 6162e83dbafb22bb9f5a335857ffaedb6b378625
Parents: ced7d77
Author: cmueller <cmueller@apache.org>
Authored: Thu Jun 27 23:50:21 2013 +0200
Committer: cmueller <cmueller@apache.org>
Committed: Thu Jun 27 23:53:28 2013 +0200

----------------------------------------------------------------------
 .../org/apache/camel/component/aws/s3/AmazonS3ClientMock.java   | 5 +++--
 .../org/apache/camel/component/aws/sqs/AmazonSQSClientMock.java | 3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/6162e83d/components/camel-aws/src/test/java/org/apache/camel/component/aws/s3/AmazonS3ClientMock.java
----------------------------------------------------------------------
diff --git a/components/camel-aws/src/test/java/org/apache/camel/component/aws/s3/AmazonS3ClientMock.java
b/components/camel-aws/src/test/java/org/apache/camel/component/aws/s3/AmazonS3ClientMock.java
index c55b782..3ba8b55 100644
--- a/components/camel-aws/src/test/java/org/apache/camel/component/aws/s3/AmazonS3ClientMock.java
+++ b/components/camel-aws/src/test/java/org/apache/camel/component/aws/s3/AmazonS3ClientMock.java
@@ -22,6 +22,7 @@ import java.net.URL;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
+import java.util.concurrent.CopyOnWriteArrayList;
 
 import junit.framework.Assert;
 
@@ -77,8 +78,8 @@ import com.amazonaws.services.s3.model.VersionListing;
 
 public class AmazonS3ClientMock extends AmazonS3Client {
     
-    List<S3Object> objects = new ArrayList<S3Object>();
-    List<PutObjectRequest> putObjectRequests = new ArrayList<PutObjectRequest>();
+    List<S3Object> objects = new CopyOnWriteArrayList<S3Object>();
+    List<PutObjectRequest> putObjectRequests = new CopyOnWriteArrayList<PutObjectRequest>();
     
     private boolean nonExistingBucketCreated;
     

http://git-wip-us.apache.org/repos/asf/camel/blob/6162e83d/components/camel-aws/src/test/java/org/apache/camel/component/aws/sqs/AmazonSQSClientMock.java
----------------------------------------------------------------------
diff --git a/components/camel-aws/src/test/java/org/apache/camel/component/aws/sqs/AmazonSQSClientMock.java
b/components/camel-aws/src/test/java/org/apache/camel/component/aws/sqs/AmazonSQSClientMock.java
index 45fee49..ac0838f 100644
--- a/components/camel-aws/src/test/java/org/apache/camel/component/aws/sqs/AmazonSQSClientMock.java
+++ b/components/camel-aws/src/test/java/org/apache/camel/component/aws/sqs/AmazonSQSClientMock.java
@@ -22,6 +22,7 @@ import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.concurrent.CopyOnWriteArrayList;
 
 import com.amazonaws.AmazonClientException;
 import com.amazonaws.AmazonServiceException;
@@ -43,7 +44,7 @@ public class AmazonSQSClientMock extends AmazonSQSClient {
     
     List<Message> messages = new ArrayList<Message>();
     Map<String, Map<String, String>> queueAttributes = new HashMap<String,
Map<String, String>>();
-    List<ChangeMessageVisibilityRequest> changeMessageVisibilityRequests = new ArrayList<ChangeMessageVisibilityRequest>();
+    List<ChangeMessageVisibilityRequest> changeMessageVisibilityRequests = new CopyOnWriteArrayList<ChangeMessageVisibilityRequest>();
     
     public AmazonSQSClientMock() {
         super(new BasicAWSCredentials("myAccessKey", "mySecretKey"));


Mime
View raw message