RFR: 8367237: Thread-Safety Usage Warning for java.text.Collator Classes [v2]

Justin Lu jlu at openjdk.org
Thu Sep 11 21:34:26 UTC 2025


On Thu, 11 Sep 2025 20:14:56 GMT, Naoto Sato <naoto at openjdk.org> wrote:

>> Justin Lu has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Doc updates reflecting Naoto's comments
>
> src/java.base/share/classes/java/text/Collator.java line 117:
> 
>> 115:  *
>> 116:  * @implNote Concurrent usage of {@code Collator} instances returned by the factory
>> 117:  * methods under the standard provider may lead to significant thread contention.
> 
> "under the standard provider" may not be clear enough. How about "instances returned from the JDK's built-in implementation, `RuleBasedCollator`" or similar?

OK, let me know what you think about the new wording. I want to emphasize that the factory methods (under the default provider) return such instances.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27233#discussion_r2342382050


More information about the core-libs-dev mailing list