RFR: 8277536: Use String.blank in jdk.javadoc where applicable

Andrey Turbanov duke at openjdk.java.net
Mon Nov 22 09:49:20 UTC 2021


On Wed, 10 Nov 2021 18:41:37 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:

>> There are couple of places where manual cycle is used to check if `String` contains non-whitespaces characters.
>> Since Java 11 we have String.isBlank() which could be used instead.
>
> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/Checker.java line 1245:
> 
>> 1243:                 return true;
>> 1244:         }
>> 1245:         return false;
> 
> Suggest to change the method body to
> 
> return !tree.getBody().isBlank();

Applied

-------------

PR: https://git.openjdk.java.net/jdk/pull/6323


More information about the javadoc-dev mailing list