You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Henri Yandell (JIRA)" <ji...@apache.org> on 2009/10/15 09:33:31 UTC

[jira] Closed: (LANG-535) ClassUtils.getShortClassName() will not work with an array; it seems to add a semicolon to the end.

     [ https://issues.apache.org/jira/browse/LANG-535?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henri Yandell closed LANG-535.
------------------------------

    Resolution: Fixed

 svn ci -m "Applying my patch from LANG-535 - adding support to getShortClassName and getPackageName for arrays, including primitive arrays and multi-dimensional arrays. Also stopped getPackageName relying on the underlying class.getPackage as it's sometimes null" src/test/org/apache/commons/lang/ClassUtilsTest.java src/java/org/apache/commons/lang/ClassUtils.java 
Sending        src/java/org/apache/commons/lang/ClassUtils.java
Sending        src/test/org/apache/commons/lang/ClassUtilsTest.java
Transmitting file data ..
Committed revision 825420.

> ClassUtils.getShortClassName() will not work with an array;  it seems to add a semicolon to the end.
> ----------------------------------------------------------------------------------------------------
>
>                 Key: LANG-535
>                 URL: https://issues.apache.org/jira/browse/LANG-535
>             Project: Commons Lang
>          Issue Type: Bug
>    Affects Versions: 2.4
>         Environment: Java 1.4.2
>            Reporter: mark juchems
>            Priority: Minor
>             Fix For: 3.0
>
>         Attachments: LANG-535.patch
>
>
> A semicolon is introduced into the class name at the end for all arrays...
> String sArray[] = new String[2];
> sArray[0] = "mark";
> sArray[1] = "is cool";
> String simpleString = "chris";
> 		
> assertEquals("String", ClassUtils.getShortClassName(simpleString, null));
> assertEquals("String;", ClassUtils.getShortClassName(sArray, null));

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.