title: Unreachable statement return in java
body: <p>I have a method what return a list, but when i run the code, appears Unreachable statement
  this method come from a aidl file and generate a map with the return.</p>
  
  <p>code bellow:</p>
  
  <pre><code>List&lt;String&gt; list = new ArrayList&lt;String&gt;();
  
  Public List&lt;String&gt; setMethod(Map map) {
      ContentValues cv = null;
      Iterator i = map.keySet().iterator();
      Iterator j = map.values().iterator();
  
      if(map.isEmpty() || map == null) {
          return null;
      } else {
          try {
              while(i.hasNext()) {
                  String str = (String) i.next();
                  Long l = (Long) j.next();
                  list.add(str);
                  cv.put(Storage.STR, str);
                  if(Provider.insert(Storage.Table, cv) &lt; 0) {
                     return null;
                  }
              }
              if(list.isEmpty() || list == null) {
                  return null;
              } else {
                  return mPathList;
              }
          } catch (Exception e) {
              return null;
          }
     return list;
  }
  </code></pre>
  
  <p>Anybody can give me a light what i can make for dolve it?</p>