Skip to content

Commit

Permalink
Remove @target limitations of @priority annotation.
Browse files Browse the repository at this point in the history
Signed-off-by: Matej Novotny <manovotn@redhat.com>
  • Loading branch information
manovotn authored and m0mus committed Jun 29, 2021
1 parent 7474552 commit 14e5e35
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions api/src/main/java/jakarta/annotation/Priority.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -39,7 +39,6 @@
*
* @since Common Annotations 1.2
*/
@Target({TYPE,PARAMETER})
@Retention(RUNTIME)
@Documented
public @interface Priority {
Expand Down
3 changes: 1 addition & 2 deletions spec/src/main/asciidoc/spec.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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 {
Expand Down

0 comments on commit 14e5e35

Please sign in to comment.