RFR: 8354522: Clones of DecimalFormat cause interferences when used concurrently [v4]

Naoto Sato naoto at openjdk.org
Tue Apr 15 21:43:41 UTC 2025


On Tue, 15 Apr 2025 21:34:21 GMT, Johannes Graham <duke at openjdk.org> wrote:

>> test/jdk/java/text/Format/DecimalFormat/CloneTest.java line 77:
>> 
>>> 75:                             String str = String.valueOf(value);
>>> 76:                             if (!str.equals(dfString)) {
>>> 77:                                 mismatchCount.getAndIncrement();
>> 
>> `mismatchCount` is no longer needed. Simply break after printing the error message would suffice.
>
> It would still need something to indicate that it had failed, as well as a way to signal other threads that they should terminate early. Worth changing to an AtomicBoolean?

Ah, ok then. Thanks.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/24598#discussion_r2045580939


More information about the core-libs-dev mailing list