Explicit boxing

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1391027 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2012-09-27 14:20:10 +00:00
parent f9837a0728
commit a0148b0e20
5 changed files with 8 additions and 8 deletions

View File

@ -141,13 +141,13 @@ abstract class FormatCache<F extends Format> {
try { try {
DateFormat formatter; DateFormat formatter;
if (dateStyle == null) { if (dateStyle == null) {
formatter = DateFormat.getTimeInstance(timeStyle, locale); formatter = DateFormat.getTimeInstance(timeStyle.intValue(), locale);
} }
else if (timeStyle == null) { else if (timeStyle == null) {
formatter = DateFormat.getDateInstance(dateStyle, locale); formatter = DateFormat.getDateInstance(dateStyle.intValue(), locale);
} }
else { else {
formatter = DateFormat.getDateTimeInstance(dateStyle, timeStyle, locale); formatter = DateFormat.getDateTimeInstance(dateStyle.intValue(), timeStyle.intValue(), locale);
} }
pattern = ((SimpleDateFormat)formatter).toPattern(); pattern = ((SimpleDateFormat)formatter).toPattern();
String previous = cDateTimeInstanceCache.putIfAbsent(key, pattern); String previous = cDateTimeInstanceCache.putIfAbsent(key, pattern);

View File

@ -96,7 +96,7 @@ public class ReflectionToStringBuilderConcurrencyTest {
String s = ReflectionToStringBuilder.toString(holder); String s = ReflectionToStringBuilder.toString(holder);
Assert.assertNotNull(s); Assert.assertNotNull(s);
} }
return REPEAT; return Integer.valueOf(REPEAT);
} }
}; };
// Produces changes in the list // Produces changes in the list
@ -106,7 +106,7 @@ public class ReflectionToStringBuilderConcurrencyTest {
for (int i = 0; i < DATA_SIZE; i++) { for (int i = 0; i < DATA_SIZE; i++) {
list.remove(list.get(0)); list.remove(list.get(0));
} }
return REPEAT; return Integer.valueOf(REPEAT);
} }
}; };
Collection<Callable<Integer>> tasks = new ArrayList<Callable<Integer>>(); Collection<Callable<Integer>> tasks = new ArrayList<Callable<Integer>>();

View File

@ -96,7 +96,7 @@ public class ToStringStyleConcurrencyTest {
// Calls ToStringStyle // Calls ToStringStyle
new ToStringBuilder(holder).append(holder.collection); new ToStringBuilder(holder).append(holder.collection);
} }
return REPEAT; return Integer.valueOf(REPEAT);
} }
}; };
Collection<Callable<Integer>> tasks = new ArrayList<Callable<Integer>>(); Collection<Callable<Integer>> tasks = new ArrayList<Callable<Integer>>();

View File

@ -298,7 +298,7 @@ public class BackgroundInitializerTest {
if (shouldSleep) { if (shouldSleep) {
Thread.sleep(60000L); Thread.sleep(60000L);
} }
return ++initializeCalls; return Integer.valueOf(++initializeCalls);
} }
} }
} }

View File

@ -375,7 +375,7 @@ public class MultiBackgroundInitializerTest {
throw ex; throw ex;
} }
return initializeCalls; return Integer.valueOf(initializeCalls);
} }
} }
} }