ppkarwasz commented on code in PR #1495:
URL: https://github.com/apache/commons-lang/pull/1495#discussion_r2541842712
##########
src/test/java/org/apache/commons/lang3/ClassUtilsTest.java:
##########
@@ -1229,6 +1231,7 @@ void testGetClassByNormalNameArrays() throws
ClassNotFoundException {
assertEquals(java.util.Map.Entry[].class,
ClassUtils.getClass("java.util.Map$Entry[]"));
assertEquals(java.util.Map.Entry[].class,
ClassUtils.getClass("[Ljava.util.Map.Entry;"));
assertEquals(java.util.Map.Entry[].class,
ClassUtils.getClass("[Ljava.util.Map$Entry;"));
+ assertEquals(java.util.Map.Entry[][].class,
ClassUtils.getClass("[[Ljava.util.Map$Entry;"));
Review Comment:
These three test cases seem displaced:
- `[Ljava.util.Map$Entry;` belongs to `testGetClassWithArrayClasses`,
- `[[Ljava.util.Map$Entry;` belongs to `testGetClassWithArrayClasses2D`,
- `[Ljava.util.Map.Entry;` in my opinion does not belong anywhere and should
fall under the “undefined behavior” category: it is neither in a form accepted
by `Class.forName` nor it is the canonical name of the type.
--
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]