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 73d750161cfbfde5f702991aab0e8c410863b1bf
Author: Gary D. Gregory <garydgreg...@gmail.com>
AuthorDate: Sun Jun 15 14:33:36 2025 -0400

    Add missing test coverage for
    
org.apache.commons.lang3.reflect.TypeUtils.unrollVariables(Map<TypeVariable<?>,
    Type>, Type)
---
 .../java/org/apache/commons/lang3/reflect/TypeUtilsTest.java     | 9 +++++++++
 1 file changed, 9 insertions(+)

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 4b4a5f413..65fc9f744 100644
--- a/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java
@@ -984,6 +984,15 @@ void testParameterizeNarrowerTypeArray() {
         assertEquals(TypeUtils.parameterize(ArrayList.class, String.class), 
unrolled);
     }
 
+    @Test
+    void testUnrollVariables() {
+        final TypeVariable<?>[] variables = 
ArrayList.class.getTypeParameters();
+        final ParameterizedType parameterizedType = 
TypeUtils.parameterize(ArrayList.class, variables);
+        assertEquals("java.util.ArrayList<E>", TypeUtils.unrollVariables(null, 
parameterizedType).getTypeName());
+        final Map<TypeVariable<?>, Type> mapping = 
Collections.<TypeVariable<?>, Type>singletonMap(variables[0], String.class);
+        assertEquals("java.util.ArrayList<java.lang.String>", 
TypeUtils.unrollVariables(mapping, parameterizedType).getTypeName());
+    }
+
     @Test
     void testParameterizeNullPointerException() {
         assertThrows(NullPointerException.class, () -> 
TypeUtils.parameterize(null, Collections.emptyMap()));

Reply via email to