RFR: 8215281: Use String.isEmpty() where applicable in java.base
claes.redestad at oracle.com
Wed Dec 12 16:53:11 UTC 2018
please review this patch to use String.isEmpty when applicable:
- It reads better :-)
- Better startup/warmup due fewer method invocations
- Better peak performance: String.isEmpty is ~1.2x faster than
Most changes are simple search and replace, but I took the liberty to
clean out some dead/pointless uses and improve formatting in places due
the shorter expression length.
Instances of "".equals(string) were only changed when it was immediately
obvious that string is not null, e.g., due a preceding null check.
More information about the core-libs-dev