I am reading hadoop source code , Here I have a doubt org.apache.hadoop.util.StringUtils they reassigned a list which is already intiailized.  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>();    while (tokenizer.hasMoreTokens()) {      values.add(tokenizer.nextToken());    }    return values;  }Is there any reason to reassign here?
Is this correct to reassign already intialized variable?
java
It looks like a useless reassignment.  It must be some refactoring gone wrong.  At worst, it will cause a tiny performance hit.