From 14e5e35003f6741606d79a25203733f3e98d0346 Mon Sep 17 00:00:00 2001 From: Matej Novotny Date: Wed, 18 Nov 2020 10:35:20 +0100 Subject: [PATCH] Remove @Target limitations of @Priority annotation. Signed-off-by: Matej Novotny --- api/src/main/java/jakarta/annotation/Priority.java | 5 ++--- spec/src/main/asciidoc/spec.adoc | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/api/src/main/java/jakarta/annotation/Priority.java b/api/src/main/java/jakarta/annotation/Priority.java index dfd7b1c..f410bcf 100644 --- a/api/src/main/java/jakarta/annotation/Priority.java +++ b/api/src/main/java/jakarta/annotation/Priority.java @@ -21,8 +21,8 @@ import static java.lang.annotation.RetentionPolicy.*; /** - * The Priority annotation can be applied to classes - * or parameters to indicate in what order they should be used. + * The Priority annotation can be applied to any program elements + * to indicate in what order they should be used. * The effect of using the Priority annotation in * any particular instance is defined by other specifications that * define the use of a specific class. @@ -39,7 +39,6 @@ * * @since Common Annotations 1.2 */ -@Target({TYPE,PARAMETER}) @Retention(RUNTIME) @Documented public @interface Priority { diff --git a/spec/src/main/asciidoc/spec.adoc b/spec/src/main/asciidoc/spec.adoc index 07a5f8f..03126c3 100644 --- a/spec/src/main/asciidoc/spec.adoc +++ b/spec/src/main/asciidoc/spec.adoc @@ -702,7 +702,7 @@ private Connection connection; === jakarta.annotation.Priority The _Priority_ annotation can be applied to -classes or parameters to indicate in what order they should be used. The +any program elements to indicate in what order they should be used. The effect of using the _Priority_ annotation in any particular instance is defined by other specifications that define the use of a specific class. @@ -724,7 +724,6 @@ import java.lang.annotation.*; import static java.lang.annotation.ElementType.*; import static java.lang.annotation.RetentionPolicy.*; -@Target({TYPE, PARAMETER}) @Retention(RUNTIME) @Documented public @interface Priority {