garydgregory commented on PR #1391:
URL: https://github.com/apache/commons-lang/pull/1391#issuecomment-2917119973

   -1: Hm, now that I look at this PR again, this test doesn't make sense:
   ```
   assertEquals("String[]", ClassUtils.getShortCanonicalName("[String"));
   ```
   We would be inventing a new syntax for array type names. I don't see where 
the JRE, Java Language Specification, or Java VM Specification allows such a 
syntax.
   
   The legal values are:
   - `"[Ljava.lang.String;"` is equivalent to ` String[].class.getName()`
   - `"java.lang.String[]"` is equivalent to `String[].class.getCanonicalName()`
   
   For example:
   ```
           assertEquals("String[]", 
ClassUtils.getShortCanonicalName(String[].class.getName()));
           assertEquals("String[]", 
ClassUtils.getShortCanonicalName(String[].class.getCanonicalName()));
           assertEquals("String[]", 
ClassUtils.getShortCanonicalName("String[]"));
   ```
   


-- 
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]

Reply via email to