diff options
author | Keuin <[email protected]> | 2021-02-15 17:52:53 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2021-02-15 17:52:53 +0800 |
commit | 6d6f0b486ac42b6bd69ddb8862ee3af7b819f3a7 (patch) | |
tree | ce01c3a18b7e90af6204ff0db90a606eade81778 /src/main/java/com/keuin/kbackupfabric/backup/incremental/identifier | |
parent | 68b102c763b0d0b21fb71575f1238d3cc879f959 (diff) |
Add tests.
Implementing auto backup and configuration (not finished)
Diffstat (limited to 'src/main/java/com/keuin/kbackupfabric/backup/incremental/identifier')
-rw-r--r-- | src/main/java/com/keuin/kbackupfabric/backup/incremental/identifier/SingleHashIdentifier.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/com/keuin/kbackupfabric/backup/incremental/identifier/SingleHashIdentifier.java b/src/main/java/com/keuin/kbackupfabric/backup/incremental/identifier/SingleHashIdentifier.java index 9fd61c8..b3afa7f 100644 --- a/src/main/java/com/keuin/kbackupfabric/backup/incremental/identifier/SingleHashIdentifier.java +++ b/src/main/java/com/keuin/kbackupfabric/backup/incremental/identifier/SingleHashIdentifier.java @@ -37,11 +37,11 @@ public abstract class SingleHashIdentifier implements ObjectIdentifier { } @Override - public boolean equals(Object obj) { - if (!(obj instanceof SingleHashIdentifier)) { - return false; - } - return Arrays.equals(hash, ((SingleHashIdentifier) obj).hash); + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SingleHashIdentifier that = (SingleHashIdentifier) o; + return Arrays.equals(hash, that.hash) && type.equals(that.type); } @Override |