commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joerg Schaible (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LANG-535) ClassUtils.getShortClassName() will not work with an array; it seems to add a semicolon to the end.
Date Fri, 25 Sep 2009 13:06:16 GMT

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

Joerg Schaible commented on LANG-535:
-------------------------------------

In that case you could have written:

{code:java}
ClassUtils.getShortClassName(o.getClass().isArray() ? o.getClass().getComponentType() : o.getClass())
{code}

However, we're getting OT here. Come to the user's list of Commons, or for XStream specific
questions to XStream's user's list ...

Cheers,
Jörg

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


Mime
View raw message