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

[lang][patch] Make ClassUtils methods null-safe and not throw an IAE.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0
    • 2.1
    • None
    • None
    • Operating System: other
      Platform: Other

    • 27877

    Description

      A number of ClassUtils methods that a designed to return Strings throw a new
      IllegalArgumentException when the input arg is null. I would like to change
      these methods to return "" (or null). The methods are:

      String getShortClassName(Class cls)
      String getShortClassName(String className)
      String getPackageName(Class cls)
      String getPackageName(String className)

      Thoughts for or against?

      Attachments

        1. ASF.LICENSE.NOT.GRANTED--ClassUtils-v1.28.patch
          4 kB
          ggregory@seagullsw.com
        2. ASF.LICENSE.NOT.GRANTED--ClassUtilsTest-v1.11.patch
          3 kB
          ggregory@seagullsw.com

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ggregory Gary D. Gregory
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: