Please review CSR : JDK-8200437 String#isBlank

Andrej Golovnin andrej.golovnin at gmail.com
Thu Apr 26 05:47:50 UTC 2018


Hi Jim,

please add also the #isNotBlank() method. I know the one can write
!str.isBlank(), but str.isNotBlank() is better from the readability
standpoint of view.

Also I think the new methods:

#isBlank()
#isNotBlank() // if you add it.
#lines()

and the old one

String#isEmpty()

should be defined on the CharSequence interface with default
implementations and not on the String class. The sub-classes of
CharSequence shall then provide optimised implementations. This would
allow us to have this methods on StringBuilder and CharBuffer too.

Best regards,
Andrej Golovnin

On Wed, Apr 25, 2018 at 7:04 PM, Jim Laskey <james.laskey at oracle.com> wrote:
> Please review and mark as reviewed https://bugs.openjdk.java.net/browse/JDK-8200437
>


More information about the core-libs-dev mailing list