From 6a7a1ed476d03f7282671c90c1a475850a92f46c Mon Sep 17 00:00:00 2001 From: Sebastian Bazley Date: Tue, 8 Mar 2011 16:38:09 +0000 Subject: [PATCH] Explicit boxing git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1079423 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/commons/lang3/builder/CompareToBuilder.java | 2 +- .../java/org/apache/commons/lang3/builder/HashCodeBuilder.java | 2 +- .../org/apache/commons/lang3/concurrent/BasicThreadFactory.java | 2 +- .../apache/commons/lang3/concurrent/ConstantInitializer.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/apache/commons/lang3/builder/CompareToBuilder.java b/src/main/java/org/apache/commons/lang3/builder/CompareToBuilder.java index 9f5acc0c0..437d53d90 100644 --- a/src/main/java/org/apache/commons/lang3/builder/CompareToBuilder.java +++ b/src/main/java/org/apache/commons/lang3/builder/CompareToBuilder.java @@ -1053,7 +1053,7 @@ public class CompareToBuilder implements Builder { * @since 3.0 */ public Integer build() { - return toComparison(); + return Integer.valueOf(toComparison()); } } diff --git a/src/main/java/org/apache/commons/lang3/builder/HashCodeBuilder.java b/src/main/java/org/apache/commons/lang3/builder/HashCodeBuilder.java index 6bdc9e2a4..23e35d465 100644 --- a/src/main/java/org/apache/commons/lang3/builder/HashCodeBuilder.java +++ b/src/main/java/org/apache/commons/lang3/builder/HashCodeBuilder.java @@ -999,7 +999,7 @@ public class HashCodeBuilder implements Builder { * @since 3.0 */ public Integer build() { - return toHashCode(); + return Integer.valueOf(toHashCode()); } /** diff --git a/src/main/java/org/apache/commons/lang3/concurrent/BasicThreadFactory.java b/src/main/java/org/apache/commons/lang3/concurrent/BasicThreadFactory.java index 7301095a6..56e50cfa6 100644 --- a/src/main/java/org/apache/commons/lang3/concurrent/BasicThreadFactory.java +++ b/src/main/java/org/apache/commons/lang3/concurrent/BasicThreadFactory.java @@ -216,9 +216,9 @@ public class BasicThreadFactory implements ThreadFactory { * @param t the thread to be initialized */ private void initializeThread(Thread t) { - long count = threadCounter.incrementAndGet(); if (getNamingPattern() != null) { + Long count = Long.valueOf(threadCounter.incrementAndGet()); t.setName(String.format(getNamingPattern(), count)); } diff --git a/src/main/java/org/apache/commons/lang3/concurrent/ConstantInitializer.java b/src/main/java/org/apache/commons/lang3/concurrent/ConstantInitializer.java index afd38ae1a..480a42cb5 100644 --- a/src/main/java/org/apache/commons/lang3/concurrent/ConstantInitializer.java +++ b/src/main/java/org/apache/commons/lang3/concurrent/ConstantInitializer.java @@ -122,7 +122,7 @@ public class ConstantInitializer implements ConcurrentInitializer { */ @Override public String toString() { - return String.format(FMT_TO_STRING, System.identityHashCode(this), + return String.format(FMT_TO_STRING, Integer.valueOf(System.identityHashCode(this)), String.valueOf(getObject())); } }