title: Annotations on an overridden method are ignored in Java 8 PropertyDescriptor
body: <p>I'm not quite sure how to describe this problem succinctly, so please bear with me.</p>
  
  <p>I am investigating upgrading our application from Java 7 to Java 8. The application relies on the use of reflection in order to dynamically create instances of various business entities (a so-called <a href="http://adaptiveobjectmodel.com/" rel="nofollow">"Adaptive Object Model"</a>). When I try building the application with the latest Java 8 (Oracle 1.8.0_25) some of the tests start to fail. Specifically, there is a test which checks to see if a getter method in a 'test entity' is annotated with a particular annotation, and the test fails because the annotation is not found. The super "entity" class has some generic fields which apply to all entity instances (name, description, displayname, etc.), and in the test class the "test entity" extends "entity" and overrides one of the getter methods (getDisplayName) and adds an additional annotation:</p>
  
  <pre><code>static class EntityWithCompositeDisplayName extends Entity {
      @CompositeProperty("${name} - ${description}")
      @Override
      public String getDisplayName() {
          return super.getDisplayName();
      }
  }
  </code></pre>
  
  <p>@CompositeProperty is our own annotation. It has a METHOD target and RUNTIME retention.</p>
  
  <p>The test calls the following code to see if the annotation is present:</p>
  
  <pre><code>    CompositeProperty compositeProperty = propd.getReadMethod().getAnnotation(CompositeProperty.class);
  </code></pre>
  
  <p>"compositeProperty" returns null in Java 8, but not-null in Java 7. But if I try to getAnnotation() for one of the annotations declare on the super getDisplayName() method then it is fine. Similarly, if I move the CompositeProperty annotation to the superclass then the test passes, however this is not an option in practice. Can anyone explain this behaviour? </p>