michael-o commented on a change in pull request #242: Speed up project discovery
URL: https://github.com/apache/maven/pull/242#discussion_r274134416
 
 

 ##########
 File path: 
maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java
 ##########
 @@ -150,6 +150,30 @@ public int compareTo( Item item )
             }
         }
 
+        @Override
+        public boolean equals( Object o )
+        {
+            if ( this == o )
+            {
+                return true;
+            }
+            if ( o == null || getClass() != o.getClass() )
+            {
+                return false;
+            }
+
+            IntItem intItem = (IntItem) o;
+
+            return value == intItem.value;
+
+        }
+
+        @Override
+        public int hashCode()
+        {
+            return value;
 
 Review comment:
   Why not use `Objects#hashCode()` on this?

----------------------------------------------------------------
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


With regards,
Apache Git Services

Reply via email to