Skip to content
Snippets Groups Projects
Commit 194ed866 authored by Georg Seibt's avatar Georg Seibt :nerd:
Browse files

String equals may be faster than Repository equals, id should never be null...

String equals may be faster than Repository equals, id should never be null and returning "null" doesn't seem useful...
parent 6219ae01
No related branches found
No related tags found
No related merge requests found
......@@ -124,16 +124,16 @@ public abstract class Reference {
}
Commit commit = (Commit) o;
return Objects.equals(repo, commit.repo) && Objects.equals(id, commit.id);
return Objects.equals(id, commit.id) && Objects.equals(repo, commit.repo);
}
@Override
public final int hashCode() {
return Objects.hash(repo, id);
return Objects.hash(id, repo);
}
@Override
public String toString() {
return String.valueOf(id);
return id;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment