From d72c88a082fa939ddf5a4aa2cf7d1742a9086f35 Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Tue, 25 May 2021 10:30:21 -0400 Subject: [PATCH] Remove unused imports and reorg others. --- src/main/java/org/apache/commons/lang3/Streams.java | 1 - .../org/apache/commons/lang3/event/EventListenerSupport.java | 1 - .../java/org/apache/commons/lang3/reflect/MethodUtils.java | 4 ++-- src/test/java/org/apache/commons/lang3/StringUtilsTest.java | 2 +- .../apache/commons/lang3/builder/JsonToStringStyleTest.java | 4 ++-- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/apache/commons/lang3/Streams.java b/src/main/java/org/apache/commons/lang3/Streams.java index 1b8e12520..58ab429fa 100644 --- a/src/main/java/org/apache/commons/lang3/Streams.java +++ b/src/main/java/org/apache/commons/lang3/Streams.java @@ -16,7 +16,6 @@ */ package org.apache.commons.lang3; -import java.lang.reflect.Array; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; diff --git a/src/main/java/org/apache/commons/lang3/event/EventListenerSupport.java b/src/main/java/org/apache/commons/lang3/event/EventListenerSupport.java index 1fd228115..8b87ee060 100644 --- a/src/main/java/org/apache/commons/lang3/event/EventListenerSupport.java +++ b/src/main/java/org/apache/commons/lang3/event/EventListenerSupport.java @@ -22,7 +22,6 @@ import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; -import java.lang.reflect.Array; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; diff --git a/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java b/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java index e854c49a8..9140007a6 100644 --- a/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java +++ b/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java @@ -16,6 +16,8 @@ */ package org.apache.commons.lang3.reflect; +import static java.util.stream.Collectors.toList; + import java.lang.annotation.Annotation; import java.lang.reflect.Array; import java.lang.reflect.InvocationTargetException; @@ -39,8 +41,6 @@ import org.apache.commons.lang3.ClassUtils; import org.apache.commons.lang3.ClassUtils.Interfaces; import org.apache.commons.lang3.Validate; -import static java.util.stream.Collectors.toList; - /** *

Utility reflection methods focused on {@link Method}s, originally from Commons BeanUtils. * Differences from the BeanUtils version may be noted, especially where similar functionality diff --git a/src/test/java/org/apache/commons/lang3/StringUtilsTest.java b/src/test/java/org/apache/commons/lang3/StringUtilsTest.java index 6182c2c2e..c86d437cb 100644 --- a/src/test/java/org/apache/commons/lang3/StringUtilsTest.java +++ b/src/test/java/org/apache/commons/lang3/StringUtilsTest.java @@ -44,8 +44,8 @@ import java.util.regex.PatternSyntaxException; import org.apache.commons.lang3.mutable.MutableInt; import org.apache.commons.lang3.text.WordUtils; -import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * Unit tests for methods of {@link org.apache.commons.lang3.StringUtils} diff --git a/src/test/java/org/apache/commons/lang3/builder/JsonToStringStyleTest.java b/src/test/java/org/apache/commons/lang3/builder/JsonToStringStyleTest.java index 4cf5136f7..045a3fc03 100644 --- a/src/test/java/org/apache/commons/lang3/builder/JsonToStringStyleTest.java +++ b/src/test/java/org/apache/commons/lang3/builder/JsonToStringStyleTest.java @@ -24,10 +24,10 @@ import java.util.Arrays; import java.util.Collections; import java.util.Date; import java.util.HashMap; -import java.util.List; - import java.util.LinkedHashMap; +import java.util.List; import java.util.Map; + import org.apache.commons.lang3.builder.ToStringStyleTest.Person; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach;