diff options
| author | 2020-01-03 15:31:00 -0800 | |
|---|---|---|
| committer | 2020-01-03 15:31:12 -0800 | |
| commit | 49b8b918d86843c81c341546858a0aae429d4b5d (patch) | |
| tree | aaf29d762cf49448f8ca94ff534d16d52e7a020e | |
| parent | 7a5f57289636335fa4db326776ab2b8554ac85d1 (diff) | |
LockscreenCredential: clarify Effective Java rule
The "Always override hashCode when you override equals" rule in
Effective Java now has different item numbers across editions.
Update the comment to the actual rule used.
Test: new comment reads correctly
Change-Id: Ibdbce008f653f8800acc76176ad06ffe347dc106
Signed-off-by: Julius D'souza <jdsouza@google.com>
| -rw-r--r-- | core/java/com/android/internal/widget/LockscreenCredential.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/com/android/internal/widget/LockscreenCredential.java b/core/java/com/android/internal/widget/LockscreenCredential.java index 9b87dd2c5f8b..55f30fb89253 100644 --- a/core/java/com/android/internal/widget/LockscreenCredential.java +++ b/core/java/com/android/internal/widget/LockscreenCredential.java @@ -308,7 +308,7 @@ public class LockscreenCredential implements Parcelable, AutoCloseable { @Override public int hashCode() { - // Effective Java — Item 9 + // Effective Java — Always override hashCode when you override equals return (17 + mType) * 31 + mCredential.hashCode(); } |