You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/jdk9/javax/measure/spi/ServiceProvider.java
+22-12Lines changed: 22 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,7 @@
54
54
* All the methods in this class are safe to use by multiple concurrent threads.
55
55
* </p>
56
56
*
57
-
* @version 2.0, November 4, 2020
57
+
* @version 2.1, November 16, 2020
58
58
* @author Werner Keil
59
59
* @author Martin Desruisseaux
60
60
* @since 1.0
@@ -104,9 +104,9 @@ protected ServiceProvider() {
104
104
* Allows to define a priority for a registered {@code ServiceProvider} instance.
105
105
* When multiple providers are registered in the system, the provider with the highest priority value is taken.
106
106
*
107
-
* <p>If the {@value #PRIORITY_ANNOTATION} annotation (from JSR-250) is present on the {@code ServiceProvider}
108
-
* implementation class, then that annotation is taken and this {@code getPriority()} method is ignored.
109
-
* Otherwise – if the {@code Priority} annotation is absent – this method is used as a fallback.</p>
107
+
* <p>If the {@value #PRIORITY_ANNOTATION} annotation (from JSR-250) or {@value #JAKARTA_PRIORITY_ANNOTATION} annotation (from Jakarta Annotations) is present on the {@code ServiceProvider}
108
+
* implementation class, then that annotation (first if both were present) is taken and this {@code getPriority()} method is ignored.
109
+
* Otherwise – if a {@code Priority} annotation is absent – this method is used as a fallback.</p>
110
110
*
111
111
* @return the provider's priority (default is 0).
112
112
*/
@@ -212,14 +212,19 @@ private static final class Selector implements Predicate<ServiceProvider>, Compa
212
212
/**
213
213
* Returns {@code true} if the given service provider has the name we are looking for.
214
214
* This method shall be invoked only if a non-null name has been specified to the constructor.
215
-
* This method looks for the {@value #NAMED_ANNOTATION} annotation, and if none are found fallbacks on
215
+
* This method looks for the {@value #NAMED_ANNOTATION} annotation or {@value #JAKARTA_NAMED_ANNOTATION} annotation, and if none are found fallbacks on
0 commit comments