commit dc019152886f018f39ecbcba24c3490e2eed8057 Author: iwakeh iwakeh@torproject.org Date: Wed Jan 31 12:35:36 2018 +0000
Provide 'equals' and 'hashCode' implementations. --- .../torproject/descriptor/log/WebServerAccessLogLine.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
diff --git a/src/main/java/org/torproject/descriptor/log/WebServerAccessLogLine.java b/src/main/java/org/torproject/descriptor/log/WebServerAccessLogLine.java index 2f27441..a4e3ce6 100644 --- a/src/main/java/org/torproject/descriptor/log/WebServerAccessLogLine.java +++ b/src/main/java/org/torproject/descriptor/log/WebServerAccessLogLine.java @@ -156,5 +156,19 @@ public class WebServerAccessLogLine { } }
+ @Override + public boolean equals(Object other) { + if (null != other && other instanceof WebServerAccessLogLine) { + return this.toLogString() + .equals(((WebServerAccessLogLine)other).toLogString()); + } + return false; + } + + @Override + public int hashCode() { + return this.toLogString().hashCode(); + } + }
tor-commits@lists.torproject.org