Skip to content

Commit

Permalink
make ArrayType.DYNAMIC_LENGTH public; update test;
Browse files Browse the repository at this point in the history
  • Loading branch information
esaulpaugh committed Oct 20, 2020
1 parent 9ef86b4 commit c315e49
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/esaulpaugh/headlong/abi/ArrayType.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public final class ArrayType<E extends ABIType<?>, J> extends ABIType<J> {

private static final int ARRAY_LENGTH_BYTES = UNIT_LENGTH_BYTES;

static final int DYNAMIC_LENGTH = -1;
public static final int DYNAMIC_LENGTH = -1;

private final boolean isString;
final E elementType;
Expand Down
3 changes: 2 additions & 1 deletion src/test/java/com/esaulpaugh/headlong/abi/DecodeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,9 @@ public void testStringArray() {
final ABIType<String[]> type = TypeFactory.create("string[]", String[].class, "nam");
final ABIType<Object> x = TypeFactory.create("string[]");
final ABIType<?> x2 = TypeFactory.create("string[]");
final ArrayType<ArrayType<ByteType, String>, String[]> arrayType = (ArrayType<ArrayType<ByteType, String>, String[]>) type;

assertEquals("nam", type.getName());
assertEquals("nam", arrayType.getName());

System.out.println(x + " " + x2);

Expand Down

0 comments on commit c315e49

Please sign in to comment.