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

DefaultStyledDocument.split(int, int) can create an empty element.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.4.0
    • client-libs
    • None
    • beta2
    • generic
    • generic

      Run the attached test program. Put focus on the JTextPane and then click the "Set Attributes" button. This will attempt to set character attributes on the last line "text", including the implied line break at the end. Now click the "Dump" button. Notice that there is an extra element (ie. [18,18][]). This is a bug, there should not be an empty element. The extra element is being created in the DefaultStyledDocument.split(int, int) method.

            shickeysunw Shannon Hickey (Inactive)
            shickeysunw Shannon Hickey (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: