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

(str) String.trim should have note referring to String.strip

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • None
    • core-libs

      The trim() method uses an unusual and dated definition of spaces to trim, whereas the strip() family of methods on String uses the modern, Unicode-based definition of whitespace.

      There should be a note in the trim() method specification that refers people to the strip() family of methods. The lack of such a note may lead to bugs such as JDK-8328175 which requests methods that already exit.

            smarks Stuart Marks
            smarks Stuart Marks
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: