murblanc commented on a change in pull request #1579:
URL: https://github.com/apache/lucene-solr/pull/1579#discussion_r440287813



##########
File path: 
solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/AutoScalingConfig.java
##########
@@ -305,10 +303,10 @@ public boolean equals(Object o) {
       return properties.equals(that.properties);
     }
 
-//    @Override
-//    public int hashCode() {
-//      throw new UnsupportedOperationException("TODO unimplemented");
-//    }
+    @Override
+    public int hashCode() {
+      return Objects.hash(name, actionClass);

Review comment:
       `equals()` is based on comparing `properties` and `hashCode()` on 
comparing `name` and `actionClass`. This can't guarantee two objets that are 
`equals()` are going to have the same `hashCode()`, as required.




----------------------------------------------------------------
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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to