smolnar82 commented on a change in pull request #358:
URL: https://github.com/apache/knox/pull/358#discussion_r452243627



##########
File path: 
gateway-server/src/main/java/org/apache/knox/gateway/services/factory/AliasServiceFactory.java
##########
@@ -44,22 +41,17 @@ public Service create(GatewayServices gatewayServices, 
ServiceType serviceType,
       final AliasService defaultAliasService = new DefaultAliasService();
       ((DefaultAliasService) 
defaultAliasService).setMasterService(getMasterService(gatewayServices));
       ((DefaultAliasService) 
defaultAliasService).setKeystoreService(getKeystoreService(gatewayServices));
-      defaultAliasService.init(gatewayConfig, options); //invoking init on 
DefaultAliasService twice is ok (in case implementation is set to 'default')
-      switch (implementation) {
-      case DEFAULT_IMPLEMENTATION_NAME:
-      case "":
+      defaultAliasService.init(gatewayConfig, options); // invoking init on 
DefaultAliasService twice is ok (in case implementation is set to 'default')
+
+      if (matchesImplementation(implementation, DefaultAliasService.class, 
true)) {

Review comment:
       If you check out the rest of the implementations, they all use the 
`defaultAliasService` instance for their purpose. It was the same way (as a 
local alias service)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to