title: interop scala with java Getting but Java-defined trait List is invariant in type E
body: <p>I am trying to return inherited java type from scala and I am getting 
  ... Java-defined trait List is invariant in type E</p>
  
  <p><strong>Java code :</strong></p>
  
  <pre><code>public interface Foo {
  ....
  }
  public class Bar implements Foo {
  ....
  }
  public interface FooReader {
    List&lt;Foo&gt; getFoos() throws Exception;
  }
  </code></pre>
  
  <p><strong>Scala Code:</strong></p>
  
  <pre><code>import scala.collection.JavaConverters._
  class Buz extends FooReader {
  def getFoos: util.List[Foo] = {
  val foos = List(new Bar).asjava
  foos
  }
  }
  </code></pre>
  
  <p>this doesn't compile :</p>
  
  <blockquote>
    <p>[ERROR] Note: Bar &lt;: Foo, but Java-defined trait List is invariant in
    type E.</p>
  </blockquote>
  
  <p>How can I solve it ?</p>