Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 761EC188C2 for ; Fri, 27 Nov 2015 21:48:32 +0000 (UTC) Received: (qmail 1433 invoked by uid 500); 27 Nov 2015 21:48:15 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 688 invoked by uid 500); 27 Nov 2015 21:48:14 -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 96853 invoked by uid 99); 27 Nov 2015 21:48:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Nov 2015 21:48:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 094382C1F87 for ; Fri, 27 Nov 2015 21:48:13 +0000 (UTC) Date: Fri, 27 Nov 2015 21:48:13 +0000 (UTC) From: "Thomas Neidhart (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Closed] (COLLECTIONS-370) Add method MapUtils.putIfNotNull MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/COLLECTIONS-370?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Neidhart closed COLLECTIONS-370. --------------------------------------- > Add method MapUtils.putIfNotNull > -------------------------------- > > Key: COLLECTIONS-370 > URL: https://issues.apache.org/jira/browse/COLLECTIONS-370 > Project: Commons Collections > Issue Type: New Feature > Components: Map > Affects Versions: 3.2 > Reporter: Tom Pasierb > Priority: Minor > Attachments: COLLECTIONS-370.patch > > > Add method MapUtils.putIfNotNull that adds the given value to the map only if it is not null. > Possible implementation: > public static void putIfNotNull(Map map, K key, V value) { > if (value != null) { > map.put(key, value); > } > } -- This message was sent by Atlassian JIRA (v6.3.4#6332)