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 86a03b4f7082bf2026f2240b057a0f54460d9e54
Author: Gary D. Gregory <[email protected]>
AuthorDate: Sun Jun 22 08:13:27 2025 -0400

    Better exception message
---
 src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java 
b/src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java
index 6033ce824..d84ef4830 100644
--- a/src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java
+++ b/src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java
@@ -695,16 +695,14 @@ public static Type[] getImplicitUpperBounds(final 
WildcardType wildcardType) {
      */
     private static Class<?> getRawType(final ParameterizedType 
parameterizedType) {
         final Type rawType = parameterizedType.getRawType();
-
         // check if raw type is a Class object
         // not currently necessary, but since the return type is Type instead 
of
         // Class, there's enough reason to believe that future versions of Java
         // may return other Type implementations. And type-safety checking is
         // rarely a bad idea.
         if (!(rawType instanceof Class<?>)) {
-            throw new IllegalStateException("Wait... What!? Type of rawType: " 
+ rawType);
+            throw new IllegalStateException("Type of rawType: " + rawType);
         }
-
         return (Class<?>) rawType;
     }
 

Reply via email to