commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1782756 - /commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/IntegerValidator.java
Date Mon, 13 Feb 2017 11:54:26 GMT
Author: sebb
Date: Mon Feb 13 11:54:26 2017
New Revision: 1782756

URL: http://svn.apache.org/viewvc?rev=1782756&view=rev
Log:
More efficient to use valueOf (Findbugs)

Modified:
    commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/IntegerValidator.java

Modified: commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/IntegerValidator.java
URL: http://svn.apache.org/viewvc/commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/IntegerValidator.java?rev=1782756&r1=1782755&r2=1782756&view=diff
==============================================================================
--- commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/IntegerValidator.java
(original)
+++ commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/IntegerValidator.java
Mon Feb 13 11:54:26 2017
@@ -250,6 +250,6 @@ public class IntegerValidator extends Ab
             longValue > Integer.MAX_VALUE) {
             return null;
         }
-        return new Integer((int)longValue);
+        return Integer.valueOf((int)longValue);
     }
 }



Mime
View raw message