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) {
111111    }
112112
113113    /** 
114-      * Delegate method for {@link ServiceProvider#getServices (Class)}. 
114+      * Delegate method for {@link ServiceProvider#getService (Class)}. 
115115     * 
116116     * @param serviceType the service type. 
117117     * @return the service found, or {@code null}. 
118118     * @see ServiceProvider#getServices(Class) 
119119     */ 
120120    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 );
126122    }
127123
128124}
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments