ppkarwasz commented on code in PR #1494:
URL: https://github.com/apache/commons-lang/pull/1494#discussion_r2538158344
##########
src/main/java/org/apache/commons/lang3/ClassUtils.java:
##########
@@ -520,11 +527,12 @@ private static String getCanonicalName(final String name)
{
* supports the syntaxes "{@code java.util.Map.Entry[]}", "{@code
java.util.Map$Entry[]}",
* "{@code [Ljava.util.Map.Entry;}", and "{@code [Ljava.util.Map$Entry;}".
*
- * @param classLoader the class loader to use to load the class
- * @param className the class name
- * @return the class represented by {@code className} using the {@code
classLoader}
- * @throws NullPointerException if the className is null
- * @throws ClassNotFoundException if the class is not found
+ * @param classLoader the class loader to use to load the class.
+ * @param className the class name.
+ * @return the class represented by {@code className} using the {@code
classLoader}.
+ * @throws NullPointerException if the className is null.
+ * @throws ClassNotFoundException if the class is not found.
+ * @throws IllegalArgumentException Thrown if the class name represents an
array with more dimensions than the JVM supports, 255.
Review Comment:
Should we be more generic here and say that `IllegalArgumentException` is
thrown if the `className` is syntactically invalid (it does not follow neither
the syntax in [JLS
6.7](https://docs.oracle.com/javase/specs/jls/se25/html/jls-6.html#jls-6.7),
[JLS
13.1](https://docs.oracle.com/javase/specs/jls/se25/html/jls-13.html#jls-13.1)
nor the array type representation used by `Class.getName()`) **or** it does not
respect the length and nesting limits imposed by JVMS?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]