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

Benedikt Ritter commented on LANG-1093:
---------------------------------------

Very nice patch overall. Just two points I'd like to talk about:

* How should negative values for {{len}} be handled? Currently we have 
{{ClassUtils.getAbbreviatedName(String.class, -1) == j.l.String}} but 
{{ClassUtils.getAbbreviatedName(String.class, 0) == String}}. Feels like we 
should throw IAE for negativ values.
* It's good to document corner cases as well, so that users don't have to try 
out themself. For example {{ClassUtils.getAbbreviatedName((Class<Object>) null, 
10) == ""}} could be documented. And of corse the behavior for negativ values.

> Add ClassUtils.getAbbreviatedName
> ---------------------------------
>
>                 Key: LANG-1093
>                 URL: https://issues.apache.org/jira/browse/LANG-1093
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.*
>            Reporter: Fabian Lange
>              Labels: github
>             Fix For: Review Patch
>
>
> It would be really nice to have a class name shortener functionality 
> available similar to what some logger frameworks use.
> I took the idea for my implementation from logback, including the quirky 
> treatment of the desired length argument, feel free to discuss on the PR/here.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to