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

DefaultStyledDocument.setCharacterAttributes accepts negative length

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: