[GitHub] [commons-lang] garydgregory commented on a change in pull request #446: LANG-1480 getAbbreviatedName refactored to create appropriate length …

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] [commons-lang] garydgregory commented on a change in pull request #446: LANG-1480 getAbbreviatedName refactored to create appropriate length …

GitBox
garydgregory commented on a change in pull request #446: LANG-1480 getAbbreviatedName refactored to create appropriate length …
URL: https://github.com/apache/commons-lang/pull/446#discussion_r325199931
 
 

 ##########
 File path: src/main/java/org/apache/commons/lang3/ClassUtils.java
 ##########
 @@ -424,7 +424,14 @@ public static String getAbbreviatedName(final Class<?> cls, final int len) {
      * significant loss of meaning.</p>
      * <p>The abbreviated class name will always include the complete package hierarchy.
      * If enough space is available, rightmost sub-packages will be displayed in full
-     * length.</p>
+     * length. The abbreviated package names will be shortened to a single character.</p>
+     * <p>Only package names are shortened, the class simple name remains untouched. (See examples.)</p>
+     * <p>The result will be longer than the desired length only if all the package names
+     * shortened to a single character plus the class simple name with the separating dots
+     * together are longer than the desired length. In other words, when the class name
+     * cannot be shortened to the desired length without significant loss of meaning.</p>
+     * <p>If the class name can be shortened without significant loss of meaning then
 
 Review comment:
   I do not think we should talk about "loss of meaning" as to me, abbreviating implies "loss of meaning" by design ;-) Just describe what it does. IMO a list would be better to describe the different use cases.

----------------------------------------------------------------
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:
[hidden email]


With regards,
Apache Git Services