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

Peter Verhas commented on LANG-1480:
------------------------------------

One code reviewer (garydgregory) insists that the unit tests should be 
consistent having all unit test methods and classes the same visibility. And he 
is right.

On the other hand, I cannot ignore Robert C. Martin's instruction that says "Do 
not ship shit." So instead of degrading the new or modified unit test applying 
an outdated pattern that has no relevance any more just for the sake of 
consistency I created the change in the linked issue to achieve the consistency 
first and then there will be no blocking to make this bug fix merged.

> ClassUtils. getAbbreviatedName(String ,int) returns too long result
> -------------------------------------------------------------------
>
>                 Key: LANG-1480
>                 URL: https://issues.apache.org/jira/browse/LANG-1480
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.*
>    Affects Versions: 3.9
>         Environment: Environment independent.
>            Reporter: Peter Verhas
>            Assignee: Bruno P. Kinoshita
>            Priority: Major
>   Original Estimate: 24h
>          Time Spent: 7h 20m
>  Remaining Estimate: 16h 40m
>
> In some cases, the algorithm decides incorrectly when to which package names 
> to abbreviate. For example, abbreviating
> {{org.apache.commons.lang3.ClassUtils}} to the length 18 will result 
> {{o.a.c.lang3.ClassUtils}} (22 characters) instead of {{o.a.c.l.ClassUtils}} 
> (18 characters as requested). The reason for this is that the algorithm 
> starts from the right and goes to the left abbreviating the packages and 
> starts to abbreviate the packages when it runs out of the available space.
> Instead, the algorithm should start from the left and abbreviate all packages 
> that would result in a too-long string without abbreviating the package name.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to