title: issue with java 8 collectors Type mismatch: cannot convert from List<Object> to List<String>
body: <p>i was having working code with earlier version of java 8 which i was using to get unique values from list but since i upgraded to JDK 66 its giving me an error </p>
  
  <p><strong><em>Type mismatch: cannot convert from <code>List&lt;Object&gt;</code> to <code>List&lt;String&gt;</code></em></strong></p>
  
  <pre><code>List&lt;String&gt; instList = new ArrayList&lt;String&gt;();
  
  while (res.next()) {
      instList.add(res.getString("INST").toString());
  }           
  
  List&lt;String&gt; instListF = instList.stream().distinct().collect(Collectors.toList());
  </code></pre>
  
  <p>Where <strong><em>res</em></strong> is resultset i am getting from database, not sure what is wrong any idea?</p>