commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1391027 - in /commons/proper/lang/trunk/src: main/java/org/apache/commons/lang3/time/ test/java/org/apache/commons/lang3/builder/ test/java/org/apache/commons/lang3/concurrent/
Date Thu, 27 Sep 2012 14:20:11 GMT
Author: sebb
Date: Thu Sep 27 14:20:10 2012
New Revision: 1391027

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

Modified:
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/FormatCache.java
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderConcurrencyTest.java
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/ToStringStyleConcurrencyTest.java
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/BackgroundInitializerTest.java
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/MultiBackgroundInitializerTest.java

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/FormatCache.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/FormatCache.java?rev=1391027&r1=1391026&r2=1391027&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/FormatCache.java
(original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/FormatCache.java
Thu Sep 27 14:20:10 2012
@@ -141,13 +141,13 @@ abstract class FormatCache<F extends For
             try {
                 DateFormat formatter;
                 if (dateStyle == null) {
-                    formatter = DateFormat.getTimeInstance(timeStyle, locale);          
         
+                    formatter = DateFormat.getTimeInstance(timeStyle.intValue(), locale);
                   
                 }
                 else if (timeStyle == null) {
-                    formatter = DateFormat.getDateInstance(dateStyle, locale);          
         
+                    formatter = DateFormat.getDateInstance(dateStyle.intValue(), locale);
                   
                 }
                 else {
-                    formatter = DateFormat.getDateTimeInstance(dateStyle, timeStyle, locale);
+                    formatter = DateFormat.getDateTimeInstance(dateStyle.intValue(), timeStyle.intValue(),
locale);
                 }
                 pattern = ((SimpleDateFormat)formatter).toPattern();
                 String previous = cDateTimeInstanceCache.putIfAbsent(key, pattern);

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderConcurrencyTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderConcurrencyTest.java?rev=1391027&r1=1391026&r2=1391027&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderConcurrencyTest.java
(original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderConcurrencyTest.java
Thu Sep 27 14:20:10 2012
@@ -96,7 +96,7 @@ public class ReflectionToStringBuilderCo
                     String s = ReflectionToStringBuilder.toString(holder);
                     Assert.assertNotNull(s);
                 }
-                return REPEAT;
+                return Integer.valueOf(REPEAT);
             }
         };
         // Produces changes in the list
@@ -106,7 +106,7 @@ public class ReflectionToStringBuilderCo
                 for (int i = 0; i < DATA_SIZE; i++) {
                     list.remove(list.get(0));
                 }
-                return REPEAT;
+                return Integer.valueOf(REPEAT);
             }
         };
         Collection<Callable<Integer>> tasks = new ArrayList<Callable<Integer>>();

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/ToStringStyleConcurrencyTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/ToStringStyleConcurrencyTest.java?rev=1391027&r1=1391026&r2=1391027&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/ToStringStyleConcurrencyTest.java
(original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/builder/ToStringStyleConcurrencyTest.java
Thu Sep 27 14:20:10 2012
@@ -96,7 +96,7 @@ public class ToStringStyleConcurrencyTes
                     // Calls ToStringStyle
                     new ToStringBuilder(holder).append(holder.collection);
                 }
-                return REPEAT;
+                return Integer.valueOf(REPEAT);
             }
         };
         Collection<Callable<Integer>> tasks = new ArrayList<Callable<Integer>>();

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/BackgroundInitializerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/BackgroundInitializerTest.java?rev=1391027&r1=1391026&r2=1391027&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/BackgroundInitializerTest.java
(original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/BackgroundInitializerTest.java
Thu Sep 27 14:20:10 2012
@@ -298,7 +298,7 @@ public class BackgroundInitializerTest {
             if (shouldSleep) {
                 Thread.sleep(60000L);
             }
-            return ++initializeCalls;
+            return Integer.valueOf(++initializeCalls);
         }
     }
 }

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/MultiBackgroundInitializerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/MultiBackgroundInitializerTest.java?rev=1391027&r1=1391026&r2=1391027&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/MultiBackgroundInitializerTest.java
(original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/concurrent/MultiBackgroundInitializerTest.java
Thu Sep 27 14:20:10 2012
@@ -375,7 +375,7 @@ public class MultiBackgroundInitializerT
                 throw ex;
             }
 
-            return initializeCalls;
+            return Integer.valueOf(initializeCalls);
         }
     }
 }



Mime
View raw message