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

Naoto Sato naoto at openjdk.org
Tue Apr 15 19:20:40 UTC 2025


On Tue, 15 Apr 2025 18:35:17 GMT, Johannes Graham <duke at openjdk.org> wrote:

>> test/jdk/java/text/Format/DecimalFormat/CloneTest.java line 54:
>> 
>>> 52:                 DecimalFormat threadDf = (DecimalFormat) df.clone();
>>> 53:                 Runnable task = () -> {
>>> 54:                     for (int j = 0; j < 1000000; j++) {
>> 
>> We should probably make this test less costly by decreasing some values, I don't the bug requires that many iterations to be exposed. (Without the fix and the `break` statement in the test, `mismatchCount` gets up into the tens of thousands on my machine.)
>
> For the original reproducer I wanted to be _really_ sure that it failed. I've reduced it to be more reasonable. With the current config it still gets 10-100 mismatches for me. I've limited the number of lines that get logged as well.

If a mismatch is found, I think we can stop there and report error

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

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


More information about the core-libs-dev mailing list