From 147514904c5c70b448cb186c098954bb639a2c18 Mon Sep 17 00:00:00 2001 From: sendaoYan Date: Sat, 9 Mar 2024 21:14:27 +0800 Subject: [PATCH] update the Locale.US code comment Signed-off-by: sendaoYan --- test/jdk/java/util/Properties/PropertiesStoreTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/jdk/java/util/Properties/PropertiesStoreTest.java b/test/jdk/java/util/Properties/PropertiesStoreTest.java index 1041271ae818c..b5a5b5a45aa09 100644 --- a/test/jdk/java/util/Properties/PropertiesStoreTest.java +++ b/test/jdk/java/util/Properties/PropertiesStoreTest.java @@ -55,6 +55,8 @@ public class PropertiesStoreTest { private static final String DATE_FORMAT_PATTERN = "EEE MMM dd HH:mm:ss zzz uuuu"; + // use Locale.US, since when the date comment was written by Properties.store(...), + // it internally calls the Date.toString() which uses Locale.US for time zone names private static final DateTimeFormatter FORMATTER = DateTimeFormatter.ofPattern(DATE_FORMAT_PATTERN, Locale.US); private static final Locale PREV_LOCALE = Locale.getDefault();