Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-1480

ClassUtils. getAbbreviatedName(String ,int) returns too long result

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.9
    • Fix Version/s: 3.10
    • Component/s: lang.*
    • Labels:
      None
    • Environment:

      Environment independent.

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kinow Bruno P. Kinoshita
                Reporter:
                peter@verhas.com Peter Verhas
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 24h
                  24h
                  Remaining:
                  Time Spent - 8h 40m Remaining Estimate - 15h 20m
                  15h 20m
                  Logged:
                  Time Spent - 8h 40m Remaining Estimate - 15h 20m
                  8h 40m