knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kris...@apache.org
Subject [09/10] knox git commit: KNOX-1663 - Enforce more Checkstyle rules
Date Fri, 07 Dec 2018 23:49:22 GMT
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/HaServiceConfig.java
----------------------------------------------------------------------
diff --git a/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/HaServiceConfig.java b/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/HaServiceConfig.java
index b746262..8daa2d6 100644
--- a/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/HaServiceConfig.java
+++ b/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/HaServiceConfig.java
@@ -18,36 +18,35 @@
 package org.apache.knox.gateway.ha.provider;
 
 public interface HaServiceConfig {
+  void setServiceName(String name);
 
-   public void setServiceName(String name);
+  String getServiceName();
 
-   public String getServiceName();
+  boolean isEnabled();
 
-   public boolean isEnabled();
+  void setEnabled(boolean enabled);
 
-   public void setEnabled(boolean enabled);
+  void setMaxFailoverAttempts(int limit);
 
-   public void setMaxFailoverAttempts(int limit);
+  int getMaxFailoverAttempts();
 
-   public int getMaxFailoverAttempts();
+  void setFailoverSleep(int sleep);
 
-   public void setFailoverSleep(int sleep);
+  int getFailoverSleep();
 
-   public int getFailoverSleep();
+  void setMaxRetryAttempts(int limit);
 
-   public void setMaxRetryAttempts(int limit);
+  int getMaxRetryAttempts();
 
-   public int getMaxRetryAttempts();
+  void setRetrySleep(int sleep);
 
-   public void setRetrySleep(int sleep);
+  int getRetrySleep();
 
-   public int getRetrySleep();
+  String getZookeeperEnsemble();
 
-   public String getZookeeperEnsemble();
+  void setZookeeperEnsemble(String zookeeperEnsemble);
 
-   public void setZookeeperEnsemble(String zookeeperEnsemble);
+  String getZookeeperNamespace();
 
-   public String getZookeeperNamespace();
-
-   public void setZookeeperNamespace(String zookeeperNamespace);
+  void setZookeeperNamespace(String zookeeperNamespace);
 }

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/URLManager.java
----------------------------------------------------------------------
diff --git a/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/URLManager.java b/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/URLManager.java
index 3cbc603..7f54c56 100644
--- a/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/URLManager.java
+++ b/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/URLManager.java
@@ -20,18 +20,17 @@ package org.apache.knox.gateway.ha.provider;
 import java.util.List;
 
 public interface URLManager {
+  boolean supportsConfig(HaServiceConfig config);
 
-  public boolean supportsConfig(HaServiceConfig config);
+  void setConfig(HaServiceConfig config);
 
-  public void setConfig(HaServiceConfig config);
+  String getActiveURL();
 
-  public String getActiveURL();
+  void setActiveURL(String url);
 
-  public void setActiveURL(String url);
+  List<String> getURLs();
 
-  public List<String> getURLs();
+  void setURLs(List<String> urls);
 
-  public void setURLs(List<String> urls);
-
-  public void markFailed(String url);
+  void markFailed(String url);
 }

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/AtlasZookeeperURLManager.java
----------------------------------------------------------------------
diff --git a/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/AtlasZookeeperURLManager.java b/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/AtlasZookeeperURLManager.java
index af0aa37..8bca9e4 100644
--- a/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/AtlasZookeeperURLManager.java
+++ b/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/AtlasZookeeperURLManager.java
@@ -72,7 +72,7 @@ public class AtlasZookeeperURLManager extends DefaultURLManager {
             .connectString(zooKeeperEnsemble)
             .retryPolicy(new ExponentialBackoffRetry(1000, 3))
             .build()) {
-            
+
             zooKeeperClient.start();
             zooKeeperClient.blockUntilConnected(10, TimeUnit.SECONDS);
 

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/BaseZookeeperURLManager.java
----------------------------------------------------------------------
diff --git a/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/BaseZookeeperURLManager.java b/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/BaseZookeeperURLManager.java
index 07be403..6107d2f 100644
--- a/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/BaseZookeeperURLManager.java
+++ b/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/BaseZookeeperURLManager.java
@@ -46,9 +46,9 @@ import org.apache.http.impl.client.HttpClientBuilder;
  * Base implementation of URLManager intended for query of Zookeeper active hosts. In
  * the event of a failure via markFailed, Zookeeper is queried again for active
  * host information.
- * 
+ *
  * When configuring the HAProvider in the topology, the zookeeperEnsemble attribute must be set to a
- * comma delimited list of the host and port number, i.e. host1:2181,host2:2181. 
+ * comma delimited list of the host and port number, i.e. host1:2181,host2:2181.
  */
 public abstract class BaseZookeeperURLManager implements URLManager {
   protected static final HaMessages LOG = MessagesFactory.get(HaMessages.class);

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/HBaseZookeeperURLManager.java
----------------------------------------------------------------------
diff --git a/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/HBaseZookeeperURLManager.java b/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/HBaseZookeeperURLManager.java
index b9dd018..91f7971 100644
--- a/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/HBaseZookeeperURLManager.java
+++ b/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/HBaseZookeeperURLManager.java
@@ -28,13 +28,13 @@ import java.util.concurrent.TimeUnit;
 
 /**
  * Implementation of URLManager intended for query of Zookeeper for active HBase RegionServer hosts.
- *  
+ *
  * The assumption is that the HBase REST Server will be installed on the same host.  For safety
  * reasons, the REST Server is pinged for access before inclusion in the list of returned hosts.
- * 
+ *
  * In the event of a failure via markFailed, Zookeeper is queried again for active
  * host information.
- * 
+ *
  * When configuring the HAProvider in the topology, the zookeeperEnsemble
  * attribute must be set to a comma delimited list of the host and port number,
  * i.e. host1:2181,host2:2181.

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/HaDescriptorConstants.java
----------------------------------------------------------------------
diff --git a/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/HaDescriptorConstants.java b/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/HaDescriptorConstants.java
index ffb0388..3ee55c1 100644
--- a/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/HaDescriptorConstants.java
+++ b/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/HaDescriptorConstants.java
@@ -28,25 +28,23 @@ package org.apache.knox.gateway.ha.provider.impl;
  * </pre>
  */
 public interface HaDescriptorConstants {
+   String ROOT_ELEMENT = "ha";
 
-   public static final String ROOT_ELEMENT = "ha";
+   String SERVICE_ELEMENT = "service";
 
-   public static final String SERVICE_ELEMENT = "service";
+   String SERVICE_NAME_ATTRIBUTE = "name";
 
-   public static final String SERVICE_NAME_ATTRIBUTE = "name";
+   String MAX_FAILOVER_ATTEMPTS = "maxFailoverAttempts";
 
-   public static final String MAX_FAILOVER_ATTEMPTS = "maxFailoverAttempts";
+   String FAILOVER_SLEEP = "failoverSleep";
 
-   public static final String FAILOVER_SLEEP = "failoverSleep";
+   String MAX_RETRY_ATTEMPTS = "maxRetryAttempts";
 
-   public static final String MAX_RETRY_ATTEMPTS = "maxRetryAttempts";
+   String RETRY_SLEEP = "retrySleep";
 
-   public static final String RETRY_SLEEP = "retrySleep";
+   String ENABLED_ATTRIBUTE = "enabled";
 
-   public static final String ENABLED_ATTRIBUTE = "enabled";
-
-   public static final String ZOOKEEPER_ENSEMBLE = "zookeeperEnsemble";
-
-   public static final String ZOOKEEPER_NAMESPACE = "zookeeperNamespace";
+   String ZOOKEEPER_ENSEMBLE = "zookeeperEnsemble";
 
+   String ZOOKEEPER_NAMESPACE = "zookeeperNamespace";
 }

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/HaServiceConfigConstants.java
----------------------------------------------------------------------
diff --git a/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/HaServiceConfigConstants.java b/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/HaServiceConfigConstants.java
index 3dd4965..f79daa2 100644
--- a/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/HaServiceConfigConstants.java
+++ b/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/HaServiceConfigConstants.java
@@ -18,33 +18,31 @@
 package org.apache.knox.gateway.ha.provider.impl;
 
 public interface HaServiceConfigConstants {
+   String CONFIG_PAIRS_DELIMITER = ";";
 
-   public static final String CONFIG_PAIRS_DELIMITER = ";";
+   String CONFIG_PAIR_DELIMITER = "=";
 
-   public static final String CONFIG_PAIR_DELIMITER = "=";
+   String CONFIG_PARAM_MAX_FAILOVER_ATTEMPTS = "maxFailoverAttempts";
 
-   public static final String CONFIG_PARAM_MAX_FAILOVER_ATTEMPTS = "maxFailoverAttempts";
+   String CONFIG_PARAM_FAILOVER_SLEEP = "failoverSleep";
 
-   public static final String CONFIG_PARAM_FAILOVER_SLEEP = "failoverSleep";
+   String CONFIG_PARAM_MAX_RETRY_ATTEMPTS = "maxRetryAttempts";
 
-   public static final String CONFIG_PARAM_MAX_RETRY_ATTEMPTS = "maxRetryAttempts";
+   String CONFIG_PARAM_RETRY_SLEEP = "retrySleep";
 
-   public static final String CONFIG_PARAM_RETRY_SLEEP = "retrySleep";
+   String CONFIG_PARAM_ENABLED = "enabled";
 
-   public static final String CONFIG_PARAM_ENABLED = "enabled";
+   String CONFIG_PARAM_ZOOKEEPER_ENSEMBLE = "zookeeperEnsemble";
 
-   public static final String CONFIG_PARAM_ZOOKEEPER_ENSEMBLE = "zookeeperEnsemble";
+   String CONFIG_PARAM_ZOOKEEPER_NAMESPACE = "zookeeperNamespace";
 
-   public static final String CONFIG_PARAM_ZOOKEEPER_NAMESPACE = "zookeeperNamespace";
+   int DEFAULT_MAX_FAILOVER_ATTEMPTS = 3;
 
-   public static final int DEFAULT_MAX_FAILOVER_ATTEMPTS = 3;
+   int DEFAULT_FAILOVER_SLEEP = 1000;
 
-   public static final int DEFAULT_FAILOVER_SLEEP = 1000;
+   int DEFAULT_MAX_RETRY_ATTEMPTS = 3;
 
-   public static final int DEFAULT_MAX_RETRY_ATTEMPTS = 3;
-
-   public static final int DEFAULT_RETRY_SLEEP = 1000;
-
-   public static final boolean DEFAULT_ENABLED = true;
+   int DEFAULT_RETRY_SLEEP = 1000;
 
+   boolean DEFAULT_ENABLED = true;
 }

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/KafkaZookeeperURLManager.java
----------------------------------------------------------------------
diff --git a/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/KafkaZookeeperURLManager.java b/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/KafkaZookeeperURLManager.java
index 06a5335..f09fc15 100644
--- a/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/KafkaZookeeperURLManager.java
+++ b/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/KafkaZookeeperURLManager.java
@@ -32,14 +32,14 @@ import java.util.List;
 import java.util.concurrent.TimeUnit;
 
 /**
- * Implementation of URLManager intended for query of Zookeeper for active Kafka hosts. 
- * 
+ * Implementation of URLManager intended for query of Zookeeper for active Kafka hosts.
+ *
  * The assumption is that the Confluent REST Proxy will be installed on the same host.  For safety
  * reasons, the REST Server is pinged for access before inclusion in the list of returned hosts.
- * 
+ *
  * In the event of a failure via markFailed, Zookeeper is queried again for active
  * host information.
- * 
+ *
  * When configuring the HAProvider in the topology, the zookeeperEnsemble
  * attribute must be set to a comma delimited list of the host and port number,
  * i.e. host1:2181,host2:2181.

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/SOLRZookeeperURLManager.java
----------------------------------------------------------------------
diff --git a/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/SOLRZookeeperURLManager.java b/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/SOLRZookeeperURLManager.java
index 71ce7bb..24a9e53 100644
--- a/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/SOLRZookeeperURLManager.java
+++ b/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/SOLRZookeeperURLManager.java
@@ -27,10 +27,10 @@ import java.util.List;
 import java.util.concurrent.TimeUnit;
 
 /**
- * Implementation of URLManager intended for query of Zookeeper for active SOLR Cloud hosts. 
+ * Implementation of URLManager intended for query of Zookeeper for active SOLR Cloud hosts.
  * In the event of a failure via markFailed, Zookeeper is queried again for active
  * host information.
- * 
+ *
  * When configuring the HAProvider in the topology, the zookeeperEnsemble
  * attribute must be set to a comma delimited list of the host and port number,
  * i.e. host1:2181,host2:2181.

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/StringResponseHandler.java
----------------------------------------------------------------------
diff --git a/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/StringResponseHandler.java b/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/StringResponseHandler.java
index b2e7be9..859f28c 100644
--- a/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/StringResponseHandler.java
+++ b/gateway-provider-ha/src/main/java/org/apache/knox/gateway/ha/provider/impl/StringResponseHandler.java
@@ -32,7 +32,7 @@ public class StringResponseHandler implements ResponseHandler<String>
 {
   @Override
   public String handleResponse(HttpResponse response)
-  throws ClientProtocolException, IOException 
+  throws ClientProtocolException, IOException
   {
     int status = response.getStatusLine().getStatusCode();
 

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/deploy/HaProviderDeploymentContributorTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/deploy/HaProviderDeploymentContributorTest.java b/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/deploy/HaProviderDeploymentContributorTest.java
index 4410020..e948ca9 100644
--- a/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/deploy/HaProviderDeploymentContributorTest.java
+++ b/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/deploy/HaProviderDeploymentContributorTest.java
@@ -355,7 +355,6 @@ public class HaProviderDeploymentContributorTest {
 
    /**
     * Validate the service ha config.
-    * 
     * @param config              The HaServiceConfig to validate
     * @param isEnabled           The expected enabled param value
     * @param failoverSleep       The expected failoverSleep param value

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/provider/impl/HBaseZookeeperURLManagerTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/provider/impl/HBaseZookeeperURLManagerTest.java b/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/provider/impl/HBaseZookeeperURLManagerTest.java
index 5e02f68..8858614 100644
--- a/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/provider/impl/HBaseZookeeperURLManagerTest.java
+++ b/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/provider/impl/HBaseZookeeperURLManagerTest.java
@@ -37,7 +37,7 @@ import static org.junit.Assert.fail;
 
 /**
  * Simple unit tests for HBaseZookeeperURLManager.
- * 
+ *
  * @see HBaseZookeeperURLManager
  */
 public class HBaseZookeeperURLManagerTest {

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/provider/impl/KafkaZookeeperURLManagerTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/provider/impl/KafkaZookeeperURLManagerTest.java b/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/provider/impl/KafkaZookeeperURLManagerTest.java
index 4c2fa45..30367c6 100644
--- a/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/provider/impl/KafkaZookeeperURLManagerTest.java
+++ b/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/provider/impl/KafkaZookeeperURLManagerTest.java
@@ -36,7 +36,7 @@ import static org.junit.Assert.assertTrue;
 
 /**
  * Simple unit tests for KafkaZookeeperURLManager.
- * 
+ *
  * @see KafkaZookeeperURLManager
  */
 public class KafkaZookeeperURLManagerTest {
@@ -64,7 +64,7 @@ public class KafkaZookeeperURLManagerTest {
       cluster.close();
     }
   }
-  
+
   @Test
   public void testHBaseZookeeperURLManagerLoading() {
     HaServiceConfig config = new DefaultHaServiceConfig("KAFKA");

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/provider/impl/SOLRZookeeperURLManagerTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/provider/impl/SOLRZookeeperURLManagerTest.java b/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/provider/impl/SOLRZookeeperURLManagerTest.java
index f874cbb..637fdab 100644
--- a/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/provider/impl/SOLRZookeeperURLManagerTest.java
+++ b/gateway-provider-ha/src/test/java/org/apache/knox/gateway/ha/provider/impl/SOLRZookeeperURLManagerTest.java
@@ -39,7 +39,7 @@ import static org.junit.Assert.assertTrue;
 
 /**
  * Simple unit tests for SOLRZookeeperURLManager.
- * 
+ *
  * @see SOLRZookeeperURLManager
  */
 public class SOLRZookeeperURLManagerTest {
@@ -84,20 +84,19 @@ public class SOLRZookeeperURLManagerTest {
 
     // Order of URLS is not deterministic out of Zookeeper
     // So we just check for expected values
-    
     TreeSet<String> expected = new TreeSet<>();
 
     expected.add("http://host1:8983/solr");
     expected.add("http://host2:8983/solr");
     expected.add("http://host3:8983/solr");
-    
+
     for(String url : urls) {
       assertTrue(expected.contains(url));
       expected.remove(url);
     }
-    
+
     assertEquals(0,expected.size());
-    
+
     // Unable to test markFailed because the SOLRZookeeperURLManager always does a refresh on Zookeeper contents.
   }
 

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-identity-assertion-common/src/main/java/org/apache/knox/gateway/identityasserter/common/filter/AbstractIdentityAssertionFilter.java
----------------------------------------------------------------------
diff --git a/gateway-provider-identity-assertion-common/src/main/java/org/apache/knox/gateway/identityasserter/common/filter/AbstractIdentityAssertionFilter.java b/gateway-provider-identity-assertion-common/src/main/java/org/apache/knox/gateway/identityasserter/common/filter/AbstractIdentityAssertionFilter.java
index d56ec87..f6dbae6 100644
--- a/gateway-provider-identity-assertion-common/src/main/java/org/apache/knox/gateway/identityasserter/common/filter/AbstractIdentityAssertionFilter.java
+++ b/gateway-provider-identity-assertion-common/src/main/java/org/apache/knox/gateway/identityasserter/common/filter/AbstractIdentityAssertionFilter.java
@@ -61,9 +61,6 @@ public abstract class AbstractIdentityAssertionFilter extends
         AuditConstants.DEFAULT_AUDITOR_NAME, AuditConstants.KNOX_SERVICE_NAME,
         AuditConstants.KNOX_COMPONENT_NAME );
 
-  /**
-   * 
-   */
   public AbstractIdentityAssertionFilter() {
     super();
   }
@@ -94,12 +91,12 @@ public abstract class AbstractIdentityAssertionFilter extends
         Subject subject = null;
         Principal impersonationPrincipal = null;
         Principal primaryPrincipal = null;
-        
-        // get the current subject and determine whether we need another doAs with 
+
+        // get the current subject and determine whether we need another doAs with
         // an impersonatedPrincipal and/or mapped group principals
         boolean impersonationNeeded = false;
         boolean groupsMapped = false;
-        
+
         // look up the current Java Subject and assosciated group principals
         Subject currentSubject = Subject.getSubject(AccessController.getContext());
         if (currentSubject == null) {
@@ -108,13 +105,13 @@ public abstract class AbstractIdentityAssertionFilter extends
         }
 
         Set<?> currentGroups = currentSubject.getPrincipals(GroupPrincipal.class);
-        
+
         primaryPrincipal = (PrimaryPrincipal) currentSubject.getPrincipals(PrimaryPrincipal.class).toArray()[0];
         if (primaryPrincipal != null) {
           if (!primaryPrincipal.getName().equals(mappedPrincipalName)) {
             impersonationNeeded = true;
             auditService.getContext().setProxyUsername( mappedPrincipalName );
-            auditor.audit( Action.IDENTITY_MAPPING, primaryPrincipal.getName(), 
+            auditor.audit( Action.IDENTITY_MAPPING, primaryPrincipal.getName(),
                 ResourceType.PRINCIPAL, ActionOutcome.SUCCESS, RES.effectiveUser(mappedPrincipalName) );
           }
         }
@@ -125,20 +122,20 @@ public abstract class AbstractIdentityAssertionFilter extends
           // TODO: log as appropriate
           primaryPrincipal = new PrimaryPrincipal(((HttpServletRequest) request).getUserPrincipal().getName());
         }
-        
+
         groupsMapped = groups != null || !currentGroups.isEmpty();
-        
+
         if (impersonationNeeded || groupsMapped) {
           // gonna need a new subject and doAs
           subject = new Subject();
           Set<Principal> principals = subject.getPrincipals();
           principals.add(primaryPrincipal);
-          
+
           // map group principals from current Subject into newly created Subject
           for (Object obj : currentGroups) {
             principals.add((Principal)obj);
           }
-          
+
           if (impersonationNeeded) {
             impersonationPrincipal = new ImpersonatedPrincipal(mappedPrincipalName);
             subject.getPrincipals().add(impersonationPrincipal);
@@ -182,7 +179,7 @@ public abstract class AbstractIdentityAssertionFilter extends
 
   private void addMappedGroupsToSubject(String mappedPrincipalName, String[] groups, Subject subject) {
     if (groups != null) {
-      auditor.audit( Action.IDENTITY_MAPPING, mappedPrincipalName, ResourceType.PRINCIPAL, 
+      auditor.audit( Action.IDENTITY_MAPPING, mappedPrincipalName, ResourceType.PRINCIPAL,
           ActionOutcome.SUCCESS, RES.groupsList( Arrays.toString( groups ) ) );
 
       for (int i = 0; i < groups.length; i++) {

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-identity-assertion-common/src/main/java/org/apache/knox/gateway/identityasserter/common/filter/CommonIdentityAssertionFilter.java
----------------------------------------------------------------------
diff --git a/gateway-provider-identity-assertion-common/src/main/java/org/apache/knox/gateway/identityasserter/common/filter/CommonIdentityAssertionFilter.java b/gateway-provider-identity-assertion-common/src/main/java/org/apache/knox/gateway/identityasserter/common/filter/CommonIdentityAssertionFilter.java
index 977c318..db75424 100644
--- a/gateway-provider-identity-assertion-common/src/main/java/org/apache/knox/gateway/identityasserter/common/filter/CommonIdentityAssertionFilter.java
+++ b/gateway-provider-identity-assertion-common/src/main/java/org/apache/knox/gateway/identityasserter/common/filter/CommonIdentityAssertionFilter.java
@@ -37,11 +37,11 @@ import java.security.AccessController;
 
 public class CommonIdentityAssertionFilter extends AbstractIdentityAssertionFilter {
   private IdentityAsserterMessages LOG = MessagesFactory.get(IdentityAsserterMessages.class);
-  
+
   private static final String GROUP_PRINCIPAL_MAPPING = "group.principal.mapping";
   private static final String PRINCIPAL_MAPPING = "principal.mapping";
   private SimplePrincipalMapper mapper = new SimplePrincipalMapper();
-  
+
   @Override
   public void init(FilterConfig filterConfig) throws ServletException {
     String principalMapping = filterConfig.getInitParameter(PRINCIPAL_MAPPING);
@@ -109,7 +109,7 @@ public class CommonIdentityAssertionFilter extends AbstractIdentityAssertionFilt
     // from request methods
     IdentityAsserterHttpServletRequestWrapper wrapper =
         new IdentityAsserterHttpServletRequestWrapper(
-        (HttpServletRequest)request, 
+        (HttpServletRequest)request,
         mappedPrincipalName);
     return wrapper;
   }

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-identity-assertion-common/src/main/java/org/apache/knox/gateway/identityasserter/common/filter/IdentityAsserterHttpServletRequestWrapper.java
----------------------------------------------------------------------
diff --git a/gateway-provider-identity-assertion-common/src/main/java/org/apache/knox/gateway/identityasserter/common/filter/IdentityAsserterHttpServletRequestWrapper.java b/gateway-provider-identity-assertion-common/src/main/java/org/apache/knox/gateway/identityasserter/common/filter/IdentityAsserterHttpServletRequestWrapper.java
index 4061a30..b4395d8 100644
--- a/gateway-provider-identity-assertion-common/src/main/java/org/apache/knox/gateway/identityasserter/common/filter/IdentityAsserterHttpServletRequestWrapper.java
+++ b/gateway-provider-identity-assertion-common/src/main/java/org/apache/knox/gateway/identityasserter/common/filter/IdentityAsserterHttpServletRequestWrapper.java
@@ -50,7 +50,7 @@ private static SpiGatewayMessages log = MessagesFactory.get( SpiGatewayMessages.
 
   private static final String PRINCIPAL_PARAM = "user.name";
   private static final String DOAS_PRINCIPAL_PARAM = "doAs";
-  
+
   private String username;
 
   public IdentityAsserterHttpServletRequestWrapper( HttpServletRequest request, String principal ) {
@@ -70,7 +70,7 @@ private static SpiGatewayMessages log = MessagesFactory.get( SpiGatewayMessages.
     }
     return super.getParameter(name);
   }
-  
+
   @Override
   public Map<String, String[]> getParameterMap() {
     Map<String, String[]> map = null;
@@ -145,7 +145,7 @@ private static SpiGatewayMessages log = MessagesFactory.get( SpiGatewayMessages.
       else {
         params = HttpUtils.splitQuery( qString );
       }
-    }  
+    }
     return params;
   }
 

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-identity-assertion-common/src/test/java/org/apache/knox/gateway/identityasserter/filter/CommonIdentityAssertionFilterTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-identity-assertion-common/src/test/java/org/apache/knox/gateway/identityasserter/filter/CommonIdentityAssertionFilterTest.java b/gateway-provider-identity-assertion-common/src/test/java/org/apache/knox/gateway/identityasserter/filter/CommonIdentityAssertionFilterTest.java
index e7ccb8c..25800f5 100644
--- a/gateway-provider-identity-assertion-common/src/test/java/org/apache/knox/gateway/identityasserter/filter/CommonIdentityAssertionFilterTest.java
+++ b/gateway-provider-identity-assertion-common/src/test/java/org/apache/knox/gateway/identityasserter/filter/CommonIdentityAssertionFilterTest.java
@@ -51,7 +51,7 @@ public class CommonIdentityAssertionFilterTest {
   private String username = null;
   private String[] mappedGroups = null;
   private Filter filter = null;
-  
+
   @Before
   public void setup() {
     filter = new CommonIdentityAssertionFilter() {
@@ -94,7 +94,7 @@ public class CommonIdentityAssertionFilterTest {
           throws IOException, ServletException {
       }
     };
-    
+
     Subject subject = new Subject();
     subject.getPrincipals().add(new PrimaryPrincipal("larry"));
     subject.getPrincipals().add(new GroupPrincipal("users"));

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-identity-assertion-common/src/test/java/org/apache/knox/gateway/identityasserter/filter/IdentityAssertionHttpServletRequestWrapperTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-identity-assertion-common/src/test/java/org/apache/knox/gateway/identityasserter/filter/IdentityAssertionHttpServletRequestWrapperTest.java b/gateway-provider-identity-assertion-common/src/test/java/org/apache/knox/gateway/identityasserter/filter/IdentityAssertionHttpServletRequestWrapperTest.java
index 5d63d33..7290e0d 100644
--- a/gateway-provider-identity-assertion-common/src/test/java/org/apache/knox/gateway/identityasserter/filter/IdentityAssertionHttpServletRequestWrapperTest.java
+++ b/gateway-provider-identity-assertion-common/src/test/java/org/apache/knox/gateway/identityasserter/filter/IdentityAssertionHttpServletRequestWrapperTest.java
@@ -111,7 +111,7 @@ public class IdentityAssertionHttpServletRequestWrapperTest {
     request.setCharacterEncoding( StandardCharsets.UTF_8.name() );
     request.setContentType( "application/x-www-form-urlencoded" );
     request.setMethod("POST");
-    
+
     IdentityAsserterHttpServletRequestWrapper wrapper
         = new IdentityAsserterHttpServletRequestWrapper( request, "output-user" );
 

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-identity-assertion-common/src/test/java/org/apache/knox/gateway/identityasserter/function/UsernameFunctionProcessorTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-identity-assertion-common/src/test/java/org/apache/knox/gateway/identityasserter/function/UsernameFunctionProcessorTest.java b/gateway-provider-identity-assertion-common/src/test/java/org/apache/knox/gateway/identityasserter/function/UsernameFunctionProcessorTest.java
index 8f81515..785751f 100644
--- a/gateway-provider-identity-assertion-common/src/test/java/org/apache/knox/gateway/identityasserter/function/UsernameFunctionProcessorTest.java
+++ b/gateway-provider-identity-assertion-common/src/test/java/org/apache/knox/gateway/identityasserter/function/UsernameFunctionProcessorTest.java
@@ -202,7 +202,7 @@ public class UsernameFunctionProcessorTest {
   private static class SetupFilter implements Filter {
     private Subject subject;
 
-    public SetupFilter( String userName ) {
+    SetupFilter( String userName ) {
       subject = new Subject();
       subject.getPrincipals().add( new BasicUserPrincipal( userName ) );
     }

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-identity-assertion-concat/src/test/java/org/apache/knox/gateway/identityasserter/concat/filter/ConcatIdentityAssertionFilterTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-identity-assertion-concat/src/test/java/org/apache/knox/gateway/identityasserter/concat/filter/ConcatIdentityAssertionFilterTest.java b/gateway-provider-identity-assertion-concat/src/test/java/org/apache/knox/gateway/identityasserter/concat/filter/ConcatIdentityAssertionFilterTest.java
index e960c0a..4fbe020 100644
--- a/gateway-provider-identity-assertion-concat/src/test/java/org/apache/knox/gateway/identityasserter/concat/filter/ConcatIdentityAssertionFilterTest.java
+++ b/gateway-provider-identity-assertion-concat/src/test/java/org/apache/knox/gateway/identityasserter/concat/filter/ConcatIdentityAssertionFilterTest.java
@@ -45,17 +45,17 @@ public class ConcatIdentityAssertionFilterTest {
 
     ConcatIdentityAssertionFilter filter = new ConcatIdentityAssertionFilter();
     Subject subject = new Subject();
-    
+
     subject.getPrincipals().add(new PrimaryPrincipal("larry"));
     subject.getPrincipals().add(new GroupPrincipal("users"));
     subject.getPrincipals().add(new GroupPrincipal("admin"));
-    
+
     filter.init(config);
     String username = filter.mapUserPrincipal(((Principal) subject.getPrincipals(PrimaryPrincipal.class).toArray()[0]).getName());
     String[] groups = filter.mapGroupPrincipals(username, subject);
     assertEquals(username, "larry");
     assertNull(groups); // means for the caller to use the existing subject groups
-    
+
     config = EasyMock.createNiceMock( FilterConfig.class );
     EasyMock.expect(config.getInitParameter("principal.mapping") ).andReturn( "" ).anyTimes();
     context = EasyMock.createNiceMock(ServletContext.class);

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-identity-assertion-hadoop-groups/src/main/java/org/apache/knox/gateway/identityasserter/hadoop/groups/filter/HadoopGroupProviderDeploymentContributor.java
----------------------------------------------------------------------
diff --git a/gateway-provider-identity-assertion-hadoop-groups/src/main/java/org/apache/knox/gateway/identityasserter/hadoop/groups/filter/HadoopGroupProviderDeploymentContributor.java b/gateway-provider-identity-assertion-hadoop-groups/src/main/java/org/apache/knox/gateway/identityasserter/hadoop/groups/filter/HadoopGroupProviderDeploymentContributor.java
index f41f793..eef4919 100644
--- a/gateway-provider-identity-assertion-hadoop-groups/src/main/java/org/apache/knox/gateway/identityasserter/hadoop/groups/filter/HadoopGroupProviderDeploymentContributor.java
+++ b/gateway-provider-identity-assertion-hadoop-groups/src/main/java/org/apache/knox/gateway/identityasserter/hadoop/groups/filter/HadoopGroupProviderDeploymentContributor.java
@@ -34,7 +34,7 @@ import java.util.Map.Entry;
 /**
  * A provider deployment contributor for looking up authenticated user groups as
  * seen by Hadoop implementation.
- * 
+ *
  * @since 0.11.0
  */
 
@@ -70,13 +70,13 @@ public class HadoopGroupProviderDeploymentContributor
       if (!prefix.endsWith(".")) {
           prefix += ".";
       }
-      Map<String, String> groupMappingParams = 
+      Map<String, String> groupMappingParams =
               ((Configuration)context.getGatewayConfig()).getPropsWithPrefix(prefix);
       if (groupMappingParams != null) {
         params = createParamList(resource, params, groupMappingParams);
       }
     }
-  
+
     if (params == null || params.isEmpty()) {
         params = buildFilterInitParms(provider, resource, params);
     }

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-identity-assertion-hadoop-groups/src/main/java/org/apache/knox/gateway/identityasserter/hadoop/groups/filter/HadoopGroupProviderMessages.java
----------------------------------------------------------------------
diff --git a/gateway-provider-identity-assertion-hadoop-groups/src/main/java/org/apache/knox/gateway/identityasserter/hadoop/groups/filter/HadoopGroupProviderMessages.java b/gateway-provider-identity-assertion-hadoop-groups/src/main/java/org/apache/knox/gateway/identityasserter/hadoop/groups/filter/HadoopGroupProviderMessages.java
index 685fb8b..db6246b 100644
--- a/gateway-provider-identity-assertion-hadoop-groups/src/main/java/org/apache/knox/gateway/identityasserter/hadoop/groups/filter/HadoopGroupProviderMessages.java
+++ b/gateway-provider-identity-assertion-hadoop-groups/src/main/java/org/apache/knox/gateway/identityasserter/hadoop/groups/filter/HadoopGroupProviderMessages.java
@@ -24,20 +24,18 @@ import org.apache.knox.gateway.i18n.messages.StackTrace;
 
 /**
  * Messages for provider - HadoopGroupProvider
- * 
+ *
  * @since 0.11
  */
-
 @Messages(logger="org.apache.knox.gateway")
 public interface HadoopGroupProviderMessages {
 
   @Message( level = MessageLevel.ERROR, text = "Error getting groups for principal {0}" )
-  void errorGettingUserGroups(final String principal , @StackTrace( level = MessageLevel.DEBUG ) Exception e );
-  
+  void errorGettingUserGroups(String principal , @StackTrace( level = MessageLevel.DEBUG ) Exception e );
+
   @Message( level = MessageLevel.INFO, text = "No groups for principal {0} found" )
-  void noGroupsFound(final String principal);
-  
+  void noGroupsFound(String principal);
+
   @Message( level = MessageLevel.DEBUG, text = "Found groups for principal {0} : {1}" )
-  void groupsFound(final String principal, final String groups );
-  
+  void groupsFound(String principal, String groups );
 }

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-identity-assertion-hadoop-groups/src/test/java/org/apache/knox/gateway/identityasserter/hadoop/groups/filter/HadoopGroupProviderDeploymentContributorTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-identity-assertion-hadoop-groups/src/test/java/org/apache/knox/gateway/identityasserter/hadoop/groups/filter/HadoopGroupProviderDeploymentContributorTest.java b/gateway-provider-identity-assertion-hadoop-groups/src/test/java/org/apache/knox/gateway/identityasserter/hadoop/groups/filter/HadoopGroupProviderDeploymentContributorTest.java
index e3e06bd..66675de 100644
--- a/gateway-provider-identity-assertion-hadoop-groups/src/test/java/org/apache/knox/gateway/identityasserter/hadoop/groups/filter/HadoopGroupProviderDeploymentContributorTest.java
+++ b/gateway-provider-identity-assertion-hadoop-groups/src/test/java/org/apache/knox/gateway/identityasserter/hadoop/groups/filter/HadoopGroupProviderDeploymentContributorTest.java
@@ -34,10 +34,9 @@ public class HadoopGroupProviderDeploymentContributorTest {
 
   @Test
   public void testServiceLoader() throws Exception {
-    
     ServiceLoader<ProviderDeploymentContributor> loader = ServiceLoader
         .load(ProviderDeploymentContributor.class);
-    
+
     Iterator<ProviderDeploymentContributor> iterator = loader.iterator();
     assertThat("Service iterator empty.", iterator.hasNext());
     while (iterator.hasNext()) {

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-identity-assertion-hadoop-groups/src/test/java/org/apache/knox/gateway/identityasserter/hadoop/groups/filter/HadoopGroupsTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-identity-assertion-hadoop-groups/src/test/java/org/apache/knox/gateway/identityasserter/hadoop/groups/filter/HadoopGroupsTest.java b/gateway-provider-identity-assertion-hadoop-groups/src/test/java/org/apache/knox/gateway/identityasserter/hadoop/groups/filter/HadoopGroupsTest.java
index 70d00e6..a2267bf 100644
--- a/gateway-provider-identity-assertion-hadoop-groups/src/test/java/org/apache/knox/gateway/identityasserter/hadoop/groups/filter/HadoopGroupsTest.java
+++ b/gateway-provider-identity-assertion-hadoop-groups/src/test/java/org/apache/knox/gateway/identityasserter/hadoop/groups/filter/HadoopGroupsTest.java
@@ -29,7 +29,7 @@ import org.junit.Test;
 /**
  * Test Hadoop {@link Groups} class. Basically to make sure that the
  * interface we depend on does not change.
- * 
+ *
  * @since 0.11.0
  */
 public class HadoopGroupsTest {

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-identity-assertion-pseudo/src/test/java/org/apache/knox/gateway/identityasserter/filter/DefaultIdentityAssertionFilterTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-identity-assertion-pseudo/src/test/java/org/apache/knox/gateway/identityasserter/filter/DefaultIdentityAssertionFilterTest.java b/gateway-provider-identity-assertion-pseudo/src/test/java/org/apache/knox/gateway/identityasserter/filter/DefaultIdentityAssertionFilterTest.java
index b66dbb1..273c103 100644
--- a/gateway-provider-identity-assertion-pseudo/src/test/java/org/apache/knox/gateway/identityasserter/filter/DefaultIdentityAssertionFilterTest.java
+++ b/gateway-provider-identity-assertion-pseudo/src/test/java/org/apache/knox/gateway/identityasserter/filter/DefaultIdentityAssertionFilterTest.java
@@ -47,17 +47,17 @@ public class DefaultIdentityAssertionFilterTest {
 
     IdentityAsserterFilter filter = new IdentityAsserterFilter();
     Subject subject = new Subject();
-    
+
     subject.getPrincipals().add(new PrimaryPrincipal("lmccay"));
     subject.getPrincipals().add(new GroupPrincipal("users"));
     subject.getPrincipals().add(new GroupPrincipal("admin"));
-    
+
     filter.init(config);
     String username = filter.mapUserPrincipal(((Principal) subject.getPrincipals(PrimaryPrincipal.class).toArray()[0]).getName());
     String[] groups = filter.mapGroupPrincipals(username, subject);
     assertEquals("lmccay", username);
     assertNull(groups); // means for the caller to use the existing subject groups
-    
+
     config = EasyMock.createNiceMock( FilterConfig.class );
     EasyMock.expect(config.getInitParameter("principal.mapping") ).andReturn( "lmccay,kminder=hdfs;newuser=mapred" ).anyTimes();
     EasyMock.expect(config.getInitParameter("group.principal.mapping") ).andReturn( "kminder=group1;lmccay=mrgroup,mrducks" ).anyTimes();
@@ -73,11 +73,11 @@ public class DefaultIdentityAssertionFilterTest {
     assertFalse("group1 WAS found in groups: " + Arrays.toString(mappedGroups), groupFoundIn("group1", mappedGroups));
 
     subject = new Subject();
-    
+
     subject.getPrincipals().add(new PrimaryPrincipal("kminder"));
     subject.getPrincipals().add(new GroupPrincipal("users"));
     subject.getPrincipals().add(new GroupPrincipal("admin"));
-    
+
     config = EasyMock.createNiceMock( FilterConfig.class );
     EasyMock.expect(config.getInitParameter("principal.mapping") ).andReturn( "lmccay,kminder=hdfs;newuser=mapred" ).anyTimes();
     EasyMock.expect(config.getInitParameter("group.principal.mapping") ).andReturn( "kminder=group1;lmccay=mrgroup,mrducks" ).anyTimes();
@@ -116,18 +116,18 @@ public class DefaultIdentityAssertionFilterTest {
 
     IdentityAsserterFilter filter = new IdentityAsserterFilter();
     Subject subject = new Subject();
-    
+
     subject.getPrincipals().add(new PrimaryPrincipal("lmccay"));
     subject.getPrincipals().add(new GroupPrincipal("users"));
     subject.getPrincipals().add(new GroupPrincipal("admin"));
-    
+
     filter.init(config);
     String username = filter.mapUserPrincipal(((Principal) subject.getPrincipals(PrimaryPrincipal.class).toArray()[0]).getName());
     String[] groups = filter.mapGroupPrincipals(((Principal) subject.getPrincipals(PrimaryPrincipal.class).toArray()[0]).getName(), subject);
-//    String[] groups = filter.mapGroupPrincipals(username, subject);
+
     assertEquals("lmccay", username);
     assertNull(groups); // means for the caller to use the existing subject groups
-    
+
     config = EasyMock.createNiceMock( FilterConfig.class );
     EasyMock.expect(config.getInitParameter("principal.mapping") ).andReturn( "" ).anyTimes();
     context = EasyMock.createNiceMock(ServletContext.class);
@@ -145,11 +145,11 @@ public class DefaultIdentityAssertionFilterTest {
     assertFalse("group1 WAS found in groups: " + Arrays.toString(groups), groupFoundIn("group1", groups));
 
     subject = new Subject();
-    
+
     subject.getPrincipals().add(new PrimaryPrincipal("kminder"));
     subject.getPrincipals().add(new GroupPrincipal("users"));
     subject.getPrincipals().add(new GroupPrincipal("admin"));
-    
+
     config = EasyMock.createNiceMock( FilterConfig.class );
     EasyMock.expect(config.getInitParameter("principal.mapping") ).andReturn( "" ).anyTimes();
     context = EasyMock.createNiceMock(ServletContext.class);
@@ -162,5 +162,4 @@ public class DefaultIdentityAssertionFilterTest {
     username = filter.mapUserPrincipal(((Principal) subject.getPrincipals(PrimaryPrincipal.class).toArray()[0]).getName());
     assertEquals("hdfs", username);
   }
-
 }

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-identity-assertion-regex/src/main/java/org/apache/knox/gateway/identityasserter/regex/filter/RegexIdentityAssertionFilter.java
----------------------------------------------------------------------
diff --git a/gateway-provider-identity-assertion-regex/src/main/java/org/apache/knox/gateway/identityasserter/regex/filter/RegexIdentityAssertionFilter.java b/gateway-provider-identity-assertion-regex/src/main/java/org/apache/knox/gateway/identityasserter/regex/filter/RegexIdentityAssertionFilter.java
index db4afbf..cb8c222 100644
--- a/gateway-provider-identity-assertion-regex/src/main/java/org/apache/knox/gateway/identityasserter/regex/filter/RegexIdentityAssertionFilter.java
+++ b/gateway-provider-identity-assertion-regex/src/main/java/org/apache/knox/gateway/identityasserter/regex/filter/RegexIdentityAssertionFilter.java
@@ -35,7 +35,7 @@ public class RegexIdentityAssertionFilter extends
   private String output = null;
   private Map<String,String> dict;
   RegexTemplate template;
-  
+
   @Override
   public void init(FilterConfig filterConfig) throws ServletException {
     super.init(filterConfig);

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-jersey/src/test/java/org/apache/knox/gateway/jersey/JerseyDeploymentContributorTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-jersey/src/test/java/org/apache/knox/gateway/jersey/JerseyDeploymentContributorTest.java b/gateway-provider-jersey/src/test/java/org/apache/knox/gateway/jersey/JerseyDeploymentContributorTest.java
index 0aa1356..1e86eba 100644
--- a/gateway-provider-jersey/src/test/java/org/apache/knox/gateway/jersey/JerseyDeploymentContributorTest.java
+++ b/gateway-provider-jersey/src/test/java/org/apache/knox/gateway/jersey/JerseyDeploymentContributorTest.java
@@ -206,7 +206,7 @@ public class JerseyDeploymentContributorTest {
     ProviderDeploymentContributor providerContributor;
     Provider provider;
 
-    public MockDeploymentContext(
+    MockDeploymentContext(
         DeploymentContext context,
         ProviderDeploymentContributor providerContributor,
         Provider provider ) {

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-rewrite-func-hostmap-static/src/test/java/org/apache/knox/gateway/hostmap/impl/HostmapFunctionProcessorTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite-func-hostmap-static/src/test/java/org/apache/knox/gateway/hostmap/impl/HostmapFunctionProcessorTest.java b/gateway-provider-rewrite-func-hostmap-static/src/test/java/org/apache/knox/gateway/hostmap/impl/HostmapFunctionProcessorTest.java
index f63d7cc..e405ae4 100644
--- a/gateway-provider-rewrite-func-hostmap-static/src/test/java/org/apache/knox/gateway/hostmap/impl/HostmapFunctionProcessorTest.java
+++ b/gateway-provider-rewrite-func-hostmap-static/src/test/java/org/apache/knox/gateway/hostmap/impl/HostmapFunctionProcessorTest.java
@@ -67,15 +67,14 @@ public class HostmapFunctionProcessorTest {
 
     HostMapper hm = EasyMock.createNiceMock(HostMapper.class);
     EasyMock.expect( hm.resolveInboundHostName("test-inbound-host")).andReturn( "test-inbound-rewritten-host" ).anyTimes();
-    
+
     HostMapperService hms = EasyMock.createNiceMock( HostMapperService.class );
 
     GatewayServices gatewayServices = EasyMock.createNiceMock( GatewayServices.class );
     EasyMock.expect( gatewayServices.getService( GatewayServices.HOST_MAPPING_SERVICE ) ).andReturn( hms ).anyTimes();
 
-
     UrlRewriteEnvironment environment = EasyMock.createNiceMock( UrlRewriteEnvironment.class );
-    EasyMock.expect( environment.getAttribute( GatewayServices.GATEWAY_SERVICES_ATTRIBUTE ) ).andReturn( gatewayServices ).anyTimes();    
+    EasyMock.expect( environment.getAttribute( GatewayServices.GATEWAY_SERVICES_ATTRIBUTE ) ).andReturn( gatewayServices ).anyTimes();
     EasyMock.expect( environment.resolve( "cluster.name" ) ).andReturn( Arrays.asList( "test-cluster-name" ) ).anyTimes();
     EasyMock.expect( environment.getResource( "/WEB-INF/hostmap.txt" ) ).andReturn( configUrl ).anyTimes();
     Resolver resolver = EasyMock.createNiceMock( Resolver.class );

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-rewrite-func-service-registry/src/test/java/org/apache/knox/gateway/svcregfunc/impl/ServiceRegistryFunctionsTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite-func-service-registry/src/test/java/org/apache/knox/gateway/svcregfunc/impl/ServiceRegistryFunctionsTest.java b/gateway-provider-rewrite-func-service-registry/src/test/java/org/apache/knox/gateway/svcregfunc/impl/ServiceRegistryFunctionsTest.java
index ee1b9eb..081eeeb 100644
--- a/gateway-provider-rewrite-func-service-registry/src/test/java/org/apache/knox/gateway/svcregfunc/impl/ServiceRegistryFunctionsTest.java
+++ b/gateway-provider-rewrite-func-service-registry/src/test/java/org/apache/knox/gateway/svcregfunc/impl/ServiceRegistryFunctionsTest.java
@@ -106,7 +106,7 @@ public class ServiceRegistryFunctionsTest {
       }
     }
     rewriteFilter.setFilter( new UrlRewriteServletFilter() );
-    
+
     interactions = new ArrayDeque<>();
 
     ServletHolder servlet = server.addServlet( MockServlet.class, "/" );
@@ -186,7 +186,7 @@ public class ServiceRegistryFunctionsTest {
   private static class SetupFilter implements Filter {
     private Subject subject;
 
-    public SetupFilter( String userName ) {
+    SetupFilter( String userName ) {
       subject = new Subject();
       subject.getPrincipals().add( new BasicUserPrincipal( userName ) );
     }

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-rewrite-step-secure-query/src/main/java/org/apache/knox/gateway/securequery/SecureQueryDecryptProcessor.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite-step-secure-query/src/main/java/org/apache/knox/gateway/securequery/SecureQueryDecryptProcessor.java b/gateway-provider-rewrite-step-secure-query/src/main/java/org/apache/knox/gateway/securequery/SecureQueryDecryptProcessor.java
index 6845dd2..df9e33e 100644
--- a/gateway-provider-rewrite-step-secure-query/src/main/java/org/apache/knox/gateway/securequery/SecureQueryDecryptProcessor.java
+++ b/gateway-provider-rewrite-step-secure-query/src/main/java/org/apache/knox/gateway/securequery/SecureQueryDecryptProcessor.java
@@ -111,8 +111,8 @@ public class SecureQueryDecryptProcessor implements
     byte[] clear = null;
     try {
       clear = encryptor.decrypt(
-          result.salt, 
-          result.iv, 
+          result.salt,
+          result.iv,
           result.cipher);
     } catch (Exception e) {
       log.unableToDecryptValue(e);

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-rewrite-step-secure-query/src/main/java/org/apache/knox/gateway/securequery/SecureQueryDeploymentContributor.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite-step-secure-query/src/main/java/org/apache/knox/gateway/securequery/SecureQueryDeploymentContributor.java b/gateway-provider-rewrite-step-secure-query/src/main/java/org/apache/knox/gateway/securequery/SecureQueryDeploymentContributor.java
index 88cb7be..b1ef60a 100644
--- a/gateway-provider-rewrite-step-secure-query/src/main/java/org/apache/knox/gateway/securequery/SecureQueryDeploymentContributor.java
+++ b/gateway-provider-rewrite-step-secure-query/src/main/java/org/apache/knox/gateway/securequery/SecureQueryDeploymentContributor.java
@@ -48,7 +48,7 @@ public class SecureQueryDeploymentContributor
   public String getName() {
     return PROVIDER_IMPL_NAME;
   }
-  
+
   public void setAliasService(AliasService as) {
     this.as = as;
   }
@@ -58,7 +58,7 @@ public class SecureQueryDeploymentContributor
     super.initializeContribution(context);
 
     String clusterName = context.getTopology().getName();
-    
+
     // we don't want to overwrite an existing alias from a previous topology deployment
     // so we can't just blindly generateAlias here.
     // this version of getPassword will generate a value for it only if missing

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-rewrite-step-secure-query/src/test/java/org/apache/knox/gateway/securequery/SecureQueryDeploymentContributorTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite-step-secure-query/src/test/java/org/apache/knox/gateway/securequery/SecureQueryDeploymentContributorTest.java b/gateway-provider-rewrite-step-secure-query/src/test/java/org/apache/knox/gateway/securequery/SecureQueryDeploymentContributorTest.java
index 298e8f2..2eaddaa 100644
--- a/gateway-provider-rewrite-step-secure-query/src/test/java/org/apache/knox/gateway/securequery/SecureQueryDeploymentContributorTest.java
+++ b/gateway-provider-rewrite-step-secure-query/src/test/java/org/apache/knox/gateway/securequery/SecureQueryDeploymentContributorTest.java
@@ -53,7 +53,7 @@ public class SecureQueryDeploymentContributorTest {
 
     Topology topology = new Topology();
     topology.setName("Sample");
-    
+
     DeploymentContext context = EasyMock.createNiceMock( DeploymentContext.class );
 //    EasyMock.expect( context.getDescriptor( "rewrite" ) ).andReturn( rewriteRules ).anyTimes();
     EasyMock.expect( context.getWebArchive() ).andReturn( webArchive ).anyTimes();
@@ -68,8 +68,8 @@ public class SecureQueryDeploymentContributorTest {
     EasyMock.expect( gatewayServices.getService( GatewayServices.CRYPTO_SERVICE ) ).andReturn( cryptoService ).anyTimes();
 
     UrlRewriteEnvironment encEnvironment = EasyMock.createNiceMock( UrlRewriteEnvironment.class );
-    EasyMock.expect( encEnvironment.getAttribute( GatewayServices.GATEWAY_SERVICES_ATTRIBUTE ) ).andReturn( gatewayServices ).anyTimes();    
-    
+    EasyMock.expect( encEnvironment.getAttribute( GatewayServices.GATEWAY_SERVICES_ATTRIBUTE ) ).andReturn( gatewayServices ).anyTimes();
+
     SecureQueryDeploymentContributor contributor = new SecureQueryDeploymentContributor();
     contributor.setAliasService(as);
 

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-rewrite-step-secure-query/src/test/java/org/apache/knox/gateway/securequery/SecureQueryEncodeProcessorTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite-step-secure-query/src/test/java/org/apache/knox/gateway/securequery/SecureQueryEncodeProcessorTest.java b/gateway-provider-rewrite-step-secure-query/src/test/java/org/apache/knox/gateway/securequery/SecureQueryEncodeProcessorTest.java
index 41979d9..6e37d0d 100644
--- a/gateway-provider-rewrite-step-secure-query/src/test/java/org/apache/knox/gateway/securequery/SecureQueryEncodeProcessorTest.java
+++ b/gateway-provider-rewrite-step-secure-query/src/test/java/org/apache/knox/gateway/securequery/SecureQueryEncodeProcessorTest.java
@@ -48,7 +48,7 @@ public class SecureQueryEncodeProcessorTest {
     EasyMock.expect( gatewayServices.getService( GatewayServices.CRYPTO_SERVICE ) ).andReturn( cryptoService );
 
     UrlRewriteEnvironment environment = EasyMock.createNiceMock( UrlRewriteEnvironment.class );
-    EasyMock.expect( environment.getAttribute( GatewayServices.GATEWAY_SERVICES_ATTRIBUTE ) ).andReturn( gatewayServices ).anyTimes();    
+    EasyMock.expect( environment.getAttribute( GatewayServices.GATEWAY_SERVICES_ATTRIBUTE ) ).andReturn( gatewayServices ).anyTimes();
     EasyMock.expect( environment.getAttribute( GatewayServices.GATEWAY_CLUSTER_ATTRIBUTE ) ).andReturn(Collections.singletonList("test-cluster-name")).anyTimes();
 
     Template inTemplate = Parser.parseLiteral( "http://host:0/root/path?query" );

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-rewrite-step-secure-query/src/test/java/org/apache/knox/gateway/securequery/SecureQueryEncryptDecryptProcessorTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite-step-secure-query/src/test/java/org/apache/knox/gateway/securequery/SecureQueryEncryptDecryptProcessorTest.java b/gateway-provider-rewrite-step-secure-query/src/test/java/org/apache/knox/gateway/securequery/SecureQueryEncryptDecryptProcessorTest.java
index a0c850e..211f98d 100644
--- a/gateway-provider-rewrite-step-secure-query/src/test/java/org/apache/knox/gateway/securequery/SecureQueryEncryptDecryptProcessorTest.java
+++ b/gateway-provider-rewrite-step-secure-query/src/test/java/org/apache/knox/gateway/securequery/SecureQueryEncryptDecryptProcessorTest.java
@@ -58,7 +58,7 @@ public class SecureQueryEncryptDecryptProcessorTest {
     EasyMock.expect( gatewayServices.getService( GatewayServices.CRYPTO_SERVICE ) ).andReturn( cryptoService );
 
     UrlRewriteEnvironment encEnvironment = EasyMock.createNiceMock( UrlRewriteEnvironment.class );
-    EasyMock.expect( encEnvironment.getAttribute( GatewayServices.GATEWAY_SERVICES_ATTRIBUTE ) ).andReturn( gatewayServices ).anyTimes();    
+    EasyMock.expect( encEnvironment.getAttribute( GatewayServices.GATEWAY_SERVICES_ATTRIBUTE ) ).andReturn( gatewayServices ).anyTimes();
     EasyMock.expect( encEnvironment.getAttribute( GatewayServices.GATEWAY_CLUSTER_ATTRIBUTE ) ).andReturn( "test-cluster-name" ).anyTimes();
     UrlRewriteContext encContext = EasyMock.createNiceMock( UrlRewriteContext.class );
     EasyMock.expect( encContext.getCurrentUrl() ).andReturn( origTemplate );
@@ -85,7 +85,7 @@ public class SecureQueryEncryptDecryptProcessorTest {
     EasyMock.expect( as.getPasswordFromAliasForCluster("test-cluster-name", "encryptQueryString")).andReturn( secret.toCharArray() ).anyTimes();
 
     UrlRewriteEnvironment decEnvironment = EasyMock.createNiceMock( UrlRewriteEnvironment.class );
-    EasyMock.expect( decEnvironment.getAttribute( GatewayServices.GATEWAY_SERVICES_ATTRIBUTE ) ).andReturn( gatewayServices ).anyTimes();    
+    EasyMock.expect( decEnvironment.getAttribute( GatewayServices.GATEWAY_SERVICES_ATTRIBUTE ) ).andReturn( gatewayServices ).anyTimes();
     EasyMock.expect( decEnvironment.getAttribute( GatewayServices.GATEWAY_CLUSTER_ATTRIBUTE ) ).andReturn( "test-cluster-name" ).anyTimes();
     Params decParams = EasyMock.createNiceMock( Params.class );
     EasyMock.expect( decParams.resolve( GatewayServices.GATEWAY_CLUSTER_ATTRIBUTE ) ).andReturn( Arrays.asList("test-cluster-name") ).anyTimes();

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/api/UrlRewriteFilterBufferDescriptor.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/api/UrlRewriteFilterBufferDescriptor.java b/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/api/UrlRewriteFilterBufferDescriptor.java
index 8950487..3740976 100644
--- a/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/api/UrlRewriteFilterBufferDescriptor.java
+++ b/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/api/UrlRewriteFilterBufferDescriptor.java
@@ -20,6 +20,5 @@ package org.apache.knox.gateway.filter.rewrite.api;
 public interface UrlRewriteFilterBufferDescriptor
     extends UrlRewriteFilterPathDescriptor, UrlRewriteFilterGroupDescriptor {
 
-  public UrlRewriteFilterDetectDescriptor addDetect( String path, String value );
-
+  UrlRewriteFilterDetectDescriptor addDetect( String path, String value );
 }

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/api/UrlRewriteFilterGroupDescriptor.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/api/UrlRewriteFilterGroupDescriptor.java b/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/api/UrlRewriteFilterGroupDescriptor.java
index f6a9f0e..bdfaad8 100644
--- a/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/api/UrlRewriteFilterGroupDescriptor.java
+++ b/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/api/UrlRewriteFilterGroupDescriptor.java
@@ -20,11 +20,9 @@ package org.apache.knox.gateway.filter.rewrite.api;
 import java.util.List;
 
 public interface UrlRewriteFilterGroupDescriptor extends UrlRewriteFilterPathDescriptor {
+  List<UrlRewriteFilterPathDescriptor> getSelectors();
 
-  public List<UrlRewriteFilterPathDescriptor> getSelectors();
-
-  public void addSelector( UrlRewriteFilterPathDescriptor selector );
+  void addSelector( UrlRewriteFilterPathDescriptor selector );
 
   UrlRewriteFilterApplyDescriptor addApply( String path, String rule );
-
 }

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/UrlRewriteFilterReader.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/UrlRewriteFilterReader.java b/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/UrlRewriteFilterReader.java
index 98c403f..3fada3f 100644
--- a/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/UrlRewriteFilterReader.java
+++ b/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/UrlRewriteFilterReader.java
@@ -21,12 +21,10 @@ import java.util.regex.Pattern;
 
 import org.apache.knox.gateway.filter.rewrite.api.UrlRewriteFilterPathDescriptor;
 
-
 public interface UrlRewriteFilterReader {
+  String filterValueString( String name, String value, String rule );
 
-  public String filterValueString( String name, String value, String rule );
-
-  public static class RegexCompiler implements UrlRewriteFilterPathDescriptor.Compiler<Pattern> {
+  class RegexCompiler implements UrlRewriteFilterPathDescriptor.Compiler<Pattern> {
     @Override
     public Pattern compile( String expression, Pattern compiled ) {
       if( compiled != null ) {

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/html/HtmlPrefixProcessor.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/html/HtmlPrefixProcessor.java b/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/html/HtmlPrefixProcessor.java
index 2e2d307..303e9c2 100644
--- a/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/html/HtmlPrefixProcessor.java
+++ b/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/html/HtmlPrefixProcessor.java
@@ -45,7 +45,7 @@ import java.util.List;
  * <div ng-include src=\"'http://localhost:8443/sandbox/service/components/navbar/navbar.html?v=1498928142479'\"></div>
  * }
  * </pre>
- * 
+ *
  * The rewrite rule could then contain the $prefix function that would delegate
  * to the frontend function.
  *

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/html/HtmlUrlRewriteFilterReader.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/html/HtmlUrlRewriteFilterReader.java b/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/html/HtmlUrlRewriteFilterReader.java
index f3f6074..d796a81 100644
--- a/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/html/HtmlUrlRewriteFilterReader.java
+++ b/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/html/HtmlUrlRewriteFilterReader.java
@@ -33,7 +33,7 @@ import java.net.URISyntaxException;
 public class HtmlUrlRewriteFilterReader extends HtmlFilterReader {
 
   private static final UrlRewriteMessages LOG = MessagesFactory.get( UrlRewriteMessages.class );
-  
+
   private Resolver resolver;
   private UrlRewriter rewriter;
   private UrlRewriter.Direction direction;

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/json/JsonFilterReader.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/json/JsonFilterReader.java b/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/json/JsonFilterReader.java
index ecc7925..7afab15 100644
--- a/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/json/JsonFilterReader.java
+++ b/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/json/JsonFilterReader.java
@@ -64,8 +64,7 @@ class JsonFilterReader extends Reader {
   private UrlRewriteFilterBufferDescriptor bufferingConfig;
   private UrlRewriteFilterGroupDescriptor config;
 
-
-  public JsonFilterReader( Reader reader, UrlRewriteFilterContentDescriptor config ) throws IOException {
+  JsonFilterReader( Reader reader, UrlRewriteFilterContentDescriptor config ) throws IOException {
     this.reader = reader;
     factory = new JsonFactory();
     mapper = new ObjectMapper();

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/xml/XmlFilterReader.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/xml/XmlFilterReader.java b/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/xml/XmlFilterReader.java
index 6c907f8..be67dac 100644
--- a/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/xml/XmlFilterReader.java
+++ b/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/xml/XmlFilterReader.java
@@ -404,12 +404,11 @@ public abstract class XmlFilterReader extends Reader {
     if( localName == null ) {
       qname = new QName( node.getNodeName() );
     } else {
-      if ( node.getPrefix() == null ) { 
+      if ( node.getPrefix() == null ) {
         qname = new QName( node.getNamespaceURI(), localName );
       } else {
         qname = new QName( node.getNamespaceURI(), localName, node.getPrefix() );
       }
-      
     }
     return qname;
   }
@@ -539,7 +538,7 @@ public abstract class XmlFilterReader extends Reader {
         writer.write( "]]>" );
       } else {
         writer.write( StringEscapeUtils.escapeXml( value ) );
-      }  
+      }
     }
   }
 
@@ -648,7 +647,7 @@ public abstract class XmlFilterReader extends Reader {
     }
   }
 
-  private static final void writeBufferedElement( Node node, Writer writer ) throws IOException {
+  private static void writeBufferedElement( Node node, Writer writer ) throws IOException {
     try {
       Transformer t = XmlUtils.getTransformer( false, false, 0, true );
       t.transform( new DOMSource( node ), new StreamResult( writer ) );

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/xml/XmlRewriteRulesDigester.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/xml/XmlRewriteRulesDigester.java b/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/xml/XmlRewriteRulesDigester.java
index 7f3580c..e6cd4cc 100644
--- a/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/xml/XmlRewriteRulesDigester.java
+++ b/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/xml/XmlRewriteRulesDigester.java
@@ -220,8 +220,7 @@ public class XmlRewriteRulesDigester extends AbstractRulesModule implements XmlR
 //    }
 //  }
 
-  private static abstract class FactoryRule extends Rule {
-
+  private abstract static class FactoryRule extends Rule {
     protected abstract Object create( String namespace, String name, Attributes attributes );
 
     @Override
@@ -233,7 +232,5 @@ public class XmlRewriteRulesDigester extends AbstractRulesModule implements XmlR
     public void end( String namespace, String name ) throws Exception {
       getDigester().pop();
     }
-
   }
-
 }

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/xml/XmlRewriteRulesTags.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/xml/XmlRewriteRulesTags.java b/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/xml/XmlRewriteRulesTags.java
index 2735d83..9d152cf 100644
--- a/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/xml/XmlRewriteRulesTags.java
+++ b/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/xml/XmlRewriteRulesTags.java
@@ -36,23 +36,14 @@ package org.apache.knox.gateway.filter.rewrite.impl.xml;
  * </pre>
  */
 public interface XmlRewriteRulesTags {
+  String ROOT = "rules";
+  String FUNCTIONS = "functions";
+  String RULE = "rule";
 
-  static final String ROOT = "rules";
-
-  static final String FUNCTIONS = "functions";
-
-  static final String RULE = "rule";
-
-//  static final String MATCH = "match";
-//  static final String CHECK = "check";
-//  static final String CONTROL = "control";
-//  static final String ACTION = "action";
-
-  static final String FILTER = "filter";
-  static final String CONTENT = "content";
-  static final String SCOPE = "scope";
-  static final String BUFFER = "buffer";
-  static final String DETECT = "detect";
-  static final String APPLY = "apply";
-
+  String FILTER = "filter";
+  String CONTENT = "content";
+  String SCOPE = "scope";
+  String BUFFER = "buffer";
+  String DETECT = "detect";
+  String APPLY = "apply";
 }

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/xml/XmlUrlRewriteRulesExporter.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/xml/XmlUrlRewriteRulesExporter.java b/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/xml/XmlUrlRewriteRulesExporter.java
index 89536f7..d6f6453 100644
--- a/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/xml/XmlUrlRewriteRulesExporter.java
+++ b/gateway-provider-rewrite/src/main/java/org/apache/knox/gateway/filter/rewrite/impl/xml/XmlUrlRewriteRulesExporter.java
@@ -52,7 +52,7 @@ import java.lang.reflect.InvocationTargetException;
 public class XmlUrlRewriteRulesExporter implements UrlRewriteRulesExporter, XmlRewriteRulesTags {
 
   private static final UrlRewriteMessages LOG = MessagesFactory.get( UrlRewriteMessages.class );
-  
+
   @Override
   public String getFormat() {
     return "xml";

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-rewrite/src/test/java/org/apache/knox/gateway/filter/rewrite/api/UrlRewriteProcessorTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/test/java/org/apache/knox/gateway/filter/rewrite/api/UrlRewriteProcessorTest.java b/gateway-provider-rewrite/src/test/java/org/apache/knox/gateway/filter/rewrite/api/UrlRewriteProcessorTest.java
index b7f56fa..5728cb6 100644
--- a/gateway-provider-rewrite/src/test/java/org/apache/knox/gateway/filter/rewrite/api/UrlRewriteProcessorTest.java
+++ b/gateway-provider-rewrite/src/test/java/org/apache/knox/gateway/filter/rewrite/api/UrlRewriteProcessorTest.java
@@ -393,11 +393,11 @@ public class UrlRewriteProcessorTest {
 
   /**
    * Turn a string containing URL parameters, e.g.
-   * 
+   *
    * <pre>
    * a=b&c=d&e=f
    * </pre>
-   * 
+   *
    * into a map such as
    * <table>
    * <tr>
@@ -413,7 +413,7 @@ public class UrlRewriteProcessorTest {
    * <td>d</td>
    * </tr>
    * </table>
-   * 
+   *
    * @param urlParameters the URL parameter string. Expected to contain something of the form
    *        "a=b&c=d" etc (i.e. Key=Value separated by &).
    * @return a map, with the key-values pairs representing the URL parameters.
@@ -426,6 +426,4 @@ public class UrlRewriteProcessorTest {
     }
     return map;
   }
-
-  
 }

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-rewrite/src/test/java/org/apache/knox/gateway/filter/rewrite/api/UrlRewriteServletFilterTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/test/java/org/apache/knox/gateway/filter/rewrite/api/UrlRewriteServletFilterTest.java b/gateway-provider-rewrite/src/test/java/org/apache/knox/gateway/filter/rewrite/api/UrlRewriteServletFilterTest.java
index ab2a9fc..0a25a3a 100644
--- a/gateway-provider-rewrite/src/test/java/org/apache/knox/gateway/filter/rewrite/api/UrlRewriteServletFilterTest.java
+++ b/gateway-provider-rewrite/src/test/java/org/apache/knox/gateway/filter/rewrite/api/UrlRewriteServletFilterTest.java
@@ -919,7 +919,7 @@ public class UrlRewriteServletFilterTest {
 
     assertThat(content,  is(expectedCustomHeader));
   }
-  
+
   /*
    * See KNOX-791
    */
@@ -958,7 +958,6 @@ public class UrlRewriteServletFilterTest {
     String content = response.getContent();
     assertThat(content, is(rewrittenResponseHtml));
   }
-  
 
   private static class SetupFilter implements Filter {
     @Override

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-rewrite/src/test/java/org/apache/knox/gateway/filter/rewrite/impl/FrontendFunctionProcessorTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/test/java/org/apache/knox/gateway/filter/rewrite/impl/FrontendFunctionProcessorTest.java b/gateway-provider-rewrite/src/test/java/org/apache/knox/gateway/filter/rewrite/impl/FrontendFunctionProcessorTest.java
index a0791fb..65b75bf 100644
--- a/gateway-provider-rewrite/src/test/java/org/apache/knox/gateway/filter/rewrite/impl/FrontendFunctionProcessorTest.java
+++ b/gateway-provider-rewrite/src/test/java/org/apache/knox/gateway/filter/rewrite/impl/FrontendFunctionProcessorTest.java
@@ -158,7 +158,7 @@ public class FrontendFunctionProcessorTest {
       }
     }
     rewriteFilter.setFilter( new UrlRewriteServletFilter() );
-    
+
     interactions = new ArrayDeque<>();
 
     ServletHolder servlet = server.addServlet( MockServlet.class, "/" );
@@ -258,7 +258,7 @@ public class FrontendFunctionProcessorTest {
   private static class SetupFilter implements Filter {
     private Subject subject;
 
-    public SetupFilter( String userName ) {
+    SetupFilter( String userName ) {
       subject = new Subject();
       subject.getPrincipals().add( new BasicUserPrincipal( userName ) );
     }

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-rewrite/src/test/java/org/apache/knox/gateway/filter/rewrite/impl/html/HtmlFilterReaderBaseTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/test/java/org/apache/knox/gateway/filter/rewrite/impl/html/HtmlFilterReaderBaseTest.java b/gateway-provider-rewrite/src/test/java/org/apache/knox/gateway/filter/rewrite/impl/html/HtmlFilterReaderBaseTest.java
index 18ed7c1..e611b9b 100644
--- a/gateway-provider-rewrite/src/test/java/org/apache/knox/gateway/filter/rewrite/impl/html/HtmlFilterReaderBaseTest.java
+++ b/gateway-provider-rewrite/src/test/java/org/apache/knox/gateway/filter/rewrite/impl/html/HtmlFilterReaderBaseTest.java
@@ -718,22 +718,22 @@ public class HtmlFilterReaderBaseTest {
       assertThat( step.flow(), is( UrlRewriteStepFlow.OR ) );
     }
   }
-  
+
   @Test
   public void testTagNameLetterCase() throws Exception {
     String inputXml = "<Root/>";
     StringReader inputReader = new StringReader( inputXml );
-    
+
     HtmlFilterReaderBase filterReader = new NoopXmlFilterReader( inputReader );
     String outputXml = new String( IOUtils.toCharArray( filterReader ) );
     assertThat( the( outputXml ), hasXPath( "/Root" ) );
   }
-  
+
   @Test
   public void testXmlWithHtmlTagNames() throws Exception {
     String inputXml = "<root><br><table name=\"table1\"></table><table name=\"table2\"></table></br></root>";
     StringReader inputReader = new StringReader( inputXml );
-    
+
     HtmlFilterReaderBase filterReader = new NoopXmlFilterReader( inputReader );
     String outputXml = new String( IOUtils.toCharArray( filterReader ) );
     assertThat( the( outputXml ), hasXPath( "/root/br/table[1]/@name", equalTo( "table1" ) ) );

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-security-authz-acls/src/main/java/org/apache/knox/gateway/deploy/impl/AclsAuthzDeploymentContributor.java
----------------------------------------------------------------------
diff --git a/gateway-provider-security-authz-acls/src/main/java/org/apache/knox/gateway/deploy/impl/AclsAuthzDeploymentContributor.java b/gateway-provider-security-authz-acls/src/main/java/org/apache/knox/gateway/deploy/impl/AclsAuthzDeploymentContributor.java
index 13f9968..fa095fe 100644
--- a/gateway-provider-security-authz-acls/src/main/java/org/apache/knox/gateway/deploy/impl/AclsAuthzDeploymentContributor.java
+++ b/gateway-provider-security-authz-acls/src/main/java/org/apache/knox/gateway/deploy/impl/AclsAuthzDeploymentContributor.java
@@ -54,14 +54,14 @@ public class AclsAuthzDeploymentContributor extends ProviderDeploymentContributo
   }
 
   @Override
-  public void contributeFilter( DeploymentContext context, Provider provider, Service service, 
+  public void contributeFilter( DeploymentContext context, Provider provider, Service service,
       ResourceDescriptor resource, List<FilterParamDescriptor> params ) {
     if (params == null) {
       params = new ArrayList<>();
     }
     // add resource role to params so that we can determine the acls to enforce at runtime
     params.add( resource.createFilterParam().name( "resource.role" ).value(resource.role() ) );
-    
+
     // the following are used within the AclsAuthz provider to replace
     // placeholders within the acls KNOX_ADMIN_GROUPS and KNOX_ADMIN_USERS
     String adminGroups = context.getGatewayConfig().getKnoxAdminGroups();

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-security-authz-acls/src/main/java/org/apache/knox/gateway/filter/AclParser.java
----------------------------------------------------------------------
diff --git a/gateway-provider-security-authz-acls/src/main/java/org/apache/knox/gateway/filter/AclParser.java b/gateway-provider-security-authz-acls/src/main/java/org/apache/knox/gateway/filter/AclParser.java
index d82f88d..603dfe8 100644
--- a/gateway-provider-security-authz-acls/src/main/java/org/apache/knox/gateway/filter/AclParser.java
+++ b/gateway-provider-security-authz-acls/src/main/java/org/apache/knox/gateway/filter/AclParser.java
@@ -38,7 +38,7 @@ public class AclParser {
     groups = new ArrayList<>();
     ipv = new IpAddressValidator(null);
   }
-  
+
   public void parseAcls(String resourceRole, String acls) throws InvalidACLException {
     if (acls != null) {
       String[] parts = acls.split(";");
@@ -49,7 +49,7 @@ public class AclParser {
         log.aclsFoundForResource(resourceRole);
       }
       parseUserAcls(parts);
-      
+
       parseGroupAcls(parts);
 
       parseIpAddressAcls(parts);

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-security-authz-acls/src/main/java/org/apache/knox/gateway/filter/AclsAuthorizationFilter.java
----------------------------------------------------------------------
diff --git a/gateway-provider-security-authz-acls/src/main/java/org/apache/knox/gateway/filter/AclsAuthorizationFilter.java b/gateway-provider-security-authz-acls/src/main/java/org/apache/knox/gateway/filter/AclsAuthorizationFilter.java
index 4813c06..6701198 100644
--- a/gateway-provider-security-authz-acls/src/main/java/org/apache/knox/gateway/filter/AclsAuthorizationFilter.java
+++ b/gateway-provider-security-authz-acls/src/main/java/org/apache/knox/gateway/filter/AclsAuthorizationFilter.java
@@ -56,14 +56,13 @@ public class AclsAuthorizationFilter implements Filter {
   private ArrayList<String> adminGroups = new ArrayList<>();;
   private ArrayList<String> adminUsers = new ArrayList<>();;
 
-  
   @Override
   public void init(FilterConfig filterConfig) throws ServletException {
     String adminGroups = filterConfig.getInitParameter("knox.admin.groups");
     if (adminGroups != null) {
       parseAdminGroupConfig(adminGroups);
     }
-    
+
     String adminUsers = filterConfig.getInitParameter("knox.admin.users");
     if (adminUsers != null) {
       parseAdminUserConfig(adminUsers);
@@ -118,8 +117,8 @@ public class AclsAuthorizationFilter implements Filter {
   protected boolean enforceAclAuthorizationPolicy(ServletRequest request,
       ServletResponse response, FilterChain chain) {
     HttpServletRequest req = (HttpServletRequest) request;
-    
-    // before enforcing acls check whether there are no acls defined 
+
+    // before enforcing acls check whether there are no acls defined
     // which would mean that there are no restrictions
     if (parser.users.size() == 0 && parser.groups.size() == 0 && parser.ipv.getIPAddresses().size() == 0) {
       return true;
@@ -128,7 +127,7 @@ public class AclsAuthorizationFilter implements Filter {
     boolean userAccess = false;
     boolean groupAccess = false;
     boolean ipAddrAccess = false;
-    
+
     Subject subject = Subject.getSubject(AccessController.getContext());
     Principal primaryPrincipal = (Principal)subject.getPrincipals(PrimaryPrincipal.class).toArray()[0];
     log.primaryPrincipal(primaryPrincipal.getName());
@@ -160,7 +159,7 @@ public class AclsAuthorizationFilter implements Filter {
     log.remoteIPAddress(req.getRemoteAddr());
     ipAddrAccess = checkRemoteIpAcls(req.getRemoteAddr());
     log.remoteIPAddressHasAccess(ipAddrAccess);
-    
+
     if ("OR".equals(aclProcessingMode)) {
       // need to interpret '*' as excluded for OR semantics
       // to make sense and not grant access to everyone by mistake.
@@ -169,7 +168,7 @@ public class AclsAuthorizationFilter implements Filter {
       if (parser.anyUser) userAccess = false;
       if (parser.anyGroup) groupAccess = false;
       if (parser.ipv.allowsAnyIP()) ipAddrAccess = false;
-      
+
       return (userAccess || groupAccess || ipAddrAccess);
     }
     else if ("AND".equals(aclProcessingMode)) {

http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-provider-security-authz-acls/src/test/java/org/apache/knox/gateway/filter/AclParserTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-security-authz-acls/src/test/java/org/apache/knox/gateway/filter/AclParserTest.java b/gateway-provider-security-authz-acls/src/test/java/org/apache/knox/gateway/filter/AclParserTest.java
index f8f738c..113b499 100644
--- a/gateway-provider-security-authz-acls/src/test/java/org/apache/knox/gateway/filter/AclParserTest.java
+++ b/gateway-provider-security-authz-acls/src/test/java/org/apache/knox/gateway/filter/AclParserTest.java
@@ -89,7 +89,6 @@ public class AclParserTest {
     assertFalse(p.ipv.allowsAnyIP());
     assertTrue(p.ipv.getIPAddresses().contains("127.0.0.1"));
   }
-    
 
   @Test
   public void testValidMultiValuedAcls() throws Exception {
@@ -130,10 +129,10 @@ public class AclParserTest {
     assertFalse(p.ipv.allowsAnyIP());
     assertTrue(p.ipv.getIPAddresses().contains("127.0.0.1"));
     assertTrue(p.ipv.getIPAddresses().contains("127.0.0.2"));
-    assertFalse(p.ipv.getIPAddresses().contains("127.0.0.3"));  
+    assertFalse(p.ipv.getIPAddresses().contains("127.0.0.3"));
   }
-  
-  @Test 
+
+  @Test
   public void testNullACL() throws Exception {
     AclParser p = new AclParser();
     try {
@@ -144,7 +143,7 @@ public class AclParserTest {
       fail("NULL acl should NOT have thrown InvalidACLException.");
     }
   }
-  
+
   @Test
   public void testInvalidAcls() throws Exception {
     AclParser p = new AclParser();
@@ -164,7 +163,7 @@ public class AclParserTest {
     catch (InvalidACLException sle) {
       // expected
     }
-  
+
     p = new AclParser();
     try {
       p.parseAcls("test", ";;");


Mime
View raw message