ErickErickson commented on a change in pull request #1728:
URL: https://github.com/apache/lucene-solr/pull/1728#discussion_r467457703
##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/ResponseParser.java
##########
@@ -49,4 +52,31 @@ public String getVersion()
{
return "2.2";
}
+
+ @Override
+ public int hashCode() {
+ return new HashCodeBuilder()
+ .append(getWriterType())
+ .append(getContentType())
+ .append(getVersion())
+ .toHashCode();
+ }
+
+ @Override
+ public boolean equals(Object rhs) {
+ if (rhs == null || getClass() != rhs.getClass()) {
+ return false;
+ } else if (this == rhs) {
+ return true;
+ } else if (hashCode() != rhs.hashCode()) {
+ return false;
+ }
+
+ final ResponseParser rhsCast = (ResponseParser) rhs;
Review comment:
I'm curious about the comparison between Objects.hash(bunch of params)
and the commons builder. I'm not advocating you change to Objects.hash, rather
wondering whether there's a particular advantage to using one over the other.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]