commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (Jira)" <j...@apache.org>
Subject [jira] [Work logged] (LANG-696) Deprecate ClassUtils getShortClassName in favor of Class getSimpleName
Date Tue, 08 Oct 2019 18:54:00 GMT

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

ASF GitHub Bot logged work on LANG-696:
---------------------------------------

                Author: ASF GitHub Bot
            Created on: 08/Oct/19 18:53
            Start Date: 08/Oct/19 18:53
    Worklog Time Spent: 10m 
      Work Description: garydgregory commented on pull request #449: Update documentation
related to the issue LANG-696
URL: https://github.com/apache/commons-lang/pull/449
 
 
   
 
----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 325276)
    Time Spent: 50m  (was: 40m)

> 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
>            Priority: Major
>             Fix For: Discussion
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> Added two null-safe ClassUtils.getSimpleName() APIs.
> ---------- Forwarded message ----------
> From: Gary Gregory <garydgregory@gmail.com>
> Date: Mon, Apr 11, 2011 at 10:18 AM
> Subject: [Lang] ClassUtils getShortClassName != Class getSimpleName
> To: Commons Developers List <dev@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 was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message