<AWT Dev> RFR: 8252999: Cleanup: replace .equals("") with .isEmpty() within all codebase

Dmitriy Dumanskiy github.com+1536494+doom369 at openjdk.java.net
Thu Sep 10 12:07:57 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.

I have in mind dozens of improvements all over the code like this one. I already did some further review and in most
cases, those tiny changes go trough all codebase. I can create PR for every separate module, but in general, it would
multiply x5 the number of PRs in total. If you think it's a better way to go, no problem, I can do that.


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

More information about the awt-dev mailing list