Remove @Target limitations of @Priority annotation.
Signed-off-by: Matej Novotny <manovotn@redhat.com>
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 <code>Priority</code> annotation can be applied to classes
- * or parameters to indicate in what order they should be used.
+ * The <code>Priority</code> annotation can be applied to any program elements
+ * to indicate in what order they should be used.
* The effect of using the <code>Priority</code> 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 @@
=== 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 static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;
-@Target({TYPE, PARAMETER})
@Retention(RUNTIME)
@Documented
public @interface Priority {