belingueres commented on a change in pull request #234: [MNG-6572] - use int or 
long instead of BigIntegers for little numbers in ComparableVersion
URL: https://github.com/apache/maven/pull/234#discussion_r268149402
 
 

 ##########
 File path: 
maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java
 ##########
 @@ -82,48 +92,174 @@
     }
 
     /**
-     * Represents a numeric item in the version item list.
+     * Represents a numeric item in the version item list that can be 
represented with an int.
      */
-    private static class IntegerItem
+    private static class IntItem
         implements Item
     {
-        private static final BigInteger BIG_INTEGER_ZERO = new BigInteger( "0" 
);
+        private final int value;
 
-        private final BigInteger value;
+        public static final IntItem ZERO = new IntItem();
+
+        private IntItem()
 
 Review comment:
   MNG-6572 is all about improving a performance problem and that constructor 
contributes to that objective. May we accord on adding a comment explaining its 
purpose?

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


With regards,
Apache Git Services

Reply via email to