Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-10208

Remove duplicate initialization in StringUtils.getStringCollection

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.3.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      The values is initialized twice.

      StringUtils.java
       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>();
      

        Attachments

        1. HADOOP-10208.patch
          0.7 kB
          Benoy Antony
        2. HADOOP-10208.patch
          0.9 kB
          Benoy Antony
        3. HADOOP-10208.patch
          1 kB
          Benoy Antony

          Activity

            People

            • Assignee:
              benoyantony Benoy Antony
              Reporter:
              benoyantony Benoy Antony
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: