mirror of
https://github.com/revanced/jadb.git
synced 2025-02-11 01:26:47 +01:00
Comparing attribute equality for equals method (reflecting RemoveFile class).
This commit is contained in:
parent
8a6c0d006e
commit
1834bc4812
@ -14,7 +14,16 @@ public class Package {
|
||||
public String toString() { return name; }
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) { return name.equals(o); }
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
Package that = (Package) o;
|
||||
|
||||
if (!name.equals(that.name)) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() { return name.hashCode(); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user