treat second and subsequent occurrence calls for the same value as no op (to avoid (de)serialization problems for duplicates like WEB-20651)

This commit is contained in:
Maxim.Mossienko
2016-03-12 16:57:00 +01:00
parent b7f60ef0e0
commit 3dc414981e
@@ -124,6 +124,10 @@ public class ObjectStubTree<T extends Stub> {
} else {
int lastZero;
for(lastZero = list.length - 1; lastZero >=0 && list[lastZero] == 0; --lastZero);
if (list[lastZero] == myStubIdx) {
// second and subsequent occurrence calls for the same value are no op
return;
}
++lastZero;
if (lastZero == list.length) {