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

TextMeasurer/delete function fails when deleting more than one characters.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 5.0
    • Fix Version/s: None
    • Component/s: client-libs
    • Labels:
      None
    • Subcomponent:
      2d
    • CPU:
      sparc
    • OS:
      solaris_9

      Description

      tested java version:
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta3-b56)

      TextMeasurer delete function will get exception if you try to delete more than one characters.

      Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
              at java.lang.System.arraycopy(Native Method)
              at java.awt.font.TextMeasurer.deleteChar(TextMeasurer.java:721)
              at TextMeasureDeleteTest.main(TextMeasureDeleteTest.java:31)

      It seems that source array index was set wrong if the deleted characters > 1.

      See attached test case.

      Sorry about it. I was getting bugtraq error, and try to resent the bug.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jwangsunw Jane Wang (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: