title: Why RecordComponent doesn't have annotation info that is defined in the Records class in Java 17?
body: <p>I play with records and found something that doesn't look logical to me:</p>
  <p>Record:</p>
  <pre><code>record R(@NotEmpty Integer i) {}
  </code></pre>
  <p>Code:</p>
  <pre><code>RecordComponent[] recordComponents = R.class.getRecordComponents();
  System.out.println(recordComponents[0].isAnnotationPresent(NotEmpty.class));
  //prints false
  </code></pre>
  <p>However, if I do:</p>
  <pre><code>System.out.println(R.class.getDeclaredFields()[0].isAnnotationPresent(NotEmpty.class));
  //prints true
  </code></pre>
  <p>Is that expected? Because <code>RecordComponent implements AnnotatedElement</code>, so I thought <code>RecordComponent</code> should have info about annotations. Are my expectations wrong?</p>