mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[log] Fix parser test: implement equals for SimpleCommit
This commit is contained in:
@@ -49,4 +49,21 @@ public class SimpleCommit implements TimedVcsCommit {
|
||||
public List<Hash> getParents() {
|
||||
return myParents;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
SimpleCommit commit = (SimpleCommit)o;
|
||||
|
||||
if (myHash != null ? !myHash.equals(commit.myHash) : commit.myHash != null) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return myHash != null ? myHash.hashCode() : 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user