<i18n dev> RFR: 8294008: Graphme implementation of setText() throws IndexOutOfBoundsException

Joe Wang joehw at openjdk.org
Mon Sep 19 20:49:48 UTC 2022


On Mon, 19 Sep 2022 19:01:57 GMT, Naoto Sato <naoto at openjdk.org> wrote:

> Fixing JCK failures caused by the new grapheme implementation. The length of a CharSequence should return the `endIndex`, not `endIndex - beginIndex`.

src/java.base/share/classes/sun/util/locale/provider/BreakIteratorProviderImpl.java line 329:

> 327:         @Override
> 328:         public int length() {
> 329:             return src.getEndIndex();

Could the issue be somewhere else?  I mean it feels correct for length = endIndex - beginIndex.

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

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


More information about the i18n-dev mailing list