Doc change on java.text.BreakIterator
- Since BreakIterator wraps its ICU4J peer, but the doc doesn't
mention any linkage to ICU4J, specify the behavior of ICU4J to
discourage modification on CharacterIterator after setText
Bug: 80456574
Test: m docs
Change-Id: If2564ca99911a1bb1470d80934f250b227fdf3b3
diff --git a/ojluni/src/main/java/java/text/BreakIterator.java b/ojluni/src/main/java/java/text/BreakIterator.java
index e9adafa..a875ec1 100644
--- a/ojluni/src/main/java/java/text/BreakIterator.java
+++ b/ojluni/src/main/java/java/text/BreakIterator.java
@@ -44,6 +44,7 @@
import java.util.Locale;
+// Android-changed: Discourage modification on CharacterIterator after setText. http://b/80456574
/**
* The <code>BreakIterator</code> class implements methods for finding
* the location of boundaries in text. Instances of <code>BreakIterator</code>
@@ -53,6 +54,10 @@
* <code>CharacterIterator</code>, and is thus able to scan text held
* by any object implementing that protocol. A <code>StringCharacterIterator</code>
* is used to scan <code>String</code> objects passed to <code>setText</code>.
+ * The <code>CharacterIterator</code> object must not be modified after having been
+ * passed to <code>setText</code>. If the text in the <code>CharacterIterator</code> object
+ * is changed, the caller must reset <code>BreakIterator</code> by calling
+ * <code>setText</code>.
*
* <p>
* You use the factory methods provided by this class to create