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

Add isEmpty method to ObjectUtils

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.9
    • Component/s: None
    • Labels:
      None

      Description

      In Spring's org.springframework.util.ObjectUtils there's a null-safe isEmpty method that checks whether an object is empty based on its type. If the object is a string it calls String.isEmpty, if it's a collection it calls Collection.isEmpty, etc. I think a similar method would be a really nice addition to org.apache.commons.lang3.ObjectUtils, as it would allow people like me to use it without adding a dependency to Spring or re-implementing the method in our code.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                britter Benedikt Ritter
                Reporter:
                nictas Alexander Tsvetkov
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: