title: Getting 'mismatching null constraints' error when implementing Map.entrySet (Java8, Eclipse)
body: <p>I get the error...</p>
  
  <pre><code>The return type is incompatible with 'Set&lt;Map.Entry&lt;K,T&gt;&gt;' returned from Map&lt;K,T&gt;.entrySet() (mismatching null constraints)
  </code></pre>
  
  <p>...when implementing a <code>Map</code> and overriding <code>Map.entrySet</code> like this:</p>
  
  <pre><code>package org.abego.util;
  
  import java.util.LinkedHashMap;
  import java.util.Map;
  import java.util.Set;
  ...    
  public abstract class MyMap&lt;K, T&gt; implements Map&lt;K, T&gt; {
      private Map&lt;K, T&gt; map = new LinkedHashMap&lt;&gt;();
  
      @Override
      public Set&lt;java.util.Map.Entry&lt;K, T&gt;&gt; entrySet() {
          return map.entrySet();
      }
      ...
  }
  </code></pre>
  
  <p>The package <code>org.abego.util</code> defines the default nullness to be <code>@NonNull</code>:</p>
  
  <pre><code>@org.eclipse.jdt.annotation.NonNullByDefault
  package org.abego.util;
  </code></pre>
  
  <p>The only way I found to get rid of the error was to 'remove the default nullness annotation' for <code>entrySet</code> using an <code>@NonNullByDefault({})</code> annotation:</p>
  
  <pre><code>package org.abego.util;
  ...
  import org.eclipse.jdt.annotation.NonNullByDefault;
  
  public abstract class MyMap&lt;K, T&gt; implements Map&lt;K, T&gt; {
      ...
      @Override
      @NonNullByDefault({})
      public Set&lt;java.util.Map.Entry&lt;K, T&gt;&gt; entrySet() {
          return map.entrySet();
      }
      ...
  }
  </code></pre>
  
  <p>While this does work I am wondering if this is the <em>correct</em> way to fix the error.</p>
  
  <p>(I am using Eclipse 4.5 (Mars) and jdk1.8.0_60.)</p>