mirror of
https://github.com/revanced/jadb.git
synced 2025-02-11 01:26:47 +01:00
Simplifying equals method and changing class check to use instanceof.
This commit is contained in:
parent
1834bc4812
commit
23bfd4bf7d
@ -16,14 +16,10 @@ public class Package {
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
if (!(o instanceof Package)) return false;
|
||||
Package that = (Package) o;
|
||||
|
||||
if (!name.equals(that.name)) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
return name.equals(that.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() { return name.hashCode(); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user