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

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

Commit messages:
 - [PATCH] Use String.equals instead of String.compareTo to check String's 
equality

Changes: https://git.openjdk.java.net/jdk/pull/5638/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5638&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8274190
  Stats: 20 lines in 7 files changed: 0 ins; 3 del; 17 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5638.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5638/head:pull/5638

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

Reply via email to