[ 
https://issues.apache.org/jira/browse/LANG-535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12759118#action_12759118
 ] 

mark juchems commented on LANG-535:
-----------------------------------

Doing this in java :

String sArray[] = new String[2];
sArray[0] = "mark";
sArray[1] = "is cool";
String simpleString = "chris";

sArray.getClass() = "class [Ljava.lang.String;"

I am sure this is where they are going wrong.  I have not looked into the code, 
however, I would imagine they are taking everything past the last ".".

I am not sure what the correct return should be.  I know what I would like it 
to be, and that is apparent.  However, an "array" is a primitive data type and 
therefore not an Object,  so I believe it should throw and exception.  But that 
would not be helpful...


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

Reply via email to