[OLINGO-452] Fixed ConcurrentModificationException when using IBM JVM on 
WebSphere 8

Signed-off-by: Christian Amend <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/olingo-odata2/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata2/commit/b07ba0fa
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata2/tree/b07ba0fa
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata2/diff/b07ba0fa

Branch: refs/heads/Olingo-129_PocJpaDataStore
Commit: b07ba0fa62ad3160bb6d1cf972a9d2bfd4edaa8f
Parents: fd0f2eb
Author: Giacomo Pati <[email protected]>
Authored: Mon Oct 6 14:12:30 2014 +0200
Committer: Christian Amend <[email protected]>
Committed: Tue Oct 7 14:14:14 2014 +0200

----------------------------------------------------------------------
 .../jpa/processor/core/ODataJPAResponseBuilderDefault.java       | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/b07ba0fa/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/ODataJPAResponseBuilderDefault.java
----------------------------------------------------------------------
diff --git 
a/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/ODataJPAResponseBuilderDefault.java
 
b/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/ODataJPAResponseBuilderDefault.java
index e5ed19b..fc0653f 100644
--- 
a/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/ODataJPAResponseBuilderDefault.java
+++ 
b/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/ODataJPAResponseBuilderDefault.java
@@ -563,7 +563,9 @@ public final class ODataJPAResponseBuilderDefault 
implements ODataJPAResponseBui
           edmEntityList.subList(0, resultsView.getSkip()).clear();
         }
         if (resultsView.getTop() != null && resultsView.getTop() >= 0 && 
resultsView.getTop() < edmEntityList.size()) {
-          edmEntityList.retainAll(edmEntityList.subList(0, 
resultsView.getTop()));
+          final List<Map<String, Object>> edmEntitySubList =
+              new ArrayList<Map<String, Object>>(edmEntityList.subList(0, 
resultsView.getTop()));
+          edmEntityList.retainAll(edmEntitySubList);
         }
       }
     }// Inlinecount of None is handled by default - null

Reply via email to