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

Open java/awt/font/Gurmukhi/TestGurmukhi.java

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 11, 21, 24, 25
    • client-libs
    • 2d

      The java/awt/font/Gurmukhi/TestGurmukhi.java test is an automatic test for JDK-5004101 which can be open-sourced.

      The test commented out code for displaying Gurmukhi text in a JTextArea.

      It proves displaying the text isn't necessary, creating a TextLayout and getting TextHitInfo is enough to reproduce the original bug JDK-5004101.


      The above is confirmed by running the TestGurmukhi.java test with JDK 5.0 beta-b32c:
      Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 186
              at sun.font.ExtendedTextSourceLabel.caretAtOffsetIsValid(ExtendedTextSourceLabel.java:446)
              at java.awt.font.TextLine.caretAtOffsetIsValid(TextLine.java:498)
              at java.awt.font.TextLayout.hitTestChar(TextLayout.java:2552)
              at java.awt.font.TextLayout.hitTestChar(TextLayout.java:2611)
              at TestGurmukhi.main(TestGurmukhi.java:53)

            abhiscxk Abhishek Kumar
            aivanov Alexey Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: