Skip to content

Commit aee2383

Browse files
author
Vladimir Kotal
committed
override also hashCode()
1 parent 83258d7 commit aee2383

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/org/opensolaris/opengrok/history/RepositoryInfo.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
import java.io.Serializable;
2626
import java.text.SimpleDateFormat;
27+
import java.util.Objects;
2728
import org.opensolaris.opengrok.configuration.RuntimeEnvironment;
2829
import org.opensolaris.opengrok.util.ClassUtil;
2930

@@ -231,4 +232,11 @@ public boolean equals(Object obj) {
231232
return (ri.getDirectoryNameRelative() == null && this.getDirectoryNameRelative() == null);
232233
}
233234
}
235+
236+
@Override
237+
public int hashCode() {
238+
int hash = 7;
239+
hash = 89 * hash + Objects.hashCode(this.directoryNameRelative);
240+
return hash;
241+
}
234242
}

0 commit comments

Comments
 (0)