refactor(ObjectReaderCreatorASM JSONReader): Remove redundant comma checks

Removed redundant calls to `nextIfComma()` in various parts of `ObjectReaderCreatorASM` and `JSONReader`, improving readability and reducing unnecessary method invocations.
This commit is contained in:
wenshao 2025-02-24 07:27:55 +08:00
parent 43386905fd
commit 395ac99511
2 changed files with 0 additions and 24 deletions

View File

@ -1070,7 +1070,6 @@ public abstract class JSONReader
values[size++] = readInt64Value();
}
nextIfComma();
long[] array;
if (size == values.length) {
@ -1912,7 +1911,6 @@ public abstract class JSONReader
values[size++] = readString();
}
nextIfComma();
if (values.length == size) {
return values;

View File

@ -1850,10 +1850,6 @@ public class ObjectReaderCreatorASM
mw.visitLabel(end_);
mw.aload(JSON_READER);
mw.invokevirtual(TYPE_JSON_READER, "nextIfComma", "()Z");
mw.pop();
mw.aload(OBJECT);
mw.areturn();
@ -3067,12 +3063,6 @@ public class ObjectReaderCreatorASM
}
mw.visitLabel(endObject_);
if (!jsonb) {
mw.aload(JSON_READER);
mw.invokevirtual(TYPE_JSON_READER, "nextIfComma", "()Z");
mw.pop();
}
}
if (field != null) {
@ -3835,24 +3825,12 @@ public class ObjectReaderCreatorASM
mw.invokeinterface("java/util/List", "add", "(Ljava/lang/Object;)Z");
mw.pop();
if (!jsonb) {
mw.aload(JSON_READER);
mw.invokevirtual(TYPE_JSON_READER, "nextIfComma", "()Z");
mw.pop();
}
mw.visitLabel(for_inc_j_);
mw.visitIincInsn(J, 1);
mw.goto_(for_start_j_);
mw.visitLabel(for_end_j_);
if (!jsonb) {
mw.aload(JSON_READER);
mw.invokevirtual(TYPE_JSON_READER, "nextIfComma", "()Z");
mw.pop();
}
mw.visitLabel(loadList_);
mw.aload(LIST);
return varIndex;