commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1155532 - /commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/comparator/ComparatorFunction.java
Date Tue, 09 Aug 2011 20:01:58 GMT
Author: simonetripodi
Date: Tue Aug  9 20:01:58 2011
New Revision: 1155532

URL: http://svn.apache.org/viewvc?rev=1155532&view=rev
Log:
fixed checkstyle violation: Method org.apache.commons.functor.core.comparator.ComparatorFunction.evaluate(Object,
Object) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead

Modified:
    commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/comparator/ComparatorFunction.java

Modified: commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/comparator/ComparatorFunction.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/comparator/ComparatorFunction.java?rev=1155532&r1=1155531&r2=1155532&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/comparator/ComparatorFunction.java
(original)
+++ commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/comparator/ComparatorFunction.java
Tue Aug  9 20:01:58 2011
@@ -51,7 +51,7 @@ public final class ComparatorFunction<T>
      * {@inheritDoc}
      */
     public Integer evaluate(T left, T right) {
-        return new Integer(comparator.compare(left, right));
+        return Integer.valueOf(comparator.compare(left, right));
     }
 
     /**



Mime
View raw message