mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-20 02:08:04 +01:00
Refactor Device#equals method
This commit is contained in:
@@ -253,10 +253,7 @@ public class Device {
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
if (other == null || !(other instanceof Device)) return false;
|
||||
|
||||
Device that = (Device)other;
|
||||
return this.id == that.id;
|
||||
return (other instanceof Device that) && this.id == that.id;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user