title: Why does AllOf() of Hamcrest is Ok in IDEA rather than Eclipse?
body: <p>The following testing code can be compiled successfully in IDEA, while can not be compiled in Eclipse. The message from Eclipse is:</p>
  <blockquote>
  <p>The method allOf(Matcher&lt;? super T&gt;, Matcher&lt;? super T&gt;) in the type Matchers is not applicable for the arguments (Matcher&lt;Object[]&gt;, Matcher&lt;Double[]&gt;).</p>
  </blockquote>
  <p>I think the type of the first argument of allOf() is inferred as Matcher&lt;Object&gt;, while the type of the second as Matcher&lt;Double&gt;. But the allOf() requires the both arguments are the same. If this is the case, why does Eclipse do its inference in this way?</p>
  <pre><code>public class HamTest {
      @Test
      public void test() {
          Double s[] = { 23.0, 65.0 };
          assertThat(s, allOf(arrayWithSize(2), arrayContaining(lessThan(25.0), greaterThan(30.0))));
      }
  }
  </code></pre>