Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-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 98D4D642A for ; Wed, 18 May 2011 21:43:28 +0000 (UTC) Received: (qmail 40036 invoked by uid 500); 18 May 2011 21:43:28 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 40012 invoked by uid 500); 18 May 2011 21:43:28 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 40004 invoked by uid 99); 18 May 2011 21:43:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 May 2011 21:43:28 +0000 X-ASF-Spam-Status: No, hits=-1998.0 required=5.0 tests=ALL_TRUSTED,FB_GET_MEDS,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 May 2011 21:43:27 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 89509D01E9 for ; Wed, 18 May 2011 21:42:47 +0000 (UTC) Date: Wed, 18 May 2011 21:42:47 +0000 (UTC) From: "Hudson (JIRA)" To: common-issues@hadoop.apache.org Message-ID: <1999246873.24177.1305754967559.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1419221698.23009.1305741287424.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HADOOP-7300) Configuration methods that return collections are inconsistent about mutability 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/HADOOP-7300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13035708#comment-13035708 ] Hudson commented on HADOOP-7300: -------------------------------- Integrated in Hadoop-Common-22-branch #51 (See [https://builds.apache.org/hudson/job/Hadoop-Common-22-branch/51/]) HADOOP-7300. Configuration methods that return collections are inconsistent about mutability. Contributed by Todd Lipcon. todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1124370 Files : * /hadoop/common/branches/branch-0.22/src/java/org/apache/hadoop/util/StringUtils.java * /hadoop/common/branches/branch-0.22/CHANGES.txt * /hadoop/common/branches/branch-0.22/src/test/core/org/apache/hadoop/conf/TestConfiguration.java * /hadoop/common/branches/branch-0.22/src/java/org/apache/hadoop/conf/Configuration.java > Configuration methods that return collections are inconsistent about mutability > ------------------------------------------------------------------------------- > > Key: HADOOP-7300 > URL: https://issues.apache.org/jira/browse/HADOOP-7300 > Project: Hadoop Common > Issue Type: Bug > Components: conf > Affects Versions: 0.22.0 > Reporter: Todd Lipcon > Assignee: Todd Lipcon > Fix For: 0.22.0 > > Attachments: hadoop-7300.txt > > > In particular, getTrimmedStringCollection seems to return an immutable collection, whereas getStringCollection returns a mutable one. > IMO we should always return mutable collections since these methods by definition are doing copies. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira