File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
src/main/java/javax/money/spi Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -111,18 +111,14 @@ public static <T> Collection<T> getServices(Class<T> serviceType) {
111
111
}
112
112
113
113
/**
114
- * Delegate method for {@link ServiceProvider#getServices (Class)}.
114
+ * Delegate method for {@link ServiceProvider#getService (Class)}.
115
115
*
116
116
* @param serviceType the service type.
117
117
* @return the service found, or {@code null}.
118
118
* @see ServiceProvider#getServices(Class)
119
119
*/
120
120
public static <T > T getService (Class <T > serviceType ) {
121
- List <T > services = getServiceProvider ().getServices (serviceType );
122
- return services
123
- .stream ()
124
- .findFirst ()
125
- .orElse (null );
121
+ return getServiceProvider ().getService (serviceType );
126
122
}
127
123
128
124
}
You can’t perform that action at this time.
0 commit comments