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

Justin Lu jlu at openjdk.org
Thu Aug 31 21:45:46 UTC 2023


On Thu, 24 Aug 2023 21:39:39 GMT, Justin Lu <jlu at openjdk.org> wrote:

> 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("")).

This pull request has now been integrated.

Changeset: d5973bdb
Author:    Justin Lu <jlu at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/d5973bdb986a1dd823b6a761ff719de005c549f6
Stats:     4 lines in 1 file changed: 3 ins; 0 del; 1 mod

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

Reviewed-by: naoto

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

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


More information about the core-libs-dev mailing list