RFR: 6333341: [BI] Doc: java.text.BreakIterator class specification is unclear [v2]

Justin Lu jlu at openjdk.org
Tue Aug 29 20:09:37 UTC 2023


> Please review this PR and [CSR ](https://bugs.openjdk.org/browse/JDK-8314974)which clarifies behavior for BreakIterator instances when text has not been set.
> 
> For example,  calling `BreakIterator.getWordInstance().next();` has an ambiguous result.
> A boundary searching operation was called but no text was supplied. Is the result an exception, 0, -1 (BreakIterator.DONE), or something else? In reality, the operation will be performed on any empty string.
> 
> 
> This change makes it apparent that failing to set the text will cause the BreakIterator instance to default to a `StringCharacterIterator` with an empty string (equivalent to calling setText("")).

Justin Lu has updated the pull request incrementally with one additional commit since the last revision:

  Use implNote tag

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/15422/files
  - new: https://git.openjdk.org/jdk/pull/15422/files/4f260622..e842dd8f

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=15422&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15422&range=00-01

  Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/15422.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/15422/head:pull/15422

PR: https://git.openjdk.org/jdk/pull/15422


More information about the core-libs-dev mailing list