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

Gary D. Gregory edited comment on LANG-696 at 4/21/11 3:29 PM:
---------------------------------------------------------------

---------- Forwarded message ----------
From: Gary Gregory <garydgreg...@gmail.com>
Date: Mon, Apr 11, 2011 at 6:43 PM
Subject: Re: [Lang] ClassUtils getShortClassName != Class getSimpleName
To: Commons Developers List <d...@commons.apache.org>
Cc: Henri Yandell <flame...@gmail.com>


On Mon, Apr 11, 2011 at 4:26 PM, Henri Yandell <flame...@gmail.com> wrote:
{noformat}
    +1 to rename getShortClassName to getSimpleName; sitting on top of the
    JDK getSimpleName and providing null safety and whatever other
    features are needed (for example array encoding).
{noformat}

You must mean deprecate getShortClassName (to remove in 4.0) and add 
getSimpleName. Right?

      was (Author: garydgregory):
    ---------- Forwarded message ----------
From: Gary Gregory <garydgreg...@gmail.com>
Date: Mon, Apr 11, 2011 at 6:43 PM
Subject: Re: [Lang] ClassUtils getShortClassName != Class getSimpleName
To: Commons Developers List <d...@commons.apache.org>
Cc: Henri Yandell <flame...@gmail.com>


On Mon, Apr 11, 2011 at 4:26 PM, Henri Yandell <flame...@gmail.com> wrote:

    +1 to rename getShortClassName to getSimpleName; sitting on top of the
    JDK getSimpleName and providing null safety and whatever other
    features are needed (for example array encoding).


You must mean deprecate getShortClassName (to remove in 4.0) and add 
getSimpleName. Right?
  
> Deprecate ClassUtils getShortClassName in favor of Class getSimpleName
> ----------------------------------------------------------------------
>
>                 Key: LANG-696
>                 URL: https://issues.apache.org/jira/browse/LANG-696
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.*
>    Affects Versions: 2.6
>            Reporter: Gary D. Gregory
>            Assignee: Gary D. Gregory
>             Fix For: 3.0
>
>
> Added two null-safe ClassUtils.getSimpleName() APIs.
> ---------- Forwarded message ----------
> From: Gary Gregory <garydgreg...@gmail.com>
> Date: Mon, Apr 11, 2011 at 10:18 AM
> Subject: [Lang] ClassUtils getShortClassName != Class getSimpleName
> To: Commons Developers List <d...@commons.apache.org>
> Hi All:
> Should we deprecate ClassUtils getShortClassName in favor of Class 
> getSimpleName?
> The behavior of getShortClassName is undocumented for arrays in the Javadoc 
> and is different from getSimpleName.
> When I replace the guts of getShortClassName to call getSimpleName, one test 
> fails:
> junit.framework.ComparisonFailure: null 
> expected:<[ToStringStyleTest.]Person[name=John Q. ...> but 
> was:<[]Person[name=John Q. ...>
>     at junit.framework.Assert.assertEquals(Assert.java:81)
>     at junit.framework.Assert.assertEquals(Assert.java:87)
>     at 
> org.apache.commons.lang3.builder.ShortPrefixToStringStyleTest.testPerson(ShortPrefixToStringStyleTest.java:86)
> For now, I've made a note in the Javdoc to consider using getSimpleName.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to