codacy: Ensure you override both equals() and hashCode()

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2019-10-15 13:55:33 +02:00
parent 862e5d4776
commit 670e9d3a61
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B

View file

@ -84,10 +84,12 @@ import org.jetbrains.annotations.NotNull;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashSet;
import java.util.List;
import java.util.Objects;
import java.util.Set;
import javax.inject.Inject;
@ -500,6 +502,11 @@ public class ContactListFragment extends FileFragment implements Injectable {
public String toString() {
return displayName;
}
@Override
public int hashCode() {
return Arrays.hashCode(new Object[] {displayName, name, type});
}
}
private class DownloadFinishReceiver extends BroadcastReceiver {