commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1187620 - in /commons/proper/functor/trunk/src/main/java/org/apache/commons/functor: core/Constant.java core/composite/CompositeUnaryPredicate.java generator/util/IntegerRange.java
Date Sat, 22 Oct 2011 01:18:53 GMT
Author: sebb
Date: Sat Oct 22 01:18:52 2011
New Revision: 1187620

URL: http://svn.apache.org/viewvc?rev=1187620&view=rev
Log:
Explicit boxing

Modified:
    commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/Constant.java
    commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/CompositeUnaryPredicate.java
    commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/generator/util/IntegerRange.java

Modified: commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/Constant.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/Constant.java?rev=1187620&r1=1187619&r2=1187620&view=diff
==============================================================================
--- commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/Constant.java
(original)
+++ commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/Constant.java
Sat Oct 22 01:18:52 2011
@@ -50,12 +50,12 @@ public final class Constant<T> implement
     /**
      * Constant for <code>true</code>.
      */
-    public static final Constant<Boolean> TRUE = of(true);
+    public static final Constant<Boolean> TRUE = of(Boolean.TRUE);
 
     /**
      * Constant for <code>false</code>.
      */
-    public static final Constant<Boolean> FALSE = of(false);
+    public static final Constant<Boolean> FALSE = of(Boolean.FALSE);
 
     /**
      * serialVersionUID declaration.

Modified: commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/CompositeUnaryPredicate.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/CompositeUnaryPredicate.java?rev=1187620&r1=1187619&r2=1187620&view=diff
==============================================================================
--- commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/CompositeUnaryPredicate.java
(original)
+++ commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/CompositeUnaryPredicate.java
Sat Oct 22 01:18:52 2011
@@ -97,7 +97,7 @@ public final class CompositeUnaryPredica
      * {@inheritDoc}
      */
     public boolean test(A obj) {
-        return function.evaluate(obj);
+        return function.evaluate(obj).booleanValue();
     }
 
     /**

Modified: commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/generator/util/IntegerRange.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/generator/util/IntegerRange.java?rev=1187620&r1=1187619&r2=1187620&view=diff
==============================================================================
--- commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/generator/util/IntegerRange.java
(original)
+++ commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/generator/util/IntegerRange.java
Sat Oct 22 01:18:52 2011
@@ -98,11 +98,11 @@ public final class IntegerRange extends 
     public void run(UnaryProcedure<? super Integer> proc) {
         if (signOf(step) == -1) {
             for (int i = from; i > to; i += step) {
-                proc.run(i);
+                proc.run(Integer.valueOf(i));
             }
         } else {
             for (int i = from; i < to; i += step) {
-                proc.run(i);
+                proc.run(Integer.valueOf(i));
             }
         }
     }



Mime
View raw message