mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-08 17:38:38 +00:00
8072626: Test for JDK-8068872 fails in tip
Reviewed-by: lagergren, jlaskey
This commit is contained in:
parent
0e498bf1aa
commit
3f9c2f13ee
@ -232,12 +232,13 @@ public class JSONParser {
|
||||
final long oldLength = arrayData.length();
|
||||
final long longIndex = ArrayIndex.toLongIndex(index);
|
||||
ArrayData newArrayData = arrayData;
|
||||
if (longIndex > oldLength) {
|
||||
if (arrayData.canDelete(oldLength, longIndex - 1, false)) {
|
||||
if (longIndex >= oldLength) {
|
||||
newArrayData = newArrayData.ensure(longIndex);
|
||||
if (longIndex > oldLength) {
|
||||
newArrayData = newArrayData.delete(oldLength, longIndex - 1);
|
||||
}
|
||||
}
|
||||
return newArrayData.ensure(longIndex).set(index, value, false);
|
||||
return newArrayData.set(index, value, false);
|
||||
}
|
||||
|
||||
private static PropertyMap addObjectProperty(final PropertyMap propertyMap, final List<Object> values,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user