Skip to content

Commit

Permalink
HSEARCH-2484 Minor optimisation of lookup for Provided Services
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanne committed Dec 19, 2016
1 parent e5e525a commit 78a720f
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -72,8 +72,9 @@ public <S extends Service> S requestService(Class<S> serviceRole) {
}

// provided services have priority over managed services
if ( providedServices.containsKey( serviceRole ) ) {
return (S) providedServices.get( serviceRole );
final Object providedService = providedServices.get( serviceRole );
if ( providedService != null ) {
return (S) providedService;
}

ServiceWrapper<S> wrapper = (ServiceWrapper<S>) cachedServices.get( serviceRole );
Expand Down

0 comments on commit 78a720f

Please sign in to comment.