RFR: 8274634: Use String.equals instead of String.compareTo in java.desktop

Sergey Bylokhov serb at openjdk.java.net
Fri Oct 1 09:35:42 UTC 2021


On Wed, 29 Sep 2021 13:27:32 GMT, Andrey Turbanov <github.com+741251+turbanoff at openjdk.org> wrote:

> In several places, String.compareTo was _compared_ with 0 ( via `== 0`).
> Instead of this, we can use String.equals calls. `String.equals` is faster and shorter.

Looks fine.

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

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



More information about the client-libs-dev mailing list