This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git

commit 161e5d7e1ff3cb3c83a6229a0156a4b180688a21
Author: Gary D. Gregory <garydgreg...@gmail.com>
AuthorDate: Sun Jun 15 13:32:35 2025 -0400

    Add missing test coverage for
    org.apache.commons.lang3.reflect.TypeUtils.normalizeUpperBounds(Type[])
---
 .../apache/commons/lang3/reflect/TypeUtilsTest.java | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java 
b/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java
index 86da87771..6c096f4fb 100644
--- a/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java
@@ -354,13 +354,6 @@ void test_LANG_1702() throws NoSuchMethodException, 
SecurityException {
         final Type unrolledType = TypeUtils.unrollVariables(typeArguments, 
type);
     }
 
-    @Test
-    void test_LANG_820() {
-        final Type[] typeArray = {String.class, String.class};
-        final Type[] expectedArray = {String.class};
-        assertArrayEquals(expectedArray, 
TypeUtils.normalizeUpperBounds(typeArray));
-    }
-
     @Test
     void testContainsTypeVariables() throws NoSuchMethodException {
         
assertFalse(TypeUtils.containsTypeVariables(Test1.class.getMethod("m0").getGenericReturnType()));
@@ -955,6 +948,20 @@ void testLowerBoundedWildcardType() {
        assertEquals(String.format("? super %s", iterableT0.getName()), 
lowerTypeVariable.toString());
     }
 
+    @Test
+    void testNormalizeUpperBounds() {
+        final Type[] typeArray = { Collection.class, List.class };
+        final Type[] expectedArray = { List.class };
+        assertArrayEquals(expectedArray, 
TypeUtils.normalizeUpperBounds(typeArray));
+    }
+
+    @Test
+    void testNormalizeUpperBounds_LANG_820() {
+        final Type[] typeArray = { String.class, String.class };
+        final Type[] expectedArray = { String.class };
+        assertArrayEquals(expectedArray, 
TypeUtils.normalizeUpperBounds(typeArray));
+    }
+
     @Test
     void testParameterizeMapArg() throws NoSuchFieldException {
         final Map<TypeVariable<?>, Type> typeVariableMap = new HashMap<>();

Reply via email to