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

[lang] add isEmpty method to ArrayUtils

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.1
    • None
    • None
    • Operating System: other
      Platform: Other

    • 26243

    Description

      Hi,

      I would like to see a new method added to ArrayUtils which checks if an array is
      empty or null. This method could look like this:

      /**

      • <p>Checks if an array is empty or null.</p>
        *
      • @param array the array to check, may be null
      • @return <code>true</code> if the array is empty or null
        */
        public static boolean isEmpty(final Object[] array) {
        return (array == null) || (array.length == 0);
        }

      is it possible to add such a method?

      thanks
      Maarten Coene

      Attachments

        Activity

          People

            Unassigned Unassigned
            maartenc Maarten Coene
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: