Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8215401 Add isEmpty default method to CharSequence
  3. JDK-8251953

Release Note: Added isEmpty Default Method to CharSequence

    XMLWordPrintable

    Details

      Description

      `java.lang.CharSequence` has been updated in this release to define a default `isEmpty` method that tests if a character sequence is empty. Testing for, and filtering out, empty `String`s and other `CharSequence`s is a common occurrence in code and `CharSequence::isEmpty` can be used as a method reference. Classes that implement `java.lang.CharSequence` and another interface that defines `isEmpty` method should be aware of this addition as they may need to be modified to override the `isEmpty` method.

        Attachments

          Activity

            People

            Assignee:
            rriggs Roger Riggs
            Reporter:
            rriggs Roger Riggs
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: