summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--android_icu4j/src/main/java/android/icu/text/BreakIterator.java5
-rw-r--r--icu4j/main/classes/core/src/com/ibm/icu/text/BreakIterator.java5
2 files changed, 8 insertions, 2 deletions
diff --git a/android_icu4j/src/main/java/android/icu/text/BreakIterator.java b/android_icu4j/src/main/java/android/icu/text/BreakIterator.java
index 3e391f672..8a3c9db63 100644
--- a/android_icu4j/src/main/java/android/icu/text/BreakIterator.java
+++ b/android_icu4j/src/main/java/android/icu/text/BreakIterator.java
@@ -82,7 +82,10 @@ import android.icu.util.ULocale;
*
* BreakIterator accesses the text it analyzes through a CharacterIterator, which makes
* it possible to use BreakIterator to analyze text in any text-storage vehicle that
- * provides a CharacterIterator interface.
+ * provides a CharacterIterator interface. When BreakIterator.setText(CharacterIterator) or
+ * getText() was called, the CharacterIterator must not be modified, or else the BreakIterator
+ * behavior is undefined. In particular, call BreakIterator.setText(),
+ * not CharacterIterator.setText().
*
* <b>Note:</b> Some types of BreakIterator can take a long time to create, and
* instances of BreakIterator are not currently cached by the system. For
diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/BreakIterator.java b/icu4j/main/classes/core/src/com/ibm/icu/text/BreakIterator.java
index 451b8c0ea..a458ad354 100644
--- a/icu4j/main/classes/core/src/com/ibm/icu/text/BreakIterator.java
+++ b/icu4j/main/classes/core/src/com/ibm/icu/text/BreakIterator.java
@@ -81,7 +81,10 @@ import com.ibm.icu.util.ULocale;
*
* BreakIterator accesses the text it analyzes through a CharacterIterator, which makes
* it possible to use BreakIterator to analyze text in any text-storage vehicle that
- * provides a CharacterIterator interface.
+ * provides a CharacterIterator interface. When BreakIterator.setText(CharacterIterator) or
+ * getText() was called, the CharacterIterator must not be modified, or else the BreakIterator
+ * behavior is undefined. In particular, call BreakIterator.setText(),
+ * not CharacterIterator.setText().
*
* <b>Note:</b> Some types of BreakIterator can take a long time to create, and
* instances of BreakIterator are not currently cached by the system. For