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

DefaultStyledDocument.setCharacterAttributes accepts negative length

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 20
    • 11, 17, 19, 20
    • client-libs
    • b13
    • generic
    • generic

      DefaultStyledDocument.setCharacterAttributes() takes in length parameter which as per spec
      length - the length >= 0

      but in implementation, it only checks for
      if (length == 0) {
                  return;
              }

      It should be length < 0 as text length cannot be -ve.
      Also, need to check if length = 0 is valid or not.

            tr Tejesh R
            psadhukhan Prasanta Sadhukhan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: