Skip to content

Commit

Permalink
Merge pull request #460 from kennytv/fix/int-array
Browse files Browse the repository at this point in the history
Fix reading of explicit int array entries
  • Loading branch information
kashike authored Oct 2, 2021
2 parents dfe82da + 9a92231 commit 5fe6042
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -246,13 +246,15 @@ private BinaryTag scalar() {
BinaryTag result = null;
try {
switch (Character.toLowerCase(current)) { // try to read and return as a number
// case Tokens.TYPE_INTEGER: // handled below, ints are ~special~
case Tokens.TYPE_BYTE:
result = ByteBinaryTag.of(Byte.parseByte(builder.toString()));
break;
case Tokens.TYPE_SHORT:
result = ShortBinaryTag.of(Short.parseShort(builder.toString()));
break;
case Tokens.TYPE_INT:
result = IntBinaryTag.of(Integer.parseInt(builder.toString()));
break;
case Tokens.TYPE_LONG:
result = LongBinaryTag.of(Long.parseLong(builder.toString()));
break;
Expand Down

0 comments on commit 5fe6042

Please sign in to comment.