Skip to content

Commit

Permalink
minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
esaulpaugh committed Sep 19, 2024
1 parent 2cfb2ad commit 294e851
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/esaulpaugh/headlong/abi/ABIJSON.java
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ private static ContractError<?> parseErrorUnchecked(JsonObject error, int flags)
}

private static TupleType<Tuple> parseTupleType(final JsonArray array, final boolean[] indexed, final int flags) {
int size;
final int size;
if (array == null || (size = array.size()) == 0) { /* JsonArray.isEmpty requires gson v2.8.7 */
return TupleType.empty(flags);
}
Expand All @@ -213,7 +213,7 @@ private static TupleType<Tuple> parseTupleType(final JsonArray array, final bool
if (indexed != null) {
indexed[i] = getIndexed(inputObj);
}
if (++i == elements.length) {
if (++i == size) {
return new TupleType<>(
canonicalType.append(')').toString(),
dynamic,
Expand Down

0 comments on commit 294e851

Please sign in to comment.