Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This noncompliant code example compares two keys using the equals() method but the keys may compare unequal even if they represent the same key.

Code Block
bgColor#FFCCCC
private static boolean keysEqual(Key key1, Key key2) {
 if (key1.equals(key2)) {
   return true;
 }
}

...