isEmpty is faster, has less byte code and is easier to read.

Comment From: pivotal-issuemaster

@Laffini Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

Comment From: pivotal-issuemaster

@Laffini Thank you for signing the Contributor License Agreement!

Comment From: wind57

the amount of byte-code is irrelevant; easier to read is subjective too. May I ask if you have specific proof of "faster"?

Comment From: Laffini

Benchmarks can be found here: https://medium.com/javarevisited/micro-optimizations-in-java-string-equals-22be19fd8416

Comment From: jhoeller

We generally updated the core framework codebase towards isEmpty usage where it matters already.

This PR only covers a test case and a javadoc entry, both of which are arguably fine in terms of readability the way they are. I'd rather leave this as-is. Thanks for raising it, in any case!