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 485973094b7e3209397845640359556f9a94d89e
Author: Gary D. Gregory <garydgreg...@gmail.com>
AuthorDate: Sun Jun 15 14:25:48 2025 -0400

    Add missing test coverage for
    org.apache.commons.lang3.reflect.TypeUtils.toString(Type)
---
 src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java | 8 ++++++++
 1 file changed, 8 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 ecfa44491..4b4a5f413 100644
--- a/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/reflect/TypeUtilsTest.java
@@ -1043,6 +1043,14 @@ void testToLongString() {
         assertEquals(getClass().getName() + ".MyInnerClass.MyInnerClass2:X", 
TypeUtils.toLongString(MyInnerClass.MyInnerClass2.class.getTypeParameters()[0]));
     }
 
+    @Test
+    void testToString() {
+        assertThrows(NullPointerException.class, () -> 
TypeUtils.toString(null));
+        assertThrows(IllegalArgumentException.class, () -> 
TypeUtils.toString(new Type() {
+            // empty
+        }));
+    }
+
     @Test
     void testToString_LANG_1311() {
         assertEquals("int[]", TypeUtils.toString(int[].class));

Reply via email to