File tree Expand file tree Collapse file tree 2 files changed +13
-7
lines changed
src/java.base/share/classes/java/text Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change 111111 * <br>
112112 * @apiNote {@code CollationKey}s from different
113113 * {@code Collator}s can not be compared. See the class description
114- * for {@link CollationKey}
115- * for an example using {@code CollationKey}s.
114+ * for {@link CollationKey} for an example using {@code CollationKey}s.
115+ *
116+ * @implNote Significant thread contention may occur during concurrent usage
117+ * of the JDK Reference Implementation's {@link RuleBasedCollator}, which is the
118+ * subtype returned by the default provider of the {@link #getInstance()} factory
119+ * methods. As such, users should consider retrieving a separate instance for
120+ * each thread when used in multithreaded environments.
116121 *
117122 * @see RuleBasedCollator
118123 * @see CollationKey
Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 1997, 2024 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 1997, 2025 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
3838
3939package java .text ;
4040
41- import java .text .Normalizer ;
42- import java .util .Vector ;
43- import java .util .Locale ;
44-
4541/**
4642 * The {@code RuleBasedCollator} class is a concrete subclass of
4743 * {@code Collator} that provides a simple, data-driven, table
239235 * </pre>
240236 * </blockquote>
241237 *
238+ * @implNote For this implementation, concurrent usage of this class may
239+ * lead to significant thread contention since {@code synchronized} is employed
240+ * to ensure thread-safety. As such, users of this class should consider creating
241+ * a separate instance for each thread when used in multithreaded environments.
242+ *
242243 * @see Collator
243244 * @see CollationElementIterator
244245 * @author Helena Shih, Laura Werner, Richard Gillam
You can’t perform that action at this time.
0 commit comments