@Test
public void xx() {
ListTag<Tag> l = new ListTag<>()
.addTag(new StringTag("1"))
.addTag(new StringTag("1"))
.addTag(new StringTag("1"))
.addTag(new StringTag("1"))
.addTag(new StringTag("1"))
.addTag(new StringTag("1"))
.addTag(new StringTag("1"))
.addTag(new StringTag("1"))
.addTag(new StringTag("1"))
.addTag(new StringTag("1"))
.addTag(new StringTag("1"))
.addTag(new StringTag("1"))
;
Tag tag = l.stream().findFirst().orElseThrow();
l.removeTag(tag);
}
arraycopy: last source index 13 out of bounds for object array[12]
java.lang.ArrayIndexOutOfBoundsException: arraycopy: last source index 13 out of bounds for object array[12]
at java.base/java.lang.System.arraycopy(Native Method)
at org.glavo.nbt.tag.ParentTag.removeTagFromArray(ParentTag.java:98)
at org.glavo.nbt.tag.ListTag.removeTagAt(ListTag.java:191)
at org.glavo.nbt.tag.ParentTag.removeAt(ParentTag.java:215)
at org.glavo.nbt.tag.ParentTag.removeTag(ParentTag.java:240)
at org.glavo.nbt.TestNBTPath.xx(TestNBTPath.java:80)
Any remove operation including removeAt, removeTag, etc, throws exception when the size is n*12.
Any remove operation including
removeAt,removeTag, etc, throws exception when the size isn*12.