On Mon, 12 May 2025 23:24:03 GMT, Justin Lu <j...@openjdk.org> wrote:
>> Abhishek N has updated the pull request incrementally with one additional >> commit since the last revision: >> >> correcting jtreg header order, add meaningful comments for each test >> methods and properties file > > Hi @abhn-git, I think it would be beneficial if we first addressed the > concerns raised before continuing work on this PR. > [JDK-8355393](https://bugs.openjdk.org/browse/JDK-8355393) assigned to you > and [JDK-8355045](https://bugs.openjdk.org/browse/JDK-8355045) assigned to > @weibxiao appear to be duplicates. Hi @justin-curtis-lu @weibxiao The main cause for failure in https://bugs.openjdk.org/browse/JDK-8353433 is that "currency cut-over date functionality was broken for the Currency.getInstance(String currencyCode, int defaultFractionDigits, int numericCode)" call and the currency 8u code threw illegalArguementException for new Currency after cut-over time was passed by System. Example: "CW=ANG;2025-04-01-04-00-00;XCG" -> After System time passed 1st April 2025 4:00 am, Currency.getInstance(XCG) -> throw illegalArguementException Please note the issue could not be caught earlier and was caught only after System time passed the cut over time. So to prevent such miss in future, we have to write tests to check that after System time has passed cut over time the expected new currency instance is returned by both Currency.getInstance methods. This can be achieved by two ways 1. To mock System time to be after cut over time and see if Currency.getInstance is working as expected. 2. **To perform Currency overriding mechanism via the system property, where a modified currencies.properties file is set and it has entries for currencies whose cut over time is passed. And we write tests to verify both Currency.getInstance() methods and it has to return values as required.** The test written in this PR does option 2 Example: In our modified currencies.properties file we have below entry SX=ANG,532,2,2025-04-22T00:00:00 So, the test code ensures that since System time is past the cut over time the Currency.getInstance(new Locale("SX")) and Currency.getInstance("ANG") should return values as expected (expected values are in CurrencyList.txt). And if new currencies are added in future with cut over timeconditions it should work properly once the System time passes cut over time ,provided our test in above PR is Passing. The test written in this PR does option 2. and works fine for all the release. @justin-curtis-lu @weibxiao please let me know if there are any issues with this test fix. thank you ------------- PR Comment: https://git.openjdk.org/jdk/pull/25057#issuecomment-2883930487