Specification of java.text.BreakIterator class doesn't describe most methods behaviour before method setText(String) or setText(CharacterIterator) is called.
example:
int value = BreakIterator.getWordInstance().next();
What is result of such call? (exception, 0 or something else)
You may do either:
- specify on the class level, that all static methods returning BreakIterator creates an instance initialized by empty string
or
- in every abstract method specify its reaction on "text isn't set" situation
or something else.
example:
int value = BreakIterator.getWordInstance().next();
What is result of such call? (exception, 0 or something else)
You may do either:
- specify on the class level, that all static methods returning BreakIterator creates an instance initialized by empty string
or
- in every abstract method specify its reaction on "text isn't set" situation
or something else.
- csr for
-
JDK-8314974 [BI] Doc: java.text.BreakIterator class specification is unclear
- Closed