Skip to content

Commit

Permalink
minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
esaulpaugh committed Aug 30, 2024
1 parent b13150a commit 4fa4bea
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/main/java/com/esaulpaugh/headlong/abi/TypeFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,7 @@ private TypeFactory() {}
ABIType<?> value = e.getValue();
if (value instanceof ArrayType) {
final ArrayType<?, ?, ?> at = value.asArrayType();
if (at.isString()) {
value = new ArrayType<ByteType, Byte, String>("string", STRING_CLASS, ByteType.INSTANCE, DYNAMIC_LENGTH, STRING_ARRAY_CLASS, ABIType.FLAG_LEGACY_DECODE);
} else {
value = new ArrayType<ByteType, Byte, byte[]>(at.canonicalType, byte[].class, ByteType.INSTANCE, at.getLength(), byte[][].class, ABIType.FLAG_LEGACY_DECODE);
}
value = new ArrayType<>(at.canonicalType, at.clazz, ByteType.INSTANCE, at.getLength(), at.arrayClass(), ABIType.FLAG_LEGACY_DECODE);
}
localLegacy.put(e.getKey(), value);
}
Expand Down

0 comments on commit 4fa4bea

Please sign in to comment.