From 9d050080ce552c283678e78ec7b3db0e51914d90 Mon Sep 17 00:00:00 2001 From: Ram Sin Date: Fri, 22 Nov 2024 20:09:09 +1100 Subject: [PATCH] Altered boolean decode --- .../main/java/io/asyncer/r2dbc/mysql/codec/BooleanCodec.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/BooleanCodec.java b/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/BooleanCodec.java index 877fb4ca..07978ac6 100644 --- a/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/BooleanCodec.java +++ b/r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/codec/BooleanCodec.java @@ -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)) {