报告对非运行时注解的存在与否执行反射性检查的尝试。

使用 Class.isAnnotationPresent() 测试保留策略设置为 SOURCECLASS (默认值) 的注解是否始终得到负值结果。 这个错误很容易被忽视。

示例:

  { 
    getClass().isAnnotationPresent(SourceAnnotation.class); //始终为 false
  }
  
  @Retention(RetentionPolicy.SOURCE)
  @interface SourceAnnotation {}