title: Intellij Idea - ambiguous method call
body: <p>I encountered a strange error related to Java using Intellij Idea.</p>
  
  <p>So there is such interface : </p>
  
  <pre><code>&lt;T&gt; void save(T aEntity, DbTransaction dbTransaction, Class&lt;T&gt; clazz);
  &lt;T&gt; void save(Collection&lt;T&gt; aEntities, DbTransaction dbTransaction, Class&lt;T&gt; clazz);
  </code></pre>
  
  <p>When I try to compile the next code : </p>
  
  <pre><code>@SuppressWarnings("unchecked")
  @Override
  public void save(Collection&lt;T&gt; aEntities, DbTransaction aDbTransaction) {
      baseDao.save(aEntities, aDbTransaction, getClass((T) aEntities.toArray()[0]));
  }
  </code></pre>
  
  <p>I receive the next compilation error : </p>
  
  <pre><code>reference to save is ambiguous, both method &lt;T&gt;save(T,DbEntityHelper.DbTransaction,java.lang.Class&lt;T&gt;) in xzc.dao.IBaseDao and method &lt;T&gt;save(java.util.Collection&lt;T&gt;,DbEntityHelper.DbTransaction,java.lang.Class&lt;T&gt;) in xzc.dao.IBaseDao match
  </code></pre>
  
  <p>Do you have any ideas ?
  Thanks for help in advance.</p>