commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guy Rouillier (JIRA)" <>
Subject [jira] Created: (LANG-531) Add defaultIfEmpty or nullIfEmpty to ArrayUtils
Date Fri, 11 Sep 2009 01:31:57 GMT
Add defaultIfEmpty or nullIfEmpty to ArrayUtils

                 Key: LANG-531
             Project: Commons Lang
          Issue Type: Improvement
    Affects Versions: 2.4
            Reporter: Guy Rouillier
            Priority: Minor

StringUtils has method defaultIfEmpty and ObjectUtils has defaultIfNull.  A parallel method
is missing from ArrayUtils, and would provide a shorthand way of normalizing arrays.  My first
inclination was nullIfEmpty because no simple default value is readily available or easy to
specify.  But Henri mentioned that defaultIfEmpty might better parallel the other implementations.
 That option would work okay for me, as I can just specify null as the default.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message