Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8294008

Grapheme implementation of setText() throws IndexOutOfBoundsException

    XMLWordPrintable

Details

    • b16

    Description

      Some of the existing JCK tests are failing with IndexOutOfBoundsException
      during invocation of setText(StringCharacterIterator).

      Noticed that when setText() invoked with the StringCharacterIterator with the
      (https://download.java.net/java/early_access/jdk20/docs/api/java.base/java/text/StringCharacterIterator.html#%3Cinit%3E(java.lang.String,int,int,int)

      where 'begin' is > 0 the setText() throws IndexOutOfBoundsException.
      But, the values are valid.

      Please find the attached code snippet.

      sample output is -
      "java.lang.IndexOutOfBoundsException: Range [1, 5) out of bounds for length 4
      at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100)
      at "

      I see this could be a side effect of JDK-8292387

      For more details on JCK failures - https://bugs.openjdk.org/browse/JCK-7318139

      Attachments

        Issue Links

          Activity

            People

              naoto Naoto Sato
              kganapureddy Krushnareddy Ganapureddy
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: