mirror of https://github.com/apache/openjpa.git
proxy collection optimization for adding to the end of a list vs. adding elsewhere
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@610922 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0d3bc96fcb
commit
2933147f53
|
@ -38,7 +38,11 @@ public class ProxyCollections
|
||||||
*/
|
*/
|
||||||
public static void beforeAdd(ProxyCollection coll, int index, Object value){
|
public static void beforeAdd(ProxyCollection coll, int index, Object value){
|
||||||
assertAllowedType(value, coll.getElementType());
|
assertAllowedType(value, coll.getElementType());
|
||||||
dirty(coll, true);
|
if (index == coll.size())
|
||||||
|
// optimize for adding to the end
|
||||||
|
beforeAdd(coll, value);
|
||||||
|
else
|
||||||
|
dirty(coll, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue