Skip to content

Commit e21da4c

Browse files
SendaoYanDamonFool
authored andcommitted
8327486: java/util/Properties/PropertiesStoreTest.java fails "Text 'xxx' could not be parsed at index 20" after 8174269
Reviewed-by: naoto
1 parent 4d6235e commit e21da4c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/jdk/java/util/Properties/PropertiesStoreTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -55,9 +55,9 @@
5555
public class PropertiesStoreTest {
5656

5757
private static final String DATE_FORMAT_PATTERN = "EEE MMM dd HH:mm:ss zzz uuuu";
58-
// use a neutral locale, since when the date comment was written by Properties.store(...),
59-
// it internally calls the Date.toString() which always writes in a locale insensitive manner
60-
private static final DateTimeFormatter FORMATTER = DateTimeFormatter.ofPattern(DATE_FORMAT_PATTERN, Locale.ROOT);
58+
// use Locale.US, since when the date comment was written by Properties.store(...),
59+
// it internally calls the Date.toString() which uses Locale.US for time zone names
60+
private static final DateTimeFormatter FORMATTER = DateTimeFormatter.ofPattern(DATE_FORMAT_PATTERN, Locale.US);
6161
private static final Locale PREV_LOCALE = Locale.getDefault();
6262

6363
@DataProvider(name = "propsProvider")

0 commit comments

Comments
 (0)