Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 53139 invoked from network); 18 Sep 2009 06:41:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Sep 2009 06:41:20 -0000 Received: (qmail 21676 invoked by uid 500); 18 Sep 2009 06:41:19 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 21562 invoked by uid 500); 18 Sep 2009 06:41:19 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 21552 invoked by uid 99); 18 Sep 2009 06:41:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Sep 2009 06:41:19 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Sep 2009 06:41:17 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 81ECE234C044 for ; Thu, 17 Sep 2009 23:40:57 -0700 (PDT) Message-ID: <160708931.1253256057514.JavaMail.jira@brutus> Date: Thu, 17 Sep 2009 23:40:57 -0700 (PDT) From: "Henri Yandell (JIRA)" To: issues@commons.apache.org Subject: [jira] Updated: (LANG-531) Add defaultIfEmpty or nullIfEmpty to ArrayUtils In-Reply-To: <172533768.1252632717467.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LANG-531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Henri Yandell updated LANG-531: ------------------------------- Attachment: LANG-531.patch Adding patch. > Add defaultIfEmpty or nullIfEmpty to ArrayUtils > ----------------------------------------------- > > Key: LANG-531 > URL: https://issues.apache.org/jira/browse/LANG-531 > Project: Commons Lang > Issue Type: Improvement > Affects Versions: 2.4 > Reporter: Guy Rouillier > Priority: Minor > Fix For: 3.0 > > Attachments: LANG-531.patch > > > 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.