equal
deleted
inserted
replaced
2767 |
2767 |
2768 public void validateTypeAnnotation(JCAnnotation a, boolean isTypeParameter) { |
2768 public void validateTypeAnnotation(JCAnnotation a, boolean isTypeParameter) { |
2769 Assert.checkNonNull(a.type, "annotation tree hasn't been attributed yet: " + a); |
2769 Assert.checkNonNull(a.type, "annotation tree hasn't been attributed yet: " + a); |
2770 validateAnnotationTree(a); |
2770 validateAnnotationTree(a); |
2771 |
2771 |
2772 if (!isTypeAnnotation(a, isTypeParameter)) |
2772 if (a.hasTag(TYPE_ANNOTATION) && |
|
2773 !a.annotationType.type.isErroneous() && |
|
2774 !isTypeAnnotation(a, isTypeParameter)) { |
2773 log.error(a.pos(), "annotation.type.not.applicable"); |
2775 log.error(a.pos(), "annotation.type.not.applicable"); |
|
2776 } |
2774 } |
2777 } |
2775 |
2778 |
2776 /** |
2779 /** |
2777 * Validate the proposed container 'repeatable' on the |
2780 * Validate the proposed container 'repeatable' on the |
2778 * annotation type symbol 's'. Report errors at position |
2781 * annotation type symbol 's'. Report errors at position |