Skip to content

Commit

Permalink
Altered boolean decode
Browse files Browse the repository at this point in the history
  • Loading branch information
svats0001 committed Nov 22, 2024
1 parent cc94d63 commit 9d05008
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public Boolean decode(ByteBuf value, MySqlReadableMetadata metadata, Class<?> ta
} else if (s.equalsIgnoreCase("N") || s.equalsIgnoreCase("no") ||
s.equalsIgnoreCase("F") || s.equalsIgnoreCase("false")) {
return createFromLong(0);
} else if (s.contains("e") || s.contains("E") || s.matches("-?\\d*\\.\\d*")) {
} else if (s.matches("-?\\d*\\.\\d*") || s.matches("-?\\d*\\.\\d+[eE]-?\\d+")) {
return createFromDouble(Double.parseDouble(s));
} else if (s.matches("-?\\d+")) {
if (!CodecUtils.isGreaterThanLongMax(s)) {
Expand Down

0 comments on commit 9d05008

Please sign in to comment.