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

Dmitriy Dumanskiy github.com+1536494+doom369 at openjdk.java.net
Fri Sep 11 07:18:17 UTC 2020


On Thu, 10 Sep 2020 23:57:38 GMT, Phil Race <prr at openjdk.org> wrote:

>> **isEmpty** is faster + has less byte code + easier to read. Benchmarks could be found
>>   [here](https://medium.com/javarevisited/micro-optimizations-in-java-string-equals-22be19fd8416).
>
> 1) This is un-necessary churn.
> 2) I can't even be sure I am finding the ones in my area because there's so much here
> 3) The ones I can find have no need of whatever performance improvement this might bring.
> I think this whole PR should be withdrawn, and there may an attempt at measuring the benefits of this for the various
> cases before submitting in appropriate smaller chunks. But I'll tell you now I don't see a need for the test updates
> you are making.

Ok, sorry for the distraction.

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

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


More information about the core-libs-dev mailing list