Skip to content

Commit

Permalink
Fix ConcurrentModificationException in BatchFetchPolicy
Browse files Browse the repository at this point in the history
Fixes #1506 . This change will fix the ConcurrentModificationException of the attributeExpression list, when running the same (batch)query with different entity managers.

Signed-off-by: Radek Felcman <radek.felcman@oracle.com>
  • Loading branch information
rfelcman authored and lukasj committed Oct 4, 2022
1 parent ae4203c commit 7079fdc
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ public BatchFetchPolicy clone() {
dataResults.put(clone, list);
}
clone.setDataResults(dataResults);
if(this.attributeExpressions != null) {
clone.attributeExpressions = new ArrayList<>(this.attributeExpressions);
}
return clone;
}

Expand Down

0 comments on commit 7079fdc

Please sign in to comment.