You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Benoy Antony (JIRA)" <ji...@apache.org> on 2014/01/07 01:32:50 UTC

[jira] [Created] (HADOOP-10208) Remove duplication initialization in StringUtils.getStringCollection

Benoy Antony created HADOOP-10208:
-------------------------------------

             Summary: Remove duplication initialization in StringUtils.getStringCollection
                 Key: HADOOP-10208
                 URL: https://issues.apache.org/jira/browse/HADOOP-10208
             Project: Hadoop Common
          Issue Type: Improvement
    Affects Versions: 2.2.0
            Reporter: Benoy Antony
            Assignee: Benoy Antony
            Priority: Trivial


The *values* is initialized twice.

{code:title=StringUtils.java|borderStyle=solid}
 public static Collection<String> getStringCollection(String str){
    List<String> values = new ArrayList<String>();
    if (str == null)
      return values;
    StringTokenizer tokenizer = new StringTokenizer (str,",");
    values = new ArrayList<String>();
{code}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)