Skip to content

Commit 1178506

Browse files
committed
UNITSOFMEASUREMENT-194: JavaDoc
Task-Url: https://java.net/jira/browse/UNITSOFMEASUREMENT-194
1 parent ce813f9 commit 1178506

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/main/java/javax/measure/spi/ServiceProvider.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,15 +133,19 @@ public int compare(ServiceProvider p1, ServiceProvider p2) {
133133
* @return all available service providers.
134134
*/
135135
public static List<ServiceProvider> available() {
136-
return Arrays.asList(getProviders()); // .clone();
136+
return Arrays.asList(getProviders());
137137
}
138138

139139
/**
140140
* Returns the current {@link ServiceProvider}. If necessary the {@link ServiceProvider} will be lazily loaded.
141-
*
141+
* <p>
142+
* If there are no providers available, an {@linkplain IllegalStateException} is thrown, otherwise the provider with the highest priority is used or the one explicitly designated via {@link setCurrent()} .
143+
* </p>
142144
* @return the {@link ServiceProvider} used.
143145
* @throws IllegalStateException
144146
* if no {@link ServiceProvider} has been found.
147+
* @see #getPriority()
148+
* @see #setCurrent()
145149
*/
146150
public static ServiceProvider current() {
147151
ServiceProvider[] p = getProviders();

0 commit comments

Comments
 (0)