Refactor Device#equals method
This commit is contained in:
parent
473ecbdf2d
commit
796fb3b4cd
|
@ -253,10 +253,7 @@ public class Device {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object other) {
|
public boolean equals(Object other) {
|
||||||
if (other == null || !(other instanceof Device)) return false;
|
return (other instanceof Device that) && this.id == that.id;
|
||||||
|
|
||||||
Device that = (Device)other;
|
|
||||||
return this.id == that.id;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue