You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2019/04/10 20:08:32 UTC

[GitHub] [maven] michael-o commented on a change in pull request #242: Speed up project discovery

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


With regards,
Apache Git Services