commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1099420 - /commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/event/EventUtilsTest.java
Date Wed, 04 May 2011 11:42:56 GMT
Author: sebb
Date: Wed May  4 11:42:56 2011
New Revision: 1099420

URL: http://svn.apache.org/viewvc?rev=1099420&view=rev
Log:
Make boxing explicit

Modified:
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/event/EventUtilsTest.java

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/event/EventUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/event/EventUtilsTest.java?rev=1099420&r1=1099419&r2=1099420&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/event/EventUtilsTest.java
(original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/event/EventUtilsTest.java
Wed May  4 11:42:56 2011
@@ -139,9 +139,9 @@ public class EventUtilsTest extends Test
         final EventCounter counter = new EventCounter();
         EventUtils.bindEventsToMethod(counter, "eventOccurred", src, MultipleEventListener.class,
"event1");
         assertEquals(0, counter.getCount());
-        src.listeners.fire().event1(new PropertyChangeEvent(new Date(), "Day", 0, 1));
+        src.listeners.fire().event1(new PropertyChangeEvent(new Date(), "Day", Integer.valueOf(0),
Integer.valueOf(1)));
         assertEquals(1, counter.getCount());
-        src.listeners.fire().event2(new PropertyChangeEvent(new Date(), "Day", 1, 2));
+        src.listeners.fire().event2(new PropertyChangeEvent(new Date(), "Day", Integer.valueOf(1),
Integer.valueOf(2)));
         assertEquals(1, counter.getCount());
     }
 
@@ -197,7 +197,7 @@ public class EventUtilsTest extends Test
         public int getEventCount(String eventName)
         {
             Integer count = eventCounts.get(eventName);
-            return count == null ? 0 : count;
+            return count == null ? 0 : count.intValue();
         }
 
         public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
@@ -205,11 +205,11 @@ public class EventUtilsTest extends Test
             Integer count = eventCounts.get(method.getName());
             if (count == null)
             {
-                eventCounts.put(method.getName(), 1);
+                eventCounts.put(method.getName(), Integer.valueOf(1));
             }
             else
             {
-                eventCounts.put(method.getName(), count + 1);
+                eventCounts.put(method.getName(), Integer.valueOf(count.intValue() + 1));
             }
             return null;
         }



Mime
View raw message