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:
parent
43386905fd
commit
395ac99511
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user