title: Why overriding a generic method requires same bounds?
body: <p>For normal(non-generic) method, the sub-method is required to be override-equivalent with erasure of parent's method.</p>
  
  <p>But for generic method, the sub-method is required to have <strong>same type paraments</strong>, which means <strong>having same bounds</strong> for every argument, for example:</p>
  
  <pre><code>public abstract class Parent {
      public abstract &lt;T&gt; T example( Map&lt;String, Integer&gt; map) throws Exception;
  }
  public class Son1 extends Parent {
  // this could work
      @Override
      public &lt;T&gt; T example(Map&lt;String, Integer&gt; map) throws Exception {
          return null;
      }
  }
  
  public class Son2 extends Parent {
  // and this couldn't work
      @Override
      public &lt;T&gt; T example(Map map) throws Exception {
          return null;
      }
  }
  public class Son3 extends Parent {
  // and this could work
      @Override
      public Object example(Map map) throws Exception {
          return null;
      }
  }
  </code></pre>
  
  <p>I could find where this check done(<a href="https://github.com/AdoptOpenJDK/openjdk-jdk11u/blob/master/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java#L3240-L3241" rel="nofollow noreferrer">hasSameBounds</a>).</p>
  
  <p>Why doesn't Son2 work? Is there any description in JLS?</p>