From 82152f41ac8a727c2f0042bd555452dc2dda11b1 Mon Sep 17 00:00:00 2001 From: Pascal Schumacher Date: Tue, 5 May 2015 23:38:35 +0200 Subject: [PATCH] add @SuppressWarnings(deprecation) in joinWith(), because it uses the deprecated ObjectUtils.toString(Object) method (which is o.k. to use as long as we do not require java 7 or greater) --- src/main/java/org/apache/commons/lang3/StringUtils.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/apache/commons/lang3/StringUtils.java b/src/main/java/org/apache/commons/lang3/StringUtils.java index 55d81914e..617361e38 100644 --- a/src/main/java/org/apache/commons/lang3/StringUtils.java +++ b/src/main/java/org/apache/commons/lang3/StringUtils.java @@ -4207,7 +4207,9 @@ public class StringUtils { final Iterator iterator = Arrays.asList(objects).iterator(); while (iterator.hasNext()) { - result.append(ObjectUtils.toString(iterator.next())); + @SuppressWarnings("deprecation") // o.k. to use as long as we do not require java 7 or greater + final String value = ObjectUtils.toString(iterator.next()); + result.append(value); if (iterator.hasNext()) { result.append(sanitizedSeparator);