Skip to content

Commit

Permalink
Trivial
Browse files Browse the repository at this point in the history
  • Loading branch information
safris committed Aug 13, 2024
1 parent 9d2fd40 commit cf672ba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion runtime/src/main/java/org/jsonx/AnyType.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ static t fromToken(final String token) {
if (Numbers.isNumber(token))
return numbers;

if (token.length() > 1 && token.charAt(0) == '"' && token.charAt(token.length() - 1) == '"')
final int len = token.length();
if (len > 1 && token.charAt(0) == '"' && token.charAt(len - 1) == '"')
return strings;

throw new UnsupportedOperationException("Unsupported token: " + token);
Expand Down

0 comments on commit cf672ba

Please sign in to comment.