title: Why does this compile fine under Maven, but give me errors in Eclipse?
body: <p>I'm stepping into an open source project, currently built using Maven2. I imported the project into Eclipse and this bit of code is giving me problems:</p>
  
  <pre><code>public static enum HierarchyType implements Function&lt;MonetarySummary, SumOfMoney&gt;, Predicate&lt;Txaction&gt; {
      EARNINGS {
          @Override
          public SumOfMoney apply(MonetarySummary summary) {
              return summary.getEarnings();
          }
  
          @Override
          public boolean apply(Txaction txaction) {
              return txaction.getAmount().signum() &gt; 0;
          }
      },
      SPENDING {
          @Override
          public SumOfMoney apply(MonetarySummary summary) {
              return summary.getSpending();
          }
  
          @Override
          public boolean apply(Txaction txaction) {
              return txaction.getAmount().signum() &lt; 0;
          }
      },
      NET {
          @Override
          public SumOfMoney apply(MonetarySummary summary) {
              return summary.getNet();
          }
  
          @Override
          public boolean apply(Txaction txaction) {
              return true;
          }
      }
  }
  </code></pre>
  
  <p>Both <code>Function</code> and <code>Predicate</code> have <code>apply</code> methods (they're from the Google commons):</p>
  
  <pre><code>public interface Function&lt;F, T&gt; {
     T apply(@Nullable F from);
     ...
  }
  
  public interface Predicate&lt;T&gt; {
     boolean apply(@Nullable T input);
  }
  </code></pre>
  
  <p>Here's the error I get, in Eclipse only:</p>
  
  <pre><code>Description Resource    Path    Location    Type
  Name clash: The method apply(F) of type Function&lt;F,T&gt; has the same erasure as apply(T) of type Predicate&lt;T&gt; but does not override it    
  Name clash: The method apply(F) of type Function&lt;F,T&gt; has the same erasure as apply(T) of type Predicate&lt;T&gt; but does not override it    
  Name clash: The method apply(F) of type Function&lt;F,T&gt; has the same erasure as apply(T) of type Predicate&lt;T&gt; but does not override it    
  Name clash: The method apply(T) of type Predicate&lt;T&gt; has the same erasure as apply(F) of type Function&lt;F,T&gt; but does not override it    
  Name clash: The method apply(T) of type Predicate&lt;T&gt; has the same erasure as apply(F) of type Function&lt;F,T&gt; but does not override it    
  Name clash: The method apply(T) of type Predicate&lt;T&gt; has the same erasure as apply(F) of type Function&lt;F,T&gt; but does not override it    
  </code></pre>
  
  <p>So, what's going on here? Is it a compiler flag?</p>
  
  <p>For what it's worth, I'm running Eclipse 3.6, and maven is building using Java 1.6 on my OSX box:</p>
  
  <pre><code>Version: Helios Release
  Build id: 20100617-1415
  
  javac -version
  javac 1.6.0_20
  </code></pre>