knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kris...@apache.org
Subject [1/2] knox git commit: KNOX-1666 - Enable PMD best practices ruleset
Date Mon, 10 Dec 2018 22:52:56 GMT
Repository: knox
Updated Branches:
  refs/heads/master c478a0629 -> be7f4f37e


http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/CLIMasterService.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/CLIMasterService.java b/gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/CLIMasterService.java
index fb1dfb9..4d0926a 100644
--- a/gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/CLIMasterService.java
+++ b/gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/CLIMasterService.java
@@ -18,17 +18,13 @@
 package org.apache.knox.gateway.services.security.impl;
 
 import org.apache.knox.gateway.config.GatewayConfig;
-import org.apache.knox.gateway.i18n.messages.MessagesFactory;
 import org.apache.knox.gateway.services.ServiceLifecycleException;
 import org.apache.knox.gateway.services.security.MasterService;
 import org.apache.knox.gateway.services.Service;
-import org.apache.knox.gateway.GatewayMessages;
 
 import java.util.Map;
 
 public class CLIMasterService extends CMFMasterService implements MasterService, Service {
-  private static final GatewayMessages LOG = MessagesFactory.get( GatewayMessages.class );
-
   public CLIMasterService() {
     super("gateway");
   }

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/DefaultCryptoService.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/DefaultCryptoService.java b/gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/DefaultCryptoService.java
index 24487a0..3cf3cb6 100644
--- a/gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/DefaultCryptoService.java
+++ b/gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/DefaultCryptoService.java
@@ -43,8 +43,7 @@ public class DefaultCryptoService implements CryptoService {
 
   private AliasService as;
   private KeystoreService ks;
-  private HashMap<String,ConfigurableEncryptor> encryptorCache =
-      new HashMap<>();
+  private Map<String,ConfigurableEncryptor> encryptorCache = new HashMap<>();
   private GatewayConfig config;
 
   public void setKeystoreService(KeystoreService ks) {

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/DefaultMasterService.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/DefaultMasterService.java b/gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/DefaultMasterService.java
index fbb574c..fcebb88 100644
--- a/gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/DefaultMasterService.java
+++ b/gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/DefaultMasterService.java
@@ -18,17 +18,13 @@
 package org.apache.knox.gateway.services.security.impl;
 
 import org.apache.knox.gateway.config.GatewayConfig;
-import org.apache.knox.gateway.i18n.messages.MessagesFactory;
 import org.apache.knox.gateway.services.ServiceLifecycleException;
 import org.apache.knox.gateway.services.security.MasterService;
 import org.apache.knox.gateway.services.Service;
-import org.apache.knox.gateway.GatewayMessages;
 
 import java.util.Map;
 
 public class DefaultMasterService extends CMFMasterService implements MasterService, Service {
-  private static final GatewayMessages LOG = MessagesFactory.get( GatewayMessages.class );
-
   public DefaultMasterService() {
     super("gateway");
   }

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/RemoteAliasService.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/RemoteAliasService.java b/gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/RemoteAliasService.java
index e6470c0..aca172b 100644
--- a/gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/RemoteAliasService.java
+++ b/gateway-server/src/main/java/org/apache/knox/gateway/services/security/impl/RemoteAliasService.java
@@ -106,7 +106,6 @@ public class RemoteAliasService implements AliasService {
   private RemoteConfigurationRegistryClientService registryClientService;
   private MasterService ms;
   private GatewayConfig config;
-  private Map<String, String> options;
 
   /* create an instance */
   public RemoteAliasService() {
@@ -404,7 +403,6 @@ public class RemoteAliasService implements AliasService {
   public void init(final GatewayConfig config,
       final Map<String, String> options) throws ServiceLifecycleException {
     this.config = config;
-    this.options = options;
 
     /* setup and initialize encryptor for encryption and decryption of passwords */
     encryptor = new ConfigurableEncryptor(new String(ms.getMasterSecret()));

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-server/src/main/java/org/apache/knox/gateway/topology/simple/SimpleDescriptorHandler.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/knox/gateway/topology/simple/SimpleDescriptorHandler.java b/gateway-server/src/main/java/org/apache/knox/gateway/topology/simple/SimpleDescriptorHandler.java
index 84af519..da198c7 100644
--- a/gateway-server/src/main/java/org/apache/knox/gateway/topology/simple/SimpleDescriptorHandler.java
+++ b/gateway-server/src/main/java/org/apache/knox/gateway/topology/simple/SimpleDescriptorHandler.java
@@ -481,11 +481,11 @@ public class SimpleDescriptorHandler {
                         Map<String,String> parsedServiceHaParams = parseHaProviderParam(serviceHaParams);
                         String enabledValue = parsedServiceHaParams.get("enabled");
                         if (enabledValue != null) {
-                            if (enabledValue.equalsIgnoreCase("auto")) {
+                            if ("auto".equalsIgnoreCase(enabledValue)) {
                                 isServiceHaEnabledAuto = true;
                                 isServiceHaEnabled = (zkConf != null && zkConf.isEnabled());
                             } else {
-                                isServiceHaEnabled = enabledValue.equalsIgnoreCase("true");
+                                isServiceHaEnabled = "true".equalsIgnoreCase(enabledValue);
                             }
                         }
                     }

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-server/src/main/java/org/apache/knox/gateway/util/KnoxCLI.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/knox/gateway/util/KnoxCLI.java b/gateway-server/src/main/java/org/apache/knox/gateway/util/KnoxCLI.java
index 6355d5e..135c1eb 100644
--- a/gateway-server/src/main/java/org/apache/knox/gateway/util/KnoxCLI.java
+++ b/gateway-server/src/main/java/org/apache/knox/gateway/util/KnoxCLI.java
@@ -83,6 +83,7 @@ import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 import java.util.Properties;
+import java.util.Set;
 import java.util.UUID;
 
 public class KnoxCLI extends Configured implements Tool {
@@ -1109,7 +1110,6 @@ public class KnoxCLI extends Configured implements Tool {
       String authorizationEnabled = mainLdapRealm + ".authorizationEnabled";
       String userSearchAttributeName = mainLdapRealm + ".userSearchAttributeName";
       String userObjectClass = mainLdapRealm + ".userObjectClass";
-      String authenticationMechanism = mainLdapRealm + ".authenticationMechanism"; // Should not be used up to v0.6.0)
       String searchBase = mainLdapRealm + ".searchBase";
       String groupSearchBase = mainLdapRealm + ".groupSearchBase";
       String userSearchBase = mainLdapRealm + ".userSearchBase";
@@ -1247,40 +1247,6 @@ public class KnoxCLI extends Configured implements Tool {
 
     /**
      *
-     * @param userDn - fully qualified userDn used for LDAP authentication
-     * @return - returns the principal found in the userDn after "uid="
-     */
-    protected String getPrincipal(String userDn){
-      String result;
-
-//      Need to determine whether we are using AD or LDAP?
-//      LDAP userDn usually starts with "uid="
-//      AD userDn usually starts with cn/CN
-//      Find the userDN template
-
-      try {
-        Topology t = getTopology(cluster);
-        Provider shiro = t.getProvider("authentication", "ShiroProvider");
-
-        String p1 = shiro.getParams().get("main.ldapRealm.userDnTemplate");
-
-//        We know everything between first "=" and "," will be part of the principal.
-        int eq = userDn.indexOf('=');
-        int com = userDn.indexOf(',');
-        if(eq != -1 && com > eq && com != -1) {
-          result = userDn.substring(eq + 1, com);
-        } else {
-          result = "";
-        }
-        return result;
-      } catch (NoSuchTopologyException e) {
-        out.println(e.toString());
-        return userDn;
-      }
-    }
-
-    /**
-     *
      * @param t - topology configuration to use
      * @param config - the path to the shiro.ini file from the topology deployment.
      * @return - true/false whether LDAP successfully authenticated with system credentials.
@@ -1508,7 +1474,7 @@ public class KnoxCLI extends Configured implements Tool {
         "If a username and password argument are not supplied, the terminal will prompt you for one.";
 
     private static final String  SUBJECT_USER_GROUPS = "subject.userGroups";
-    private HashSet<String> groupSet = new HashSet<>();
+    private Set<String> groupSet = new HashSet<>();
 
     @Override
     public String getUsage() {
@@ -1558,15 +1524,15 @@ public class KnoxCLI extends Configured implements Tool {
       }
     }
 
-    private HashSet<String> getGroups(Topology t, UsernamePasswordToken token){
-      HashSet<String> groups = null;
+    private Set<String> getGroups(Topology t, UsernamePasswordToken token){
+      Set<String> groups = null;
       try {
         Subject subject = getSubject(getConfig(t));
         if(!subject.isAuthenticated()) {
           subject.login(token);
         }
         subject.hasRole(""); //Populate subject groups
-        groups = (HashSet) subject.getSession().getAttribute(SUBJECT_USER_GROUPS);
+        groups = (Set) subject.getSession().getAttribute(SUBJECT_USER_GROUPS);
         subject.logout();
       } catch (AuthenticationException e) {
         out.println("Error retrieving groups");

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-server/src/main/java/org/apache/knox/gateway/websockets/GatewayWebsocketHandler.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/knox/gateway/websockets/GatewayWebsocketHandler.java b/gateway-server/src/main/java/org/apache/knox/gateway/websockets/GatewayWebsocketHandler.java
index ec97e5f..1d961ad 100644
--- a/gateway-server/src/main/java/org/apache/knox/gateway/websockets/GatewayWebsocketHandler.java
+++ b/gateway-server/src/main/java/org/apache/knox/gateway/websockets/GatewayWebsocketHandler.java
@@ -20,12 +20,10 @@ package org.apache.knox.gateway.websockets;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.knox.gateway.config.GatewayConfig;
 import org.apache.knox.gateway.i18n.messages.MessagesFactory;
-import org.apache.knox.gateway.service.definition.ServiceDefinition;
 import org.apache.knox.gateway.services.GatewayServices;
 import org.apache.knox.gateway.services.registry.ServiceDefEntry;
 import org.apache.knox.gateway.services.registry.ServiceDefinitionRegistry;
 import org.apache.knox.gateway.services.registry.ServiceRegistry;
-import org.apache.knox.gateway.util.ServiceDefinitionsLoader;
 import org.eclipse.jetty.websocket.server.WebSocketHandler;
 import org.eclipse.jetty.websocket.servlet.ServletUpgradeRequest;
 import org.eclipse.jetty.websocket.servlet.ServletUpgradeResponse;
@@ -33,14 +31,12 @@ import org.eclipse.jetty.websocket.servlet.WebSocketCreator;
 import org.eclipse.jetty.websocket.servlet.WebSocketServletFactory;
 
 import javax.websocket.ClientEndpointConfig;
-import java.io.File;
 import java.net.MalformedURLException;
 import java.net.URI;
 import java.net.URL;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
-import java.util.Set;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 
@@ -174,14 +170,8 @@ public class GatewayWebsocketHandler extends WebSocketHandler
     /* Filter out /cluster/topology/service to get endpoint */
     String[] pathService = path.split(REGEX_SPLIT_SERVICE_PATH);
 
-    final File servicesDir = new File(config.getGatewayServicesDir());
-
-    final Set<ServiceDefinition> serviceDefs = ServiceDefinitionsLoader
-        .getServiceDefinitions(servicesDir);
-
     /* URL used to connect to websocket backend */
-    String backendURL = urlFromServiceDefinition(serviceDefs,
-        serviceRegistryService, entry, path);
+    String backendURL = urlFromServiceDefinition(serviceRegistryService, entry, path);
 
     StringBuilder backend = new StringBuilder();
     try {
@@ -221,7 +211,6 @@ public class GatewayWebsocketHandler extends WebSocketHandler
   }
 
   private static String urlFromServiceDefinition(
-      final Set<ServiceDefinition> serviceDefs,
       final ServiceRegistry serviceRegistry, final ServiceDefEntry entry,
       final String path) {
 
@@ -233,7 +222,5 @@ public class GatewayWebsocketHandler extends WebSocketHandler
      */
     return serviceRegistry.lookupServiceURL(contexts[2],
         entry.getName().toUpperCase(Locale.ROOT));
-
   }
-
 }

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-server/src/test/java/org/apache/knox/gateway/topology/builder/PropertyTopologyBuilderTest.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/test/java/org/apache/knox/gateway/topology/builder/PropertyTopologyBuilderTest.java b/gateway-server/src/test/java/org/apache/knox/gateway/topology/builder/PropertyTopologyBuilderTest.java
index 1f93d24..1a6bb3b 100644
--- a/gateway-server/src/test/java/org/apache/knox/gateway/topology/builder/PropertyTopologyBuilderTest.java
+++ b/gateway-server/src/test/java/org/apache/knox/gateway/topology/builder/PropertyTopologyBuilderTest.java
@@ -36,12 +36,12 @@ public class PropertyTopologyBuilderTest {
 
   @BeforeClass
   public static void setup() {
-    realAppenders = NoOpAppender.setUp();
+    realAppenders = NoOpAppender.setUpAndReturnOriginalAppenders();
   }
 
   @AfterClass
   public static void teardown() {
-    NoOpAppender.tearDown( realAppenders );
+    NoOpAppender.resetOriginalAppenders( realAppenders );
   }
 
   @Test( expected = IllegalArgumentException.class )

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-service-knoxtoken/src/main/java/org/apache/knox/gateway/service/knoxtoken/TokenResource.java
----------------------------------------------------------------------
diff --git a/gateway-service-knoxtoken/src/main/java/org/apache/knox/gateway/service/knoxtoken/TokenResource.java b/gateway-service-knoxtoken/src/main/java/org/apache/knox/gateway/service/knoxtoken/TokenResource.java
index 1c35668..307b739 100644
--- a/gateway-service-knoxtoken/src/main/java/org/apache/knox/gateway/service/knoxtoken/TokenResource.java
+++ b/gateway-service-knoxtoken/src/main/java/org/apache/knox/gateway/service/knoxtoken/TokenResource.java
@@ -64,7 +64,7 @@ public class TokenResource {
   private List<String> targetAudiences = new ArrayList<>();
   private String tokenTargetUrl;
   private Map<String,Object> tokenClientDataMap;
-  private ArrayList<String> allowedDNs = new ArrayList<>();
+  private List<String> allowedDNs = new ArrayList<>();
   private boolean clientCertRequired;
   private String signatureAlgorithm = "RS256";
 

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-service-nifi/src/main/java/org/apache/knox/gateway/dispatch/NiFiRequestUtil.java
----------------------------------------------------------------------
diff --git a/gateway-service-nifi/src/main/java/org/apache/knox/gateway/dispatch/NiFiRequestUtil.java b/gateway-service-nifi/src/main/java/org/apache/knox/gateway/dispatch/NiFiRequestUtil.java
index 585f2c9..7286920 100644
--- a/gateway-service-nifi/src/main/java/org/apache/knox/gateway/dispatch/NiFiRequestUtil.java
+++ b/gateway-service-nifi/src/main/java/org/apache/knox/gateway/dispatch/NiFiRequestUtil.java
@@ -78,7 +78,7 @@ class NiFiRequestUtil {
       proxiedEntitesChainHeader = "";
     }
     outboundRequest.setHeader(NiFiHeaders.X_PROXIED_ENTITIES_CHAIN, proxiedEntitesChainHeader +
-        String.format(Locale.ROOT, "<%s>", effectivePrincipalName.equalsIgnoreCase("anonymous") ? "" : effectivePrincipalName));
+        String.format(Locale.ROOT, "<%s>", "anonymous".equalsIgnoreCase(effectivePrincipalName) ? "" : effectivePrincipalName));
 
     // Make sure headers named "Cookie" are removed from the request to NiFi, since NiFi does not use cookies.
     Header[] cookieHeaders = outboundRequest.getHeaders("Cookie");

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-service-remoteconfig/src/main/java/org/apache/knox/gateway/service/config/remote/zk/CuratorClientService.java
----------------------------------------------------------------------
diff --git a/gateway-service-remoteconfig/src/main/java/org/apache/knox/gateway/service/config/remote/zk/CuratorClientService.java b/gateway-service-remoteconfig/src/main/java/org/apache/knox/gateway/service/config/remote/zk/CuratorClientService.java
index b779e67..b93dc33 100644
--- a/gateway-service-remoteconfig/src/main/java/org/apache/knox/gateway/service/config/remote/zk/CuratorClientService.java
+++ b/gateway-service-remoteconfig/src/main/java/org/apache/knox/gateway/service/config/remote/zk/CuratorClientService.java
@@ -344,7 +344,7 @@ class CuratorClientService implements ZooKeeperClientService {
 
         private final List<ACL> saslACL;
 
-        private SASLOwnerACLProvider() {
+        SASLOwnerACLProvider() {
             this.saslACL = ZooDefs.Ids.CREATOR_ALL_ACL; // All permissions for any authenticated user
         }
 
@@ -359,9 +359,7 @@ class CuratorClientService implements ZooKeeperClientService {
         }
     }
 
-
     private static final class ChildEntryListenerAdapter implements PathChildrenCacheListener {
-
         private RemoteConfigurationRegistryClient client;
         private ChildEntryListener delegate;
 

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-service-test/src/main/java/org/apache/knox/gateway/service/test/ServiceTestResource.java
----------------------------------------------------------------------
diff --git a/gateway-service-test/src/main/java/org/apache/knox/gateway/service/test/ServiceTestResource.java b/gateway-service-test/src/main/java/org/apache/knox/gateway/service/test/ServiceTestResource.java
index 5e6e0f2..c91cf9e 100644
--- a/gateway-service-test/src/main/java/org/apache/knox/gateway/service/test/ServiceTestResource.java
+++ b/gateway-service-test/src/main/java/org/apache/knox/gateway/service/test/ServiceTestResource.java
@@ -104,7 +104,7 @@ public class ServiceTestResource {
           List<String> urls = getServiceTestURLs(config, s.getRole(), topology);
 
           //          Make sure we handle a case where no URLs are found.
-          if (urls.size() <= 0) {
+          if (urls.isEmpty()) {
             ServiceTest test = new ServiceTest(s);
             test.setMessage("This service did not contain any test URLs");
           }

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-shell/src/main/java/org/apache/knox/gateway/shell/ClientContext.java
----------------------------------------------------------------------
diff --git a/gateway-shell/src/main/java/org/apache/knox/gateway/shell/ClientContext.java b/gateway-shell/src/main/java/org/apache/knox/gateway/shell/ClientContext.java
index 21aa7d7..0434e5a 100644
--- a/gateway-shell/src/main/java/org/apache/knox/gateway/shell/ClientContext.java
+++ b/gateway-shell/src/main/java/org/apache/knox/gateway/shell/ClientContext.java
@@ -43,7 +43,7 @@ public class ClientContext {
     private final ClientContext clientContext;
     protected final Configuration configuration;
 
-    private Context(ClientContext clientContext, String prefix) {
+    Context(ClientContext clientContext, String prefix) {
       this.clientContext = clientContext;
       this.configuration = new SubsetConfiguration(clientContext.configuration, prefix);
     }
@@ -54,8 +54,7 @@ public class ClientContext {
   }
 
   public static class PoolContext extends Context {
-
-    private PoolContext(ClientContext clientContext) {
+    PoolContext(ClientContext clientContext) {
       super(clientContext, "pool");
     }
 
@@ -79,8 +78,7 @@ public class ClientContext {
   }
 
   public static class SocketContext extends Context {
-
-    private SocketContext(ClientContext clientContext) {
+    SocketContext(ClientContext clientContext) {
       super(clientContext, "socket");
     }
 
@@ -131,8 +129,7 @@ public class ClientContext {
   }
 
   public static class ConnectionContext extends Context {
-
-    private ConnectionContext(ClientContext clientContext) {
+    ConnectionContext(ClientContext clientContext) {
       super(clientContext, "connection");
     }
 
@@ -193,8 +190,7 @@ public class ClientContext {
    * @since 1.3.0
    */
   public static class KerberosContext extends Context {
-
-    private KerberosContext(ClientContext clientContext) {
+    KerberosContext(ClientContext clientContext) {
       super(clientContext, "kerberos");
     }
 

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-shell/src/main/java/org/apache/knox/gateway/shell/Credentials.java
----------------------------------------------------------------------
diff --git a/gateway-shell/src/main/java/org/apache/knox/gateway/shell/Credentials.java b/gateway-shell/src/main/java/org/apache/knox/gateway/shell/Credentials.java
index dae0062..610bd16 100644
--- a/gateway-shell/src/main/java/org/apache/knox/gateway/shell/Credentials.java
+++ b/gateway-shell/src/main/java/org/apache/knox/gateway/shell/Credentials.java
@@ -18,14 +18,15 @@
 package org.apache.knox.gateway.shell;
 
 import java.util.ArrayList;
+import java.util.List;
 import java.util.ServiceLoader;
 
 public class Credentials {
-  ArrayList<CredentialCollector> collectors = new ArrayList<>();
+  List<CredentialCollector> collectors = new ArrayList<>();
 
   public Credentials add(String collectorType, String prompt, String name)
     throws CredentialCollectionException {
-    CredentialCollector collector = loadCredentialCollector(collectorType, prompt, name);
+    CredentialCollector collector = loadCredentialCollector(collectorType);
     if (collector == null) {
       throw new CredentialCollectionException("Invalid Collector Requested. Type: " + collectorType + " Name: " + name);
     }
@@ -51,7 +52,7 @@ public class Credentials {
     return null;
   }
 
-  private CredentialCollector loadCredentialCollector(String type, String prompt, String name) {
+  private CredentialCollector loadCredentialCollector(String type) {
     ServiceLoader<CredentialCollector> collectorsList = ServiceLoader.load(CredentialCollector.class);
     for (CredentialCollector collector : collectorsList) {
       if (collector.type().equals(type)) {

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-spi/src/main/java/org/apache/knox/gateway/filter/security/AbstractIdentityAssertionFilter.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/knox/gateway/filter/security/AbstractIdentityAssertionFilter.java b/gateway-spi/src/main/java/org/apache/knox/gateway/filter/security/AbstractIdentityAssertionFilter.java
index aa1fdb3..9735738 100644
--- a/gateway-spi/src/main/java/org/apache/knox/gateway/filter/security/AbstractIdentityAssertionFilter.java
+++ b/gateway-spi/src/main/java/org/apache/knox/gateway/filter/security/AbstractIdentityAssertionFilter.java
@@ -17,14 +17,8 @@
  */
 package org.apache.knox.gateway.filter.security;
 
-import org.apache.knox.gateway.audit.api.AuditService;
-import org.apache.knox.gateway.audit.api.AuditServiceFactory;
-import org.apache.knox.gateway.audit.api.Auditor;
-import org.apache.knox.gateway.audit.log4j.audit.AuditConstants;
 import org.apache.knox.gateway.i18n.GatewaySpiMessages;
-import org.apache.knox.gateway.i18n.GatewaySpiResources;
 import org.apache.knox.gateway.i18n.messages.MessagesFactory;
-import org.apache.knox.gateway.i18n.resources.ResourcesFactory;
 import org.apache.knox.gateway.security.principal.PrincipalMapper;
 import org.apache.knox.gateway.security.principal.PrincipalMappingException;
 import org.apache.knox.gateway.security.principal.SimplePrincipalMapper;
@@ -36,11 +30,6 @@ import javax.servlet.ServletException;
 public abstract class AbstractIdentityAssertionFilter extends AbstractIdentityAssertionBase implements Filter {
 
   private static final GatewaySpiMessages LOG = MessagesFactory.get( GatewaySpiMessages.class );
-  private static final GatewaySpiResources RES = ResourcesFactory.get( GatewaySpiResources.class );
-  private static AuditService auditService = AuditServiceFactory.getAuditService();
-  private static Auditor auditor = auditService.getAuditor(
-      AuditConstants.DEFAULT_AUDITOR_NAME, AuditConstants.KNOX_SERVICE_NAME,
-      AuditConstants.KNOX_COMPONENT_NAME );
   protected PrincipalMapper mapper = new SimplePrincipalMapper();
 
   public AbstractIdentityAssertionFilter() {

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-spi/src/main/java/org/apache/knox/gateway/security/principal/SimplePrincipalMapper.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/knox/gateway/security/principal/SimplePrincipalMapper.java b/gateway-spi/src/main/java/org/apache/knox/gateway/security/principal/SimplePrincipalMapper.java
index a5255a9..12b97c9 100644
--- a/gateway-spi/src/main/java/org/apache/knox/gateway/security/principal/SimplePrincipalMapper.java
+++ b/gateway-spi/src/main/java/org/apache/knox/gateway/security/principal/SimplePrincipalMapper.java
@@ -19,11 +19,12 @@ package org.apache.knox.gateway.security.principal;
 
 import java.util.Arrays;
 import java.util.HashMap;
+import java.util.Map;
 import java.util.StringTokenizer;
 
 public class SimplePrincipalMapper implements PrincipalMapper {
-  public HashMap<String, String[]> principalMappings;
-  public HashMap<String, String[]> groupMappings;
+  public Map<String, String[]> principalMappings;
+  public Map<String, String[]> groupMappings;
 
   public SimplePrincipalMapper() {
   }
@@ -36,7 +37,7 @@ public class SimplePrincipalMapper implements PrincipalMapper {
     }
   }
 
-  private HashMap<String, String[]> parseMapping(String mappings)
+  private Map<String, String[]> parseMapping(String mappings)
       throws PrincipalMappingException {
     if (mappings == null) {
       return null;

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-spi/src/main/java/org/apache/knox/gateway/topology/Topology.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/knox/gateway/topology/Topology.java b/gateway-spi/src/main/java/org/apache/knox/gateway/topology/Topology.java
index 10f891e..7b3066e 100644
--- a/gateway-spi/src/main/java/org/apache/knox/gateway/topology/Topology.java
+++ b/gateway-spi/src/main/java/org/apache/knox/gateway/topology/Topology.java
@@ -19,7 +19,6 @@ package org.apache.knox.gateway.topology;
 
 import org.apache.commons.collections.map.HashedMap;
 import org.apache.commons.collections.map.MultiKeyMap;
-import org.apache.knox.gateway.service.definition.CustomDispatch;
 
 import java.net.URI;
 import java.util.ArrayList;
@@ -41,7 +40,6 @@ public class Topology {
   private MultiKeyMap serviceMap;
   private List<Application> applications = new ArrayList<>();
   private Map<String,Application> applicationMap = new HashMap<>();
-  private CustomDispatch dispatch;
 
   public Topology() {
     serviceMap = MultiKeyMap.decorate(new HashedMap());

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-test-release-utils/src/main/java/org/apache/knox/gateway/GatewayTestDriver.java
----------------------------------------------------------------------
diff --git a/gateway-test-release-utils/src/main/java/org/apache/knox/gateway/GatewayTestDriver.java b/gateway-test-release-utils/src/main/java/org/apache/knox/gateway/GatewayTestDriver.java
index ce5f846..8b95648 100644
--- a/gateway-test-release-utils/src/main/java/org/apache/knox/gateway/GatewayTestDriver.java
+++ b/gateway-test-release-utils/src/main/java/org/apache/knox/gateway/GatewayTestDriver.java
@@ -269,7 +269,7 @@ public class GatewayTestDriver {
     String gatewayPath;
     boolean mock;
     MockServer server;
-    private Service( String role, String realUrl, String gatewayPath, boolean mock ) throws Exception {
+    Service( String role, String realUrl, String gatewayPath, boolean mock ) throws Exception {
       this.role = role;
       this.realUrl = new URI( realUrl );
       this.gatewayPath = gatewayPath;

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-test-utils/src/main/java/org/apache/knox/test/log/NoOpAppender.java
----------------------------------------------------------------------
diff --git a/gateway-test-utils/src/main/java/org/apache/knox/test/log/NoOpAppender.java b/gateway-test-utils/src/main/java/org/apache/knox/test/log/NoOpAppender.java
index b27152c..ae2242c 100644
--- a/gateway-test-utils/src/main/java/org/apache/knox/test/log/NoOpAppender.java
+++ b/gateway-test-utils/src/main/java/org/apache/knox/test/log/NoOpAppender.java
@@ -28,14 +28,14 @@ import java.util.Enumeration;
 
 public class NoOpAppender implements Appender {
 
-  public static Enumeration<Appender> setUp() {
+  public static Enumeration<Appender> setUpAndReturnOriginalAppenders() {
     Enumeration<Appender> appenders = (Enumeration<Appender>)Logger.getRootLogger().getAllAppenders();
     Logger.getRootLogger().removeAllAppenders();
     Logger.getRootLogger().addAppender( new NoOpAppender() );
     return appenders;
   }
 
-  public static void tearDown( Enumeration<Appender> appenders ) {
+  public static void resetOriginalAppenders(Enumeration<Appender> appenders ) {
     if( appenders != null ) {
       while( appenders.hasMoreElements() ) {
         Logger.getRootLogger().addAppender( appenders.nextElement() );

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-test/src/test/java/org/apache/knox/gateway/GatewayAdminFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/knox/gateway/GatewayAdminFuncTest.java b/gateway-test/src/test/java/org/apache/knox/gateway/GatewayAdminFuncTest.java
index 8668985..dd739fd 100644
--- a/gateway-test/src/test/java/org/apache/knox/gateway/GatewayAdminFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/knox/gateway/GatewayAdminFuncTest.java
@@ -56,7 +56,7 @@ public class GatewayAdminFuncTest {
   @BeforeClass
   public static void setupSuite() throws Exception {
     TestUtils.LOG_ENTER();
-    //appenders = NoOpAppender.setUp();
+    //appenders = NoOpAppender.setUpAndReturnOriginalAppenders();
     driver.setupLdap(0);
     setupGateway();
     TestUtils.LOG_EXIT();
@@ -68,7 +68,7 @@ public class GatewayAdminFuncTest {
     gateway.stop();
     driver.cleanup();
     //FileUtils.deleteQuietly( new File( config.getGatewayHomeDir() ) );
-    //NoOpAppender.tearDown( appenders );
+    //NoOpAppender.resetOriginalAppenders( appenders );
     TestUtils.LOG_EXIT();
   }
 

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-test/src/test/java/org/apache/knox/gateway/GatewayAdminTopologyFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/knox/gateway/GatewayAdminTopologyFuncTest.java b/gateway-test/src/test/java/org/apache/knox/gateway/GatewayAdminTopologyFuncTest.java
index 3b67938..5ffd352 100644
--- a/gateway-test/src/test/java/org/apache/knox/gateway/GatewayAdminTopologyFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/knox/gateway/GatewayAdminTopologyFuncTest.java
@@ -93,7 +93,7 @@ public class GatewayAdminTopologyFuncTest {
 
   @BeforeClass
   public static void setupSuite() throws Exception {
-    //appenders = NoOpAppender.setUp();
+    //appenders = NoOpAppender.setUpAndReturnOriginalAppenders();
     driver.setupLdap(0);
     setupGateway(new GatewayTestConfig());
   }
@@ -103,7 +103,7 @@ public class GatewayAdminTopologyFuncTest {
     gateway.stop();
     driver.cleanup();
     //FileUtils.deleteQuietly( new File( config.getGatewayHomeDir() ) );
-    //NoOpAppender.tearDown( appenders );
+    //NoOpAppender.resetOriginalAppenders( appenders );
   }
 
   public static void setupGateway(GatewayTestConfig testConfig) throws Exception {

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-test/src/test/java/org/apache/knox/gateway/GatewayAppFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/knox/gateway/GatewayAppFuncTest.java b/gateway-test/src/test/java/org/apache/knox/gateway/GatewayAppFuncTest.java
index dd45993..ad5168f 100644
--- a/gateway-test/src/test/java/org/apache/knox/gateway/GatewayAppFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/knox/gateway/GatewayAppFuncTest.java
@@ -80,7 +80,7 @@ public class GatewayAppFuncTest {
   @BeforeClass
   public static void setupSuite() throws Exception {
     LOG_ENTER();
-    //appenders = NoOpAppender.setUp();
+    //appenders = NoOpAppender.setUpAndReturnOriginalAppenders();
     driver.setupLdap(0);
     setupGateway();
     LOG_EXIT();
@@ -92,7 +92,7 @@ public class GatewayAppFuncTest {
     gateway.stop();
     driver.cleanup();
     FileUtils.deleteQuietly( new File( config.getGatewayHomeDir() ) );
-    //NoOpAppender.tearDown( appenders );
+    //NoOpAppender.resetOriginalAppenders( appenders );
     LOG_EXIT();
   }
 

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-test/src/test/java/org/apache/knox/gateway/GatewayDeployFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/knox/gateway/GatewayDeployFuncTest.java b/gateway-test/src/test/java/org/apache/knox/gateway/GatewayDeployFuncTest.java
index eef4234..03a5d00 100644
--- a/gateway-test/src/test/java/org/apache/knox/gateway/GatewayDeployFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/knox/gateway/GatewayDeployFuncTest.java
@@ -73,7 +73,7 @@ public class GatewayDeployFuncTest {
   @BeforeClass
   public static void setupSuite() throws Exception {
     LOG_ENTER();
-    //appenders = NoOpAppender.setUp();
+    //appenders = NoOpAppender.setUpAndReturnOriginalAppenders();
     driver.setupLdap(0);
     LOG_EXIT();
   }
@@ -83,7 +83,7 @@ public class GatewayDeployFuncTest {
     LOG_ENTER();
     driver.cleanup();
     //FileUtils.deleteQuietly( new File( config.getGatewayHomeDir() ) );
-    //NoOpAppender.tearDown( appenders );
+    //NoOpAppender.resetOriginalAppenders( appenders );
     LOG_EXIT();
   }
 

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-test/src/test/java/org/apache/knox/gateway/GatewayLocalServiceFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/knox/gateway/GatewayLocalServiceFuncTest.java b/gateway-test/src/test/java/org/apache/knox/gateway/GatewayLocalServiceFuncTest.java
index 955ad50..b0432d6 100644
--- a/gateway-test/src/test/java/org/apache/knox/gateway/GatewayLocalServiceFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/knox/gateway/GatewayLocalServiceFuncTest.java
@@ -62,7 +62,7 @@ public class GatewayLocalServiceFuncTest {
   @BeforeClass
   public static void setupSuite() throws Exception {
     LOG_ENTER();
-    appenders = NoOpAppender.setUp();
+    appenders = NoOpAppender.setUpAndReturnOriginalAppenders();
     driver.setupLdap(0);
     setupGateway();
     LOG_EXIT();
@@ -75,7 +75,7 @@ public class GatewayLocalServiceFuncTest {
     driver.cleanup();
     FileUtils.deleteQuietly( new File( config.getGatewayConfDir() ) );
     FileUtils.deleteQuietly( new File( config.getGatewayDataDir() ) );
-    NoOpAppender.tearDown( appenders );
+    NoOpAppender.resetOriginalAppenders( appenders );
     LOG_EXIT();
   }
 

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-test/src/test/java/org/apache/knox/gateway/GatewayMultiFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/knox/gateway/GatewayMultiFuncTest.java b/gateway-test/src/test/java/org/apache/knox/gateway/GatewayMultiFuncTest.java
index 1deb738..046cb0b 100644
--- a/gateway-test/src/test/java/org/apache/knox/gateway/GatewayMultiFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/knox/gateway/GatewayMultiFuncTest.java
@@ -90,7 +90,7 @@ public class GatewayMultiFuncTest {
   @BeforeClass
   public static void setupSuite() throws Exception {
     LOG_ENTER();
-    //appenders = NoOpAppender.setUp();
+    //appenders = NoOpAppender.setUpAndReturnOriginalAppenders();
     driver.setupLdap(0);
     setupGateway();
     LOG_EXIT();
@@ -102,7 +102,7 @@ public class GatewayMultiFuncTest {
     gateway.stop();
     driver.cleanup();
     FileUtils.deleteQuietly( new File( config.getGatewayHomeDir() ) );
-    //NoOpAppender.tearDown( appenders );
+    //NoOpAppender.resetOriginalAppenders( appenders );
     LOG_EXIT();
   }
 

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-test/src/test/java/org/apache/knox/gateway/GatewaySampleFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/knox/gateway/GatewaySampleFuncTest.java b/gateway-test/src/test/java/org/apache/knox/gateway/GatewaySampleFuncTest.java
index 7a842cc..04c1e68 100644
--- a/gateway-test/src/test/java/org/apache/knox/gateway/GatewaySampleFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/knox/gateway/GatewaySampleFuncTest.java
@@ -60,7 +60,7 @@ public class GatewaySampleFuncTest {
   @BeforeClass
   public static void setupSuite() throws Exception {
     LOG_ENTER();
-    //appenders = NoOpAppender.setUp();
+    //appenders = NoOpAppender.setUpAndReturnOriginalAppenders();
     driver.setupLdap(0);
     setupGateway();
     LOG_EXIT();
@@ -72,7 +72,7 @@ public class GatewaySampleFuncTest {
     gateway.stop();
     driver.cleanup();
     //FileUtils.deleteQuietly( new File( config.getGatewayHomeDir() ) );
-    //NoOpAppender.tearDown( appenders );
+    //NoOpAppender.resetOriginalAppenders( appenders );
     LOG_EXIT();
   }
 

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-test/src/test/java/org/apache/knox/gateway/GatewaySslFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/knox/gateway/GatewaySslFuncTest.java b/gateway-test/src/test/java/org/apache/knox/gateway/GatewaySslFuncTest.java
index 449cf5f..1215f9d 100644
--- a/gateway-test/src/test/java/org/apache/knox/gateway/GatewaySslFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/knox/gateway/GatewaySslFuncTest.java
@@ -101,7 +101,7 @@ public class GatewaySslFuncTest {
   @BeforeClass
   public static void setupSuite() throws Exception {
     LOG_ENTER();
-    //appenders = NoOpAppender.setUp();
+    //appenders = NoOpAppender.setUpAndReturnOriginalAppenders();
     driver.setupLdap(0);
     setupGateway();
     LOG_EXIT();
@@ -113,7 +113,7 @@ public class GatewaySslFuncTest {
     gateway.stop();
     driver.cleanup();
     FileUtils.deleteQuietly( new File( config.getGatewayHomeDir() ) );
-    //NoOpAppender.tearDown( appenders );
+    //NoOpAppender.resetOriginalAppenders( appenders );
     LOG_EXIT();
   }
 

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-test/src/test/java/org/apache/knox/gateway/Knox242FuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/knox/gateway/Knox242FuncTest.java b/gateway-test/src/test/java/org/apache/knox/gateway/Knox242FuncTest.java
index c964066..9f46d99 100755
--- a/gateway-test/src/test/java/org/apache/knox/gateway/Knox242FuncTest.java
+++ b/gateway-test/src/test/java/org/apache/knox/gateway/Knox242FuncTest.java
@@ -52,7 +52,7 @@ public class Knox242FuncTest {
   @BeforeClass
   public static void setupSuite() throws Exception {
     LOG_ENTER();
-    //appenders = NoOpAppender.setUp();
+    //appenders = NoOpAppender.setUpAndReturnOriginalAppenders();
     String basedir = System.getProperty("basedir");
     if (basedir == null) {
       basedir = new File(".").getCanonicalPath();

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-test/src/test/java/org/apache/knox/gateway/KnoxCliLdapFuncTestNegative.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/knox/gateway/KnoxCliLdapFuncTestNegative.java b/gateway-test/src/test/java/org/apache/knox/gateway/KnoxCliLdapFuncTestNegative.java
index 43800be..1aa44f0 100644
--- a/gateway-test/src/test/java/org/apache/knox/gateway/KnoxCliLdapFuncTestNegative.java
+++ b/gateway-test/src/test/java/org/apache/knox/gateway/KnoxCliLdapFuncTestNegative.java
@@ -74,7 +74,7 @@ public class KnoxCliLdapFuncTestNegative {
     driver.cleanup();
 
     //FileUtils.deleteQuietly( new File( config.getGatewayHomeDir() ) );
-    //NoOpAppender.tearDown( appenders );
+    //NoOpAppender.resetOriginalAppenders( appenders );
     LOG_EXIT();
   }
 
@@ -261,11 +261,11 @@ public class KnoxCliLdapFuncTestNegative {
 
     String[] args2 = {"user-auth-test", "--master", "knox", "--cluster", "bad-cluster",
         "--u", username, "--p", password, "--g" };
-    Enumeration<Appender> before = NoOpAppender.setUp();
+    Enumeration<Appender> before = NoOpAppender.setUpAndReturnOriginalAppenders();
     try {
       cli.run( args2 );
     } finally {
-      NoOpAppender.tearDown( before );
+      NoOpAppender.resetOriginalAppenders( before );
     }
 
     assertThat(outContent.toString(StandardCharsets.UTF_8.name()), containsString("LDAP authentication failed"));

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-test/src/test/java/org/apache/knox/gateway/KnoxCliLdapFuncTestPositive.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/knox/gateway/KnoxCliLdapFuncTestPositive.java b/gateway-test/src/test/java/org/apache/knox/gateway/KnoxCliLdapFuncTestPositive.java
index 60a6e99..69750d9 100644
--- a/gateway-test/src/test/java/org/apache/knox/gateway/KnoxCliLdapFuncTestPositive.java
+++ b/gateway-test/src/test/java/org/apache/knox/gateway/KnoxCliLdapFuncTestPositive.java
@@ -74,7 +74,7 @@ public class KnoxCliLdapFuncTestPositive {
     driver.cleanup();
 
     //FileUtils.deleteQuietly( new File( config.getGatewayHomeDir() ) );
-    //NoOpAppender.tearDown( appenders );
+    //NoOpAppender.resetOriginalAppenders( appenders );
     LOG_EXIT();
   }
 
@@ -246,11 +246,11 @@ public class KnoxCliLdapFuncTestPositive {
     username = "bad-name";
     password = "bad-password";
     String[] args2 = {"user-auth-test", "--master", "knox", "--cluster", "test-cluster", "--u", username, "--p", password};
-    Enumeration<Appender> before = NoOpAppender.setUp();
+    Enumeration<Appender> before = NoOpAppender.setUpAndReturnOriginalAppenders();
     try {
       cli.run( args2 );
     } finally {
-      NoOpAppender.tearDown( before );
+      NoOpAppender.resetOriginalAppenders( before );
     }
     assertThat(outContent.toString(StandardCharsets.UTF_8.name()), containsString("LDAP authentication failed"));
 

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-test/src/test/java/org/apache/knox/gateway/KnoxCliSysBindTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/knox/gateway/KnoxCliSysBindTest.java b/gateway-test/src/test/java/org/apache/knox/gateway/KnoxCliSysBindTest.java
index 81376b4..a8491b4 100644
--- a/gateway-test/src/test/java/org/apache/knox/gateway/KnoxCliSysBindTest.java
+++ b/gateway-test/src/test/java/org/apache/knox/gateway/KnoxCliSysBindTest.java
@@ -73,7 +73,7 @@ public class KnoxCliSysBindTest {
     driver.cleanup();
 
     //FileUtils.deleteQuietly( new File( config.getGatewayHomeDir() ) );
-    //NoOpAppender.tearDown( appenders );
+    //NoOpAppender.resetOriginalAppenders( appenders );
     LOG_EXIT();
   }
 
@@ -252,11 +252,11 @@ public class KnoxCliSysBindTest {
     String[] args3 = { "system-user-auth-test", "--master", "knox", "--cluster", "test-cluster-3", "--d" };
     cli = new KnoxCLI();
     cli.setConf(config);
-    Enumeration<Appender> before = NoOpAppender.setUp();
+    Enumeration<Appender> before = NoOpAppender.setUpAndReturnOriginalAppenders();
     try {
       cli.run( args3 );
     } finally {
-      NoOpAppender.tearDown( before );
+      NoOpAppender.resetOriginalAppenders( before );
     }
     assertThat(outContent.toString(StandardCharsets.UTF_8.name()), containsString("LDAP authentication failed"));
     assertThat(outContent.toString(StandardCharsets.UTF_8.name()), containsString("Unable to successfully bind to LDAP server with topology credentials"));

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-test/src/test/java/org/apache/knox/gateway/deploy/DeploymentFactoryFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/knox/gateway/deploy/DeploymentFactoryFuncTest.java b/gateway-test/src/test/java/org/apache/knox/gateway/deploy/DeploymentFactoryFuncTest.java
index c619742..08fe937 100644
--- a/gateway-test/src/test/java/org/apache/knox/gateway/deploy/DeploymentFactoryFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/knox/gateway/deploy/DeploymentFactoryFuncTest.java
@@ -191,14 +191,14 @@ public class DeploymentFactoryFuncTest {
     provider.addParam( param );
     topology.addProvider( provider );
 
-    Enumeration<Appender> appenders = NoOpAppender.setUp();
+    Enumeration<Appender> appenders = NoOpAppender.setUpAndReturnOriginalAppenders();
     try {
       DeploymentFactory.createDeployment( config, topology );
       fail( "Should have throws IllegalArgumentException" );
     } catch ( DeploymentException e ) {
       // Expected.
     } finally {
-      NoOpAppender.tearDown( appenders );
+      NoOpAppender.resetOriginalAppenders( appenders );
     }
     LOG_EXIT();
   }

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-util-common/src/main/java/org/apache/knox/gateway/util/IpAddressValidator.java
----------------------------------------------------------------------
diff --git a/gateway-util-common/src/main/java/org/apache/knox/gateway/util/IpAddressValidator.java b/gateway-util-common/src/main/java/org/apache/knox/gateway/util/IpAddressValidator.java
index 1253bb8..a702a80 100644
--- a/gateway-util-common/src/main/java/org/apache/knox/gateway/util/IpAddressValidator.java
+++ b/gateway-util-common/src/main/java/org/apache/knox/gateway/util/IpAddressValidator.java
@@ -19,6 +19,7 @@ package org.apache.knox.gateway.util;
 
 import java.util.ArrayList;
 import java.util.Collections;
+import java.util.List;
 
 /**
  * Validate a given IP Address against a list of comma separated list of addresses.
@@ -27,12 +28,12 @@ public class IpAddressValidator {
   /**
    * The parsed list of ip addresses
    */
-  private ArrayList<String> ipaddr = new ArrayList<>();
+  private List<String> ipaddr = new ArrayList<>();
 
   /**
    * IP addresses from the ipaddr list that contain a wildcard character '*'
    */
-  private ArrayList<String> wildCardIPs = new ArrayList<>();
+  private List<String> wildCardIPs = new ArrayList<>();
 
   /**
    * Optimization based on empty IP address list or an explicit '*' wildcard
@@ -101,7 +102,7 @@ public class IpAddressValidator {
     return anyIP;
   }
 
-  public ArrayList<String> getIPAddresses() {
+  public List<String> getIPAddresses() {
     return ipaddr;
   }
 }

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-util-common/src/main/java/org/apache/knox/gateway/util/JsonPath.java
----------------------------------------------------------------------
diff --git a/gateway-util-common/src/main/java/org/apache/knox/gateway/util/JsonPath.java b/gateway-util-common/src/main/java/org/apache/knox/gateway/util/JsonPath.java
index 48d2e65..ab6054a 100644
--- a/gateway-util-common/src/main/java/org/apache/knox/gateway/util/JsonPath.java
+++ b/gateway-util-common/src/main/java/org/apache/knox/gateway/util/JsonPath.java
@@ -36,7 +36,7 @@ public class JsonPath {
     private String field;
     private int index;
 
-    private Match( Match parent, Segment segment, JsonNode node, String field, int index ) {
+    Match( Match parent, Segment segment, JsonNode node, String field, int index ) {
       this.parent = parent;
       this.segment = segment;
       this.node = node;
@@ -44,11 +44,11 @@ public class JsonPath {
       this.index = index;
     }
 
-    private Match( Match parent, Segment segment, JsonNode node, String field ) {
+    Match( Match parent, Segment segment, JsonNode node, String field ) {
       this( parent, segment, node, field, -1 );
     }
 
-    private Match( Match parent, Segment segment, JsonNode node, int index ) {
+    Match( Match parent, Segment segment, JsonNode node, int index ) {
       this( parent, segment, node, null, index );
     }
 
@@ -85,10 +85,9 @@ public class JsonPath {
   }
 
   public static class Expression {
-
     private List<Segment> segments;
 
-    private Expression( String expression ) {
+    Expression( String expression ) {
       if( expression == null || !expression.startsWith( "$" ) ) {
         throw new IllegalArgumentException( expression );
       }
@@ -337,19 +336,19 @@ public class JsonPath {
     private String field;
     private int index;
 
-    private Segment( Type type ) {
+    Segment( Type type ) {
       this.type = type;
       this.field = null;
       this.index = -1;
     }
 
-    private Segment( String field ) {
+    Segment( String field ) {
       this.type = Type.FIELD;
       this.field = field;
       this.index = -1;
     }
 
-    private Segment( int index ) {
+    Segment( int index ) {
       this.type = Type.INDEX;
       this.field = null;
       this.index = index;
@@ -380,5 +379,4 @@ public class JsonPath {
   public static Expression compile( String expression ) {
     return new Expression( expression );
   }
-
 }

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-util-common/src/main/java/org/apache/knox/gateway/util/X500PrincipalParser.java
----------------------------------------------------------------------
diff --git a/gateway-util-common/src/main/java/org/apache/knox/gateway/util/X500PrincipalParser.java b/gateway-util-common/src/main/java/org/apache/knox/gateway/util/X500PrincipalParser.java
index 78199ac..e44cd48 100644
--- a/gateway-util-common/src/main/java/org/apache/knox/gateway/util/X500PrincipalParser.java
+++ b/gateway-util-common/src/main/java/org/apache/knox/gateway/util/X500PrincipalParser.java
@@ -17,13 +17,12 @@
  */
 package org.apache.knox.gateway.util;
 
-
 import java.util.ArrayList;
+import java.util.List;
 
 import javax.security.auth.x500.X500Principal;
 
-public class X500PrincipalParser
-{
+public class X500PrincipalParser {
   public static final int LEASTSIGNIFICANT = 0;
   public static final int MOSTSIGNIFICANT = 1;
 
@@ -37,23 +36,20 @@ public class X500PrincipalParser
   public static final String attrEMAIL = "EMAILADDRESS";
   public static final String attrUID = "UID";
 
-  ArrayList rdnNameArray = new ArrayList();
+  private List<List<String>> rdnNameArray = new ArrayList<>();
 
   private static final String attrTerminator = "=";
 
-  public X500PrincipalParser(X500Principal principal)
-  {
+  public X500PrincipalParser(X500Principal principal) {
     parseDN(principal.getName(X500Principal.RFC2253));
   }
 
-  public ArrayList getAllValues(String attributeID)
-  {
-    ArrayList retList = new ArrayList();
+  public List<Object> getAllValues(String attributeID) {
+    List<Object> retList = new ArrayList<>();
     String searchPart = attributeID + attrTerminator;
 
-    for (Object o : rdnNameArray) {
-      ArrayList nameList = (ArrayList) o;
-      String namePart = (String) nameList.get(0);
+    for (List<String> nameList : rdnNameArray) {
+      String namePart = nameList.get(0);
 
       if (namePart.startsWith(searchPart)) {
         // Return the string starting after the ID string and the = sign that follows it.
@@ -62,63 +58,49 @@ public class X500PrincipalParser
     }
 
     return retList;
-
   }
 
-  public String getC()
-  {
+  public String getC() {
     return findPart(attrC);
   }
 
-  public String getCN()
-  {
+  public String getCN() {
     return findPart(attrCN);
   }
 
-  public String getEMAILDDRESS()
-  {
+  public String getEMAILDDRESS() {
     return findPart(attrEMAIL);
   }
 
-  public String getL()
-  {
+  public String getL() {
     return findPart(attrL);
   }
 
-  public String getO()
-  {
+  public String getO() {
     return findPart(attrO);
-
   }
 
-  public String getOU()
-  {
+  public String getOU() {
     return findPart(attrOU);
-
   }
 
-  public String getST()
-  {
+  public String getST() {
     return findPart(attrST);
   }
 
-  public String getSTREET()
-  {
+  public String getSTREET() {
     return findPart(attrSTREET);
   }
 
-  public String getUID()
-  {
+  public String getUID() {
     return findPart(attrUID);
   }
 
-  private String findPart(String attributeID)
-  {
+  private String findPart(String attributeID) {
     return findSignificantPart(attributeID, MOSTSIGNIFICANT);
   }
 
-  private String findSignificantPart(String attributeID, int significance)
-  {
+  private String findSignificantPart(String attributeID, int significance) {
     String retNamePart = null;
     String searchPart = attributeID + attrTerminator;
 
@@ -138,19 +120,16 @@ public class X500PrincipalParser
     return retNamePart;
   }
 
-  private void parseDN(String dn) throws IllegalArgumentException
-  {
+  private void parseDN(String dn) throws IllegalArgumentException {
     int startIndex = 0;
     char c = '\0';
-    ArrayList nameValues = new ArrayList();
+    List<String> nameValues = new ArrayList<>();
 
     rdnNameArray.clear();
 
-    while(startIndex < dn.length())
-    {
+    while(startIndex < dn.length()) {
       int endIndex;
-      for(endIndex = startIndex; endIndex < dn.length(); endIndex++)
-      {
+      for(endIndex = startIndex; endIndex < dn.length(); endIndex++) {
         c = dn.charAt(endIndex);
         if(c == ',' || c == '+')
           break;
@@ -160,25 +139,23 @@ public class X500PrincipalParser
         }
       }
 
-      if(endIndex > dn.length())
+      if(endIndex > dn.length()) {
         throw new IllegalArgumentException("unterminated escape " + dn);
+      }
 
       nameValues.add(dn.substring(startIndex, endIndex));
 
-      if(c != '+')
-      {
+      if(c != '+') {
         rdnNameArray.add(nameValues);
         if(endIndex != dn.length())
-          nameValues = new ArrayList();
+          nameValues = new ArrayList<>();
         else
           nameValues = null;
       }
       startIndex = endIndex + 1;
     }
-    if(nameValues != null)
-    {
+    if(nameValues != null) {
       throw new IllegalArgumentException("improperly terminated DN " + dn);
     }
   }
-
 }

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-util-configinjector/src/main/java/org/apache/knox/gateway/config/impl/DefaultConfigurationInjector.java
----------------------------------------------------------------------
diff --git a/gateway-util-configinjector/src/main/java/org/apache/knox/gateway/config/impl/DefaultConfigurationInjector.java b/gateway-util-configinjector/src/main/java/org/apache/knox/gateway/config/impl/DefaultConfigurationInjector.java
index 8873167..ca57615 100755
--- a/gateway-util-configinjector/src/main/java/org/apache/knox/gateway/config/impl/DefaultConfigurationInjector.java
+++ b/gateway-util-configinjector/src/main/java/org/apache/knox/gateway/config/impl/DefaultConfigurationInjector.java
@@ -65,7 +65,7 @@ public class DefaultConfigurationInjector implements ConfigurationInjector {
       Alias alias = field.getAnnotation( Alias.class );
       String name = getConfigName( field, alias );
       String bind = getBindName( target, name, binding );
-      Object value = retrieveValue( target, bind, name, field.getType(), adapter, binding );
+      Object value = retrieveValue( target, bind, name, field.getType(), adapter );
       if( value == null ) {
         Optional optional = field.getAnnotation( Optional.class );
         if( optional == null ) {
@@ -100,7 +100,7 @@ public class DefaultConfigurationInjector implements ConfigurationInjector {
       for( int i=0; i<argTypes.length; i++ ) {
         String argName = getConfigName( methodName, argTags[i] );
         String bndName = getBindName( target, argName, binding );
-        Object argValue = retrieveValue( target, bndName, argName, argTypes[i], adapter, binding );
+        Object argValue = retrieveValue( target, bndName, argName, argTypes[i], adapter );
         if( argValue == null ) {
           Default defTag = findAnnotation( argTags[i], Default.class );
           if( defTag != null ) {
@@ -139,7 +139,7 @@ public class DefaultConfigurationInjector implements ConfigurationInjector {
     return objValue;
   }
 
-  private Object retrieveValue( Object target, String bind, String name, Class<?> type, ConfigurationAdapter adapter, ConfigurationBinding binding ) {
+  private Object retrieveValue( Object target, String bind, String name, Class<?> type, ConfigurationAdapter adapter) {
     Object value;
     try {
       value = adapter.getConfigurationValue( bind );

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-util-launcher/src/main/java/org/apache/knox/gateway/launcher/Command.java
----------------------------------------------------------------------
diff --git a/gateway-util-launcher/src/main/java/org/apache/knox/gateway/launcher/Command.java b/gateway-util-launcher/src/main/java/org/apache/knox/gateway/launcher/Command.java
index 6600f44..cfb3da4 100644
--- a/gateway-util-launcher/src/main/java/org/apache/knox/gateway/launcher/Command.java
+++ b/gateway-util-launcher/src/main/java/org/apache/knox/gateway/launcher/Command.java
@@ -140,7 +140,7 @@ class Command {
 
     private Pattern pattern;
 
-    private WildcardFilenameFilter( String filter ) {
+    WildcardFilenameFilter( String filter ) {
       filter = filter.replace( ".", SAFE );
       filter = filter.replace( "*", ".*" );
       filter = filter.replace( SAFE, "\\." );

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-util-urltemplate/src/main/java/org/apache/knox/gateway/util/urltemplate/Builder.java
----------------------------------------------------------------------
diff --git a/gateway-util-urltemplate/src/main/java/org/apache/knox/gateway/util/urltemplate/Builder.java b/gateway-util-urltemplate/src/main/java/org/apache/knox/gateway/util/urltemplate/Builder.java
index 791ba03..d70a58f 100644
--- a/gateway-util-urltemplate/src/main/java/org/apache/knox/gateway/util/urltemplate/Builder.java
+++ b/gateway-util-urltemplate/src/main/java/org/apache/knox/gateway/util/urltemplate/Builder.java
@@ -38,7 +38,7 @@ public class Builder {
   private boolean isDirectory;
   private List<Path> path;
   private boolean hasQuery;
-  private LinkedHashMap<String,Query> query;
+  private Map<String,Query> query;
   private Query extra;
   private boolean hasFragment;
   private Fragment fragment;
@@ -153,8 +153,8 @@ public class Builder {
     return copy;
   }
 
-  private LinkedHashMap<String, Query> copyQuery( Map<String, Query> orig ) {
-    LinkedHashMap<String,Query> copy = new LinkedHashMap<>();
+  private Map<String, Query> copyQuery( Map<String, Query> orig ) {
+    Map<String,Query> copy = new LinkedHashMap<>();
     if( orig != null ) {
       for( Map.Entry<String,Query> entry : orig.entrySet() ) {
         copy.put( entry.getKey(), new Query( entry.getValue() ) );

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-util-urltemplate/src/main/java/org/apache/knox/gateway/util/urltemplate/Matcher.java
----------------------------------------------------------------------
diff --git a/gateway-util-urltemplate/src/main/java/org/apache/knox/gateway/util/urltemplate/Matcher.java b/gateway-util-urltemplate/src/main/java/org/apache/knox/gateway/util/urltemplate/Matcher.java
index 643fb24..5bd2e91 100644
--- a/gateway-util-urltemplate/src/main/java/org/apache/knox/gateway/util/urltemplate/Matcher.java
+++ b/gateway-util-urltemplate/src/main/java/org/apache/knox/gateway/util/urltemplate/Matcher.java
@@ -342,7 +342,6 @@ public class Matcher<V> {
   }
 
   private class Status {
-
     List<MatchSegment> candidates = new ArrayList<>();
     List<MatchSegment> matches = new ArrayList<>();
     List<MatchSegment> temp;
@@ -363,7 +362,7 @@ public class Matcher<V> {
     private Segment templateSegment;
     private Segment inputSegment;
 
-    private MatchSegment( MatchSegment parent, PathNode node, Segment templateSegment, Segment inputSegment ) {
+    MatchSegment( MatchSegment parent, PathNode node, Segment templateSegment, Segment inputSegment ) {
       this.parentMatch = parent;
       this.pathNode = node;
       this.templateSegment = templateSegment;
@@ -412,7 +411,7 @@ public class Matcher<V> {
     private Params params;
     //TODO private Params extra;
 
-    private Match( Template template, V value ) {
+    Match( Template template, V value ) {
       this.template = template;
       this.value = value;
     }
@@ -437,7 +436,7 @@ public class Matcher<V> {
     Map<Segment,PathNode> children;
     Set<QueryNode> queries;
 
-    private PathNode( PathNode parent, Segment segment ) {
+    PathNode( PathNode parent, Segment segment ) {
       super( null, null );
       this.depth = ( parent == null ) ? 0 : parent.depth+1;
       this.segment = segment;
@@ -500,22 +499,18 @@ public class Matcher<V> {
   }
 
   private class QueryNode extends Node {
-
-    private QueryNode( Template template, V value ) {
+    QueryNode( Template template, V value ) {
       super( template, value );
     }
-
   }
 
   private class Node {
-
     Template template;
     V value;
 
-    private Node( Template template, V value ) {
+    Node( Template template, V value ) {
       this.template = template;
       this.value = value;
     }
   }
-
 }

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-util-urltemplate/src/main/java/org/apache/knox/gateway/util/urltemplate/Rewriter.java
----------------------------------------------------------------------
diff --git a/gateway-util-urltemplate/src/main/java/org/apache/knox/gateway/util/urltemplate/Rewriter.java b/gateway-util-urltemplate/src/main/java/org/apache/knox/gateway/util/urltemplate/Rewriter.java
index 3b26e33..652c7eb 100644
--- a/gateway-util-urltemplate/src/main/java/org/apache/knox/gateway/util/urltemplate/Rewriter.java
+++ b/gateway-util-urltemplate/src/main/java/org/apache/knox/gateway/util/urltemplate/Rewriter.java
@@ -73,7 +73,7 @@ public class Rewriter {
     private Params params;
     private Resolver[] resolvers;
 
-    private RewriteParams( Params params, Resolver... resolvers ) {
+    RewriteParams( Params params, Resolver... resolvers ) {
       this.params = params;
       this.resolvers = resolvers;
     }

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-util-urltemplate/src/main/java/org/apache/knox/gateway/util/urltemplate/Segment.java
----------------------------------------------------------------------
diff --git a/gateway-util-urltemplate/src/main/java/org/apache/knox/gateway/util/urltemplate/Segment.java b/gateway-util-urltemplate/src/main/java/org/apache/knox/gateway/util/urltemplate/Segment.java
index 67c284e..45ea18a 100644
--- a/gateway-util-urltemplate/src/main/java/org/apache/knox/gateway/util/urltemplate/Segment.java
+++ b/gateway-util-urltemplate/src/main/java/org/apache/knox/gateway/util/urltemplate/Segment.java
@@ -24,7 +24,6 @@ import java.util.Map;
 import java.util.regex.Pattern;
 
 abstract class Segment {
-
   static final String ANONYMOUS_PARAM = "";
   static final String DEFAULT_PATTERN = "";
   static final String STAR_PATTERN = "*";
@@ -41,31 +40,15 @@ abstract class Segment {
   public static final int GLOB = 5;
   public static final int UNKNOWN = 6;
 
-//  private String paramName; // ?queryName={paramName=value}
   private Token token;
   private Map<String,Value> values;
 
-//  protected Segment( String paramName, String valuePattern ) {
-//    this.paramName = paramName;
-//    this.values = new LinkedHashMap<>();
-//    this.values.put( valuePattern, new Value( valuePattern ) );
-//  }
-
   protected Segment( Token token ) {
     this.token = token;
     this.values = new LinkedHashMap<>();
     this.values.put( token.effectivePattern, new Value( token ) );
   }
 
-//  protected Segment( Segment that ) {
-//    this.paramName = that.paramName;
-//    this.values = new LinkedHashMap<>();
-//    for( Value thatValue : that.getValues() ) {
-//      Value thisValue = new Value( thatValue );
-//      this.values.put( thisValue.getPattern(), thisValue );
-//    }
-//  }
-
   protected Token getToken() {
     return token;
   }
@@ -128,11 +111,6 @@ abstract class Segment {
     values.put( token.effectivePattern, value );
   }
 
-//  void addValue( String valuePattern ) {
-//    Value value = new Value( valuePattern );
-//    values.put( valuePattern, value );
-//  }
-
   @Override
   public String toString() {
     StringBuilder s = new StringBuilder();
@@ -161,7 +139,7 @@ abstract class Segment {
     private Token token;
     private Pattern regex;
 
-    private Value( Token token ) {
+    Value( Token token ) {
       this.token = token;
       this.regex = null;
       String effectivePattern = token.effectivePattern;
@@ -181,29 +159,6 @@ abstract class Segment {
       }
     }
 
-//    private Value( String pattern ) {
-//      this.pattern = pattern;
-//      this.regex = null;
-//      if( DEFAULT_PATTERN.equals( pattern ) ) {
-//        this.type = DEFAULT;
-//      } else if( STAR_PATTERN.equals( pattern ) ) {
-//        this.type = STAR;
-//      } else if( GLOB_PATTERN.equals( pattern ) ) {
-//        type = GLOB;
-//      } else if ( pattern != null && pattern.contains( STAR_PATTERN ) ) {
-//        this.type = REGEX;
-//        this.regex = compileRegex( pattern );
-//      } else {
-//        this.type = STATIC;
-//      }
-//    }
-
-    private Value( Value that ) {
-      this.type = that.type;
-      this.token = that.token;
-      this.regex = that.regex;
-    }
-
     Token getToken() {
       return token;
     }
@@ -356,21 +311,4 @@ abstract class Segment {
     segment = createRegex( segment );
     return Pattern.compile( segment );
   }
-
-//  private static String escapeSpecialRegExChar( String input, char c ) {
-//    int i = input.indexOf( c );
-//    if( i >= 0 ) {
-//      int inputLength = input.length();
-//      StringBuilder output = new StringBuilder( inputLength + 1 );
-//      output.append( input, 0, i );
-//      output.append( '\\' );
-//      if( i < inputLength ) {
-//        output.append( input, i, inputLength );
-//      }
-//      input = output.toString();
-//    }
-//    return input;
-//  }
-
-  // Escape
 }

http://git-wip-us.apache.org/repos/asf/knox/blob/be7f4f37/gateway-util-urltemplate/src/main/java/org/apache/knox/gateway/util/urltemplate/Template.java
----------------------------------------------------------------------
diff --git a/gateway-util-urltemplate/src/main/java/org/apache/knox/gateway/util/urltemplate/Template.java b/gateway-util-urltemplate/src/main/java/org/apache/knox/gateway/util/urltemplate/Template.java
index 1293646..22f4a9e 100644
--- a/gateway-util-urltemplate/src/main/java/org/apache/knox/gateway/util/urltemplate/Template.java
+++ b/gateway-util-urltemplate/src/main/java/org/apache/knox/gateway/util/urltemplate/Template.java
@@ -18,7 +18,6 @@
 package org.apache.knox.gateway.util.urltemplate;
 
 import java.util.Collections;
-import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -56,7 +55,7 @@ public class Template {
       List<Path> path,
       boolean isAbsolute,
       boolean isDirectory,
-      LinkedHashMap<String,Query> query,
+      Map<String,Query> query,
       Query extra,
       boolean hasQuery,
       Fragment fragment,


Mime
View raw message