From 408987e1ca9a42db8019b1bd7e52f85607975dde Mon Sep 17 00:00:00 2001 From: Aleksey Shipilev Date: Mon, 31 Jul 2023 08:35:31 +0000 Subject: [PATCH] 8313307: java/util/Formatter/Padding.java fails on some Locales Reviewed-by: jlu, naoto --- test/jdk/java/util/Formatter/Padding.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/jdk/java/util/Formatter/Padding.java b/test/jdk/java/util/Formatter/Padding.java index 982b6967928..5f0e7f0e201 100644 --- a/test/jdk/java/util/Formatter/Padding.java +++ b/test/jdk/java/util/Formatter/Padding.java @@ -29,6 +29,8 @@ * @run junit Padding */ +import java.util.Locale; + import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -307,7 +309,7 @@ public class Padding { @ParameterizedTest @MethodSource void padding(String expected, String format, Object value) { - assertEquals(expected, String.format(format, value)); + assertEquals(expected, String.format(Locale.US, format, value)); } }