From f3c173818c9dbe6cae65df754c09658aca26e452 Mon Sep 17 00:00:00 2001 From: ZhouXY108 Date: Wed, 27 May 2026 11:16:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=8F=8C=E7=B2=BE?= =?UTF-8?q?=E5=BA=A6=E6=95=B0=E5=80=BC=E9=AA=8C=E8=AF=81=E5=99=A8=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E6=A0=BC=E5=BC=8F=E5=8C=96=E5=AD=97=E7=AC=A6=E4=B8=B2?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zhouxy/plusone/validator/DoublePropertyValidator.java | 8 ++++---- .../example/validator/DoublePropertyValidatorTests.java | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/plusone-validator/src/main/java/xyz/zhouxy/plusone/validator/DoublePropertyValidator.java b/plusone-validator/src/main/java/xyz/zhouxy/plusone/validator/DoublePropertyValidator.java index d3b6966..337c7ed 100644 --- a/plusone-validator/src/main/java/xyz/zhouxy/plusone/validator/DoublePropertyValidator.java +++ b/plusone-validator/src/main/java/xyz/zhouxy/plusone/validator/DoublePropertyValidator.java @@ -48,7 +48,7 @@ public class DoublePropertyValidator */ public final DoublePropertyValidator gt(final double min) { return withRule(Conditions.greaterThan(min), - "The input must be greater than '%s'.", min); + "The input must be greater than '%f'.", min); } /** @@ -105,7 +105,7 @@ public class DoublePropertyValidator */ public final DoublePropertyValidator ge(final double min) { return withRule(Conditions.greaterThanOrEqualTo(min), - "The input must be greater than or equal to '%s'.", min); + "The input must be greater than or equal to '%f'.", min); } /** @@ -162,7 +162,7 @@ public class DoublePropertyValidator */ public final DoublePropertyValidator lt(final double max) { return withRule(Conditions.lessThan(max), - "The input must be less than '%s'.", max); + "The input must be less than '%f'.", max); } /** @@ -219,7 +219,7 @@ public class DoublePropertyValidator */ public final DoublePropertyValidator le(final double max) { return withRule(Conditions.lessThanOrEqualTo(max), - "The input must be less than or equal to '%s'.", max); + "The input must be less than or equal to '%f'.", max); } /** diff --git a/plusone-validator/src/test/java/xyz/zhouxy/plusone/example/validator/DoublePropertyValidatorTests.java b/plusone-validator/src/test/java/xyz/zhouxy/plusone/example/validator/DoublePropertyValidatorTests.java index 0d4c426..7c4ee43 100644 --- a/plusone-validator/src/test/java/xyz/zhouxy/plusone/example/validator/DoublePropertyValidatorTests.java +++ b/plusone-validator/src/test/java/xyz/zhouxy/plusone/example/validator/DoublePropertyValidatorTests.java @@ -87,7 +87,7 @@ public class DoublePropertyValidatorTests { ValidationException e = assertThrows( ValidationException.class, () -> validator.validate(command)); - assertEquals(String.format("The input must be greater than '%s'.", MIN), e.getMessage()); + assertEquals(String.format("The input must be greater than '%f'.", MIN), e.getMessage()); } @ParameterizedTest @@ -196,7 +196,7 @@ public class DoublePropertyValidatorTests { ValidationException e = assertThrows( ValidationException.class, () -> validator.validate(command)); - assertEquals(String.format("The input must be greater than or equal to '%s'.", MIN), e.getMessage()); + assertEquals(String.format("The input must be greater than or equal to '%f'.", MIN), e.getMessage()); } @ParameterizedTest @@ -305,7 +305,7 @@ public class DoublePropertyValidatorTests { ValidationException e = assertThrows( ValidationException.class, () -> validator.validate(command)); - assertEquals(String.format("The input must be less than '%s'.", MAX), e.getMessage()); + assertEquals(String.format("The input must be less than '%f'.", MAX), e.getMessage()); } @ParameterizedTest @@ -414,7 +414,7 @@ public class DoublePropertyValidatorTests { ValidationException e = assertThrows( ValidationException.class, () -> validator.validate(command)); - assertEquals(String.format("The input must be less than or equal to '%s'.", MAX), e.getMessage()); + assertEquals(String.format("The input must be less than or equal to '%f'.", MAX), e.getMessage()); } @ParameterizedTest