mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 03:21:12 +07:00
[java] repeatable annotations: check duplicated container annotations (IDEA-274553)
GitOrigin-RevId: 44ddf1c7fd34380627dbbc7c5d9343d7ffdde8a6
This commit is contained in:
committed by
intellij-monorepo-bot
parent
4a05392295
commit
2ea4beec8e
@@ -229,7 +229,7 @@ public final class AnnotationsHighlightUtil {
|
||||
return annotationError(annotationToCheck, description);
|
||||
}
|
||||
}
|
||||
else if (isAnnotationRepeatedTwice(owner, annotationType.getQualifiedName())) {
|
||||
if (isAnnotationRepeatedTwice(owner, annotationType.getQualifiedName())) {
|
||||
if (!languageLevel.isAtLeast(LanguageLevel.JDK_1_8)) {
|
||||
String description = JavaErrorBundle.message("annotation.duplicate.annotation");
|
||||
return HighlightInfo.newHighlightInfo(HighlightInfoType.ERROR).range(element).descriptionAndTooltip(description).create();
|
||||
|
||||
@@ -28,6 +28,10 @@ class C5 { }
|
||||
@A6 @A6 <error descr="Container annotation 'AA6' must not be present at the same time as the element it contains">@AA6</error> class C6 { }
|
||||
@A6 @A6 class C6bis1 { }
|
||||
@A6 @AA6 class C6bis2 { }
|
||||
@A6
|
||||
@<error descr="Duplicate annotation. The declaration of 'AA6' does not have a valid java.lang.annotation.Repeatable annotation">AA6</error>
|
||||
@<error descr="Duplicate annotation. The declaration of 'AA6' does not have a valid java.lang.annotation.Repeatable annotation">AA6</error>
|
||||
class C6bis3 { }
|
||||
|
||||
@Target({TYPE_USE}) @interface TA { }
|
||||
class DupTypeAnno {
|
||||
|
||||
Reference in New Issue
Block a user