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

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

                Author: ASF GitHub Bot
            Created on: 26/Aug/19 09:43
            Start Date: 26/Aug/19 09:43
    Worklog Time Spent: 10m 
      Work Description: kinow commented on pull request #446: LANG-1480 
getAbbreviatedName refactored to create appropriate length …
URL: https://github.com/apache/commons-lang/pull/446#discussion_r317530498
 
 

 ##########
 File path: src/main/java/org/apache/commons/lang3/ClassUtils.java
 ##########
 @@ -987,33 +1005,35 @@ public static boolean isAssignable(Class<?> cls, final 
Class<?> toClass, final b
 
     // Inner class
     // ----------------------------------------------------------------------
+
     /**
      * <p>Is the specified class an inner class or static nested class.</p>
      *
-     * @param cls  the class to check, may be null
+     * @param cls the class to check, may be null
      * @return {@code true} if the class is an inner or static nested class,
-     *  false if not or {@code null}
+     * false if not or {@code null}
      */
     public static boolean isInnerClass(final Class<?> cls) {
         return cls != null && cls.getEnclosingClass() != null;
     }
 
     // Class loading
     // ----------------------------------------------------------------------
+
     /**
      * Returns the class represented by {@code className} using the
      * {@code classLoader}.  This implementation supports the syntaxes
      * "{@code java.util.Map.Entry[]}", "{@code java.util.Map$Entry[]}",
      * "{@code [Ljava.util.Map.Entry;}", and "{@code [Ljava.util.Map$Entry;}".
      *
-     * @param classLoader  the class loader to use to load the class
-     * @param className  the class name
+     * @param classLoader the class loader to use to load the class
+     * @param className   the class name
      * @param initialize  whether the class must be initialized
      * @return the class represented by {@code className} using the {@code 
classLoader}
      * @throws ClassNotFoundException if the class is not found
      */
     public static Class<?> getClass(
-            final ClassLoader classLoader, final String className, final 
boolean initialize) throws ClassNotFoundException {
+        final ClassLoader classLoader, final String className, final boolean 
initialize) throws ClassNotFoundException {
 
 Review comment:
   I think now the PR has a lot more changes that are not related to LANG-1480. 
Are you able to undo formatting changes, and leave only the changes for the 
issue, please?
 
----------------------------------------------------------------
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:
us...@infra.apache.org


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

            Worklog Id:     (was: 301125)
    Remaining Estimate: 22h 20m  (was: 22.5h)
            Time Spent: 1h 40m  (was: 1.5h)

> 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: 1h 40m
>  Remaining Estimate: 22h 20m
>
> 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.2#803003)

Reply via email to