|
1 | 1 | /*
|
2 |
| - * Copyright 2002-2024 the original author or authors. |
| 2 | + * Copyright 2002-2025 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
@@ -74,12 +74,6 @@ public abstract class ClassUtils {
|
74 | 74 | /** Suffix for array class names: {@code "[]"}. */
|
75 | 75 | public static final String ARRAY_SUFFIX = "[]";
|
76 | 76 |
|
77 |
| - /** Prefix for internal array class names: {@code "["}. */ |
78 |
| - private static final String INTERNAL_ARRAY_PREFIX = "["; |
79 |
| - |
80 |
| - /** Prefix for internal non-primitive array class names: {@code "[L"}. */ |
81 |
| - private static final String NON_PRIMITIVE_ARRAY_PREFIX = "[L"; |
82 |
| - |
83 | 77 | /** A reusable empty class array constant. */
|
84 | 78 | private static final Class<?>[] EMPTY_CLASS_ARRAY = {};
|
85 | 79 |
|
@@ -297,20 +291,6 @@ public static Class<?> forName(String name, @Nullable ClassLoader classLoader)
|
297 | 291 | return elementClass.arrayType();
|
298 | 292 | }
|
299 | 293 |
|
300 |
| - // "[Ljava.lang.String;" style arrays |
301 |
| - if (name.startsWith(NON_PRIMITIVE_ARRAY_PREFIX) && name.endsWith(";")) { |
302 |
| - String elementName = name.substring(NON_PRIMITIVE_ARRAY_PREFIX.length(), name.length() - 1); |
303 |
| - Class<?> elementClass = forName(elementName, classLoader); |
304 |
| - return elementClass.arrayType(); |
305 |
| - } |
306 |
| - |
307 |
| - // "[[I" or "[[Ljava.lang.String;" style arrays |
308 |
| - if (name.startsWith(INTERNAL_ARRAY_PREFIX)) { |
309 |
| - String elementName = name.substring(INTERNAL_ARRAY_PREFIX.length()); |
310 |
| - Class<?> elementClass = forName(elementName, classLoader); |
311 |
| - return elementClass.arrayType(); |
312 |
| - } |
313 |
| - |
314 | 294 | ClassLoader clToUse = classLoader;
|
315 | 295 | if (clToUse == null) {
|
316 | 296 | clToUse = getDefaultClassLoader();
|
|
0 commit comments