Skip to content

Commit

Permalink
fix unchecked cast warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
esaulpaugh committed Jun 14, 2019
1 parent d1bd2c1 commit f6d2711
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/com/esaulpaugh/headlong/abi/PackedDecoder.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private static Tuple decodeTopTuple(TupleType tupleType, byte[] buffer, int end)
case TYPE_CODE_BIG_INTEGER: idx -= type.byteLengthPacked(null); end = idx; decodeBigInteger((BigIntegerType) type, buffer, idx, elements, i); break;
case TYPE_CODE_BIG_DECIMAL: idx -= type.byteLengthPacked(null); end = idx; decodeBigDecimal((BigDecimalType) type, buffer, idx, elements, i); break;
case TYPE_CODE_ARRAY: {
final ArrayType arrayType = (ArrayType) type;
final ArrayType<? extends ABIType<?>, ?> arrayType = (ArrayType<? extends ABIType<?>, ?>) type;
end = idx = idx - (arrayType.elementType.byteLengthPacked(null) * arrayType.length);
idx -= decodeArrayDynamic(arrayType, buffer, idx, end, elements, i);
break;
Expand All @@ -92,7 +92,7 @@ private static Tuple decodeTopTuple(TupleType tupleType, byte[] buffer, int end)
case TYPE_CODE_LONG: idx += decodeLong((LongType) type, buffer, idx, elements, i); break;
case TYPE_CODE_BIG_INTEGER: idx += decodeBigInteger((BigIntegerType) type, buffer, idx, elements, i); break;
case TYPE_CODE_BIG_DECIMAL: idx += decodeBigDecimal((BigDecimalType) type, buffer, idx, elements, i); break;
case TYPE_CODE_ARRAY: idx += decodeArrayDynamic((ArrayType) type, buffer, idx, end, elements, i); break;
case TYPE_CODE_ARRAY: idx += decodeArrayDynamic((ArrayType<? extends ABIType<?>, ?>) type, buffer, idx, end, elements, i); break;
case TYPE_CODE_TUPLE: throw new UnsupportedOperationException("nested tuple"); // idx += decodeTupleDynamic((TupleType) type, buffer, idx, end, elements, i); break;
}
}
Expand All @@ -118,7 +118,7 @@ private static Tuple decodeTupleStatic(TupleType tupleType, byte[] buffer) {
case TYPE_CODE_LONG: idx += decodeLong((LongType) type, buffer, idx, elements, i); break;
case TYPE_CODE_BIG_INTEGER: idx += decodeBigInteger((BigIntegerType) type, buffer, idx, elements, i); break;
case TYPE_CODE_BIG_DECIMAL: idx += decodeBigDecimal((BigDecimalType) type, buffer, idx, elements, i); break;
case TYPE_CODE_ARRAY: idx += decodeArrayDynamic((ArrayType) type, buffer, idx, end, elements, i); break;
case TYPE_CODE_ARRAY: idx += decodeArrayDynamic((ArrayType<? extends ABIType<?>, ?>) type, buffer, idx, end, elements, i); break;
case TYPE_CODE_TUPLE: throw new UnsupportedOperationException("nested tuple"); // idx += decodeTupleDynamic((TupleType) type, buffer, idx, end, elements, i); break;
}
}
Expand Down

0 comments on commit f6d2711

Please sign in to comment.