RFR: 8252999: Cleanup: replace .equals("") with .isEmpty() within all codebase

Kevin Rushforth kcr at openjdk.java.net
Thu Sep 10 12:21:25 UTC 2020


On Thu, 10 Sep 2020 11:21:28 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> The code in java.base was updated to use String::isEmpty in JDK 12 (JDK-8215281). There was follow-up in JDK 13 to do
>> the same in the java.desktop module (JDK-8223237). Changing the remaining usages make sense although I see that more
>> more than half are in tests.  It would be good to hear from security-dev on the changes to the Apache Santuario code
>> (in java.xml.crypto module) in case it would be better to contribute those upstream instead. Ditto for the Apache Xalan
>> code (in the java.xml module) but it may be significantly forked already that it doesn't matter.  I assume you can use
>> JDK-8215014 rather than creating a new issue.
>
> This should be broken up to deal with the files in different functional areas under different bugids and PRs. Otherwise
> the cross-posting to so many lists is prohibitive. Files in different areas need to be reviewed by different teams.
> Thank you.

@dholmes-ora raises a good point. Hopefully there is a balance point between a dozen different bugs / pull requests
each targeting one area and one bug / PR targeting a dozen separate areas. I don't have a good general rule to suggest.
Maybe @AlanBateman or @jddarcy can offer some advice?

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

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



More information about the build-dev mailing list