Make boxing explicit

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1099420 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2011-05-04 11:42:56 +00:00
parent 154da561fd
commit 78de63c7c0
1 changed files with 5 additions and 5 deletions

View File

@ -139,9 +139,9 @@ public class EventUtilsTest extends TestCase
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 TestCase
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 TestCase
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;
}