Skip to content

Commit

Permalink
8327486: java/util/Properties/PropertiesStoreTest.java fails "Text 'x…
Browse files Browse the repository at this point in the history
…xx' could not be parsed at index 20" after 8174269

Backport-of: e21da4caacb464827270d20b8fc62a50a1706316
  • Loading branch information
GoeLin committed Apr 22, 2024
1 parent 667513a commit d19b1a4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/jdk/java/util/Properties/PropertiesStoreTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -55,9 +55,9 @@
public class PropertiesStoreTest {

private static final String DATE_FORMAT_PATTERN = "EEE MMM dd HH:mm:ss zzz uuuu";
// use a neutral locale, since when the date comment was written by Properties.store(...),
// it internally calls the Date.toString() which always writes in a locale insensitive manner
private static final DateTimeFormatter FORMATTER = DateTimeFormatter.ofPattern(DATE_FORMAT_PATTERN, Locale.ROOT);
// 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();

@DataProvider(name = "propsProvider")
Expand Down

1 comment on commit d19b1a4

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.