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_r268004441
 
 

 ##########
 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:
   It construct a reusable Item instance representing a zero in a version 
string. If deleted, that instance must be constructed using an unnecessary 
string parse: new IntItem("0").

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