title: Error: type parameters of <T>T cannot be determined during Maven Install
body: <p>I have this function throwing weird error when I try to do a "mvn install"</p>
  
  <pre><code>public &lt;T&gt; T get(final AN_ENUM key)
  {
      return some_map.get(key);
  }
  </code></pre>
  
  <p>This is the line where I get the error </p>
  
  <pre><code>final int value = get(AN_ENUM.A_FIELD);
  </code></pre>
  
  <p>And this is the error in maven:</p>
  
  <pre><code>XXX.java:[25,41] type parameters of &lt;T&gt;T cannot be determined; 
    no unique maximal instance exists for type variable T with 
    upper bounds int,java.lang.Object
  </code></pre>
  
  <p>I know already how to "fix it". I just need to change the <code>int</code> to <code>Integer</code> in my last code sample and the bug goes away. It tell me that maven, for some sort of reason is not able to cast an Integer as an int when I use a type parameter.</p>
  
  <p><strong>My Question is.. why ?</strong></p>
  
  <p>In eclipse, using the same JDK, I have been able to run my application without any kind trouble nor warning.</p>
  
  <ul>
  <li>JDK 1.6</li>
  <li>Eclipse Indigo Service Release 2</li>
  <li>Maven 3.0.4</li>
  </ul>