Collect into a HashSet using Java8 stream over a set gives `Type Mismatch` Error
<p>The following code compiles as expected:</p>

<pre><code>import java.util.Arrays;
import java.util.HashSet;
import java.util.stream.Collectors;

public class Test2 {
    String[] tt = new String[]{ "a", "b", "c"};

    HashSet&lt;String&gt; bb =
        Arrays.asList(tt).stream().
        map(s -&gt; s).
        collect(Collectors.toCollection(HashSet::new));
}
</code></pre>

<p>If I change <code>tt</code> to be a <code>HashSet</code> the Eclipse compiler fails with the message <code>Type mismatch: cannot convert from Collection&lt;HashSet&lt;String&gt;&gt; to HashSet&lt;String&gt;</code>:</p>

<pre><code>public class Test2 {
    HashSet&lt;String&gt; tt = new HashSet&lt;String&gt;(Arrays.asList(new String[]{ "a", "b", "c"}));

    HashSet&lt;String&gt; bb =
        Arrays.asList(tt).stream().
        map(s -&gt; s).
        collect(Collectors.toCollection(HashSet::new));
}
</code></pre>