knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject [2/2] knox git commit: KNOX-937 - Remove redundant type information from Collections (Colm O hEigeartaigh via Sandeep More)
Date Fri, 19 May 2017 14:01:19 GMT
KNOX-937 - Remove redundant type information from Collections (Colm O hEigeartaigh via Sandeep More)


Project: http://git-wip-us.apache.org/repos/asf/knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/knox/commit/55150564
Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/55150564
Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/55150564

Branch: refs/heads/master
Commit: 5515056406afd48a6b55f4188fe80816c2133744
Parents: efc361d
Author: Sandeep More <more@apache.org>
Authored: Thu May 18 16:55:41 2017 -0400
Committer: Sandeep More <more@apache.org>
Committed: Fri May 19 10:00:21 2017 -0400

----------------------------------------------------------------------
 .../security/ldap/BaseDirectoryService.java     | 10 ++++----
 .../ha/provider/impl/HaDescriptorFactory.java   |  2 +-
 ...entityAsserterHttpServletRequestWrapper.java | 12 +++++-----
 ...yAssertionHttpServletRequestWrapperTest.java |  8 +++----
 .../function/UsernameFunctionProcessorTest.java |  2 +-
 .../impl/HostmapDeploymentContributorTest.java  |  2 +-
 .../impl/ServiceRegistryFunctionsTest.java      |  4 ++--
 .../encrypturi/EncryptStepContextParams.java    |  2 +-
 .../SecureQueryDeploymentContributorTest.java   |  2 +-
 .../UrlRewriteFunctionDescriptorFactory.java    |  2 +-
 .../filter/rewrite/api/UrlRewriteProcessor.java |  4 ++--
 .../api/UrlRewriteStepDescriptorFactory.java    |  2 +-
 .../api/UrlRewriteStreamFilterFactory.java      |  2 +-
 .../rewrite/impl/FrontendFunctionProcessor.java |  2 +-
 .../rewrite/impl/UrlRewriteContextImpl.java     |  2 +-
 .../UrlRewriteFunctionProcessorFactory.java     |  4 ++--
 .../filter/rewrite/impl/UrlRewriteResponse.java |  2 +-
 .../impl/UrlRewriteRuleDescriptorImpl.java      |  2 +-
 .../impl/UrlRewriteRulesDescriptorImpl.java     |  6 ++---
 .../impl/UrlRewriteStepProcessorFactory.java    |  4 ++--
 .../rewrite/impl/html/HtmlFilterReaderBase.java |  2 +-
 .../rewrite/api/UrlRewriteProcessorTest.java    |  2 +-
 .../api/UrlRewriteServletFilterTest.java        | 24 ++++++++++----------
 .../impl/FrontendFunctionProcessorTest.java     |  4 ++--
 .../rewrite/impl/UrlRewriteContextImplTest.java |  2 +-
 .../impl/html/HtmlFilterReaderBaseTest.java     | 14 ++++++------
 .../javascript/JavaScriptFilterReaderTest.java  |  4 ++--
 .../rewrite/impl/xml/XmlFilterReaderTest.java   |  6 ++---
 .../jwt/filter/AccessTokenFederationFilter.java |  2 +-
 .../filter/JWTAccessTokenAssertionFilter.java   |  2 +-
 .../jwt/filter/JWTAuthCodeAssertionFilter.java  |  2 +-
 .../jwt/filter/JWTFederationFilter.java         |  2 +-
 .../jwt/filter/SSOCookieFederationFilter.java   |  2 +-
 .../filter/ShiroSubjectIdentityAdapter.java     |  8 +++----
 .../gateway/shirorealm/KnoxLdapRealm.java       |  2 +-
 .../impl/ShiroDeploymentContributorTest.java    |  2 +-
 .../webappsec/filter/CSRFPreventionFilter.java  |  2 +-
 .../apache/hadoop/gateway/GatewayFactory.java   |  2 +-
 .../apache/hadoop/gateway/GatewayFilter.java    |  2 +-
 .../apache/hadoop/gateway/GatewayServer.java    |  2 +-
 .../gateway/deploy/DeploymentContextImpl.java   |  2 +-
 .../gateway/deploy/DeploymentFactory.java       | 16 ++++++-------
 .../impl/ApplicationDeploymentContributor.java  |  2 +-
 .../ServiceDefinitionDeploymentContributor.java |  2 +-
 .../gateway/services/CLIGatewayServices.java    |  2 +-
 .../services/DefaultGatewayServices.java        |  2 +-
 .../impl/DefaultServiceRegistryService.java     |  2 +-
 .../security/impl/DefaultCryptoService.java     |  2 +-
 .../topology/impl/DefaultTopologyService.java   |  8 +++----
 .../apache/hadoop/gateway/trace/TraceUtil.java  |  2 +-
 .../org/apache/hadoop/gateway/util/KnoxCLI.java |  2 +-
 .../gateway/util/ServiceDefinitionsLoader.java  |  4 ++--
 .../topology/DefaultTopologyServiceTest.java    |  6 ++---
 .../hadoop/gateway/websockets/BadUrlTest.java   |  2 +-
 .../gateway/websockets/WebsocketEchoTest.java   |  2 +-
 .../WebsocketMultipleConnectionTest.java        |  2 +-
 .../admin/TopologyCollectionMarshaller.java     |  2 +-
 .../service/admin/TopologyMarshaller.java       |  2 +-
 .../service/admin/VersionMarshaller.java        |  2 +-
 .../service/admin/TopologyMarshallerTest.java   |  2 +-
 .../service/knoxtoken/TokenResource.java        |  4 ++--
 .../knoxtoken/TokenServiceResourceTest.java     |  6 ++---
 .../test/ServiceTestWrapperMarshaller.java      |  2 +-
 .../org/apache/hadoop/gateway/shell/Hadoop.java |  2 +-
 .../org/apache/hadoop/gateway/shell/KnoxSh.java |  2 +-
 .../principal/SimplePrincipalMapper.java        |  2 +-
 .../services/hostmap/FileBasedHostMapper.java   |  4 ++--
 .../hadoop/gateway/topology/Topology.java       |  6 ++---
 .../hadoop/gateway/GatewayTestDriver.java       |  2 +-
 .../hadoop/test/mock/MockRequestMatcher.java    | 14 ++++++------
 .../hadoop/test/mock/MockResponseProvider.java  |  4 ++--
 .../gateway/AmbariServiceDefinitionTest.java    |  2 +-
 .../hadoop/gateway/GatewayAdminFuncTest.java    |  2 +-
 .../gateway/GatewayAdminTopologyFuncTest.java   |  2 +-
 .../hadoop/gateway/GatewayAppFuncTest.java      |  2 +-
 .../hadoop/gateway/GatewayBasicFuncTest.java    |  6 ++---
 .../hadoop/gateway/GatewayDeployFuncTest.java   |  2 +-
 .../hadoop/gateway/GatewayFuncTestDriver.java   |  4 ++--
 .../GatewayLdapDynamicGroupFuncTest.java        |  2 +-
 .../gateway/GatewayLdapGroupFuncTest.java       |  2 +-
 .../gateway/GatewayLdapPosixGroupFuncTest.java  |  2 +-
 .../gateway/GatewayLocalServiceFuncTest.java    |  2 +-
 .../hadoop/gateway/GatewayMultiFuncTest.java    |  2 +-
 .../hadoop/gateway/GatewaySampleFuncTest.java   |  2 +-
 .../hadoop/gateway/GatewaySslFuncTest.java      |  2 +-
 .../apache/hadoop/gateway/Knox242FuncTest.java  |  2 +-
 .../gateway/KnoxCliLdapFuncTestNegative.java    |  2 +-
 .../gateway/KnoxCliLdapFuncTestPositive.java    |  2 +-
 .../hadoop/gateway/KnoxCliSysBindTest.java      |  2 +-
 .../deploy/DeploymentFactoryFuncTest.java       | 14 ++++++------
 .../apache/hadoop/gateway/util/HttpUtils.java   |  2 +-
 .../apache/hadoop/gateway/util/MimeTypeMap.java |  2 +-
 .../hadoop/gateway/audit/JdbmQueueTest.java     |  4 ++--
 .../hadoop/gateway/util/JsonPathTest.java       |  4 ++--
 .../impl/ConfigurationAdapterFactory.java       |  2 +-
 .../AbstractConfigurationAdapterDescriptor.java |  2 +-
 .../apache/hadoop/gateway/config/FuncTest.java  |  6 ++---
 .../gateway/config/MapFieldSampleTest.java      |  2 +-
 .../gateway/config/MapMethodSampleTest.java     |  2 +-
 .../apache/hadoop/gateway/launcher/Command.java |  2 +-
 .../gateway/util/urltemplate/Expander.java      |  2 +-
 .../gateway/util/urltemplate/Matcher.java       |  2 +-
 .../gateway/util/urltemplate/MockParams.java    |  2 +-
 103 files changed, 184 insertions(+), 184 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-demo-ldap/src/main/java/org/apache/hadoop/gateway/security/ldap/BaseDirectoryService.java
----------------------------------------------------------------------
diff --git a/gateway-demo-ldap/src/main/java/org/apache/hadoop/gateway/security/ldap/BaseDirectoryService.java b/gateway-demo-ldap/src/main/java/org/apache/hadoop/gateway/security/ldap/BaseDirectoryService.java
index 0ceca72..b519f4b 100644
--- a/gateway-demo-ldap/src/main/java/org/apache/hadoop/gateway/security/ldap/BaseDirectoryService.java
+++ b/gateway-demo-ldap/src/main/java/org/apache/hadoop/gateway/security/ldap/BaseDirectoryService.java
@@ -245,7 +245,7 @@ public class BaseDirectoryService implements DirectoryService
   private Partition systemPartition;
 
   /** The set of all declared partitions */
-  private Set<Partition> partitions = new HashSet<Partition>();
+  private Set<Partition> partitions = new HashSet<>();
 
   /** A list of LDIF entries to inject at startup */
   private List<? extends LdifEntry> testEntries = new ArrayList<LdifEntry>(); // List<Attributes>
@@ -330,7 +330,7 @@ public class BaseDirectoryService implements DirectoryService
    */
   public Set<? extends Partition> getPartitions()
   {
-    Set<Partition> cloned = new HashSet<Partition>();
+    Set<Partition> cloned = new HashSet<>();
     cloned.addAll( partitions );
     return cloned;
   }
@@ -343,9 +343,9 @@ public class BaseDirectoryService implements DirectoryService
    */
   public void setPartitions( Set<? extends Partition> partitions )
   {
-    Set<Partition> cloned = new HashSet<Partition>();
+    Set<Partition> cloned = new HashSet<>();
     cloned.addAll( partitions );
-    Set<String> names = new HashSet<String>();
+    Set<String> names = new HashSet<>();
 
     for ( Partition partition : cloned )
     {
@@ -649,7 +649,7 @@ public class BaseDirectoryService implements DirectoryService
    */
   public void setInterceptors( List<Interceptor> interceptors )
   {
-    Map<String, Interceptor> interceptorNames = new HashMap<String, Interceptor>();
+    Map<String, Interceptor> interceptorNames = new HashMap<>();
 
     // Check if we don't have duplicate names in the interceptors list
     for ( Interceptor interceptor : interceptors )

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-provider-ha/src/main/java/org/apache/hadoop/gateway/ha/provider/impl/HaDescriptorFactory.java
----------------------------------------------------------------------
diff --git a/gateway-provider-ha/src/main/java/org/apache/hadoop/gateway/ha/provider/impl/HaDescriptorFactory.java b/gateway-provider-ha/src/main/java/org/apache/hadoop/gateway/ha/provider/impl/HaDescriptorFactory.java
index fc0b811..aeb6716 100644
--- a/gateway-provider-ha/src/main/java/org/apache/hadoop/gateway/ha/provider/impl/HaDescriptorFactory.java
+++ b/gateway-provider-ha/src/main/java/org/apache/hadoop/gateway/ha/provider/impl/HaDescriptorFactory.java
@@ -79,7 +79,7 @@ public abstract class HaDescriptorFactory implements HaServiceConfigConstants {
    }
 
    private static Map<String, String> parseHaConfiguration(String configuration) {
-      Map<String, String> parameters = new HashMap<String, String>();
+      Map<String, String> parameters = new HashMap<>();
       if (configuration != null) {
          String[] pairs = configuration.split(CONFIG_PAIRS_DELIMITER);
          for (String pair : pairs) {

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-provider-identity-assertion-common/src/main/java/org/apache/hadoop/gateway/identityasserter/common/filter/IdentityAsserterHttpServletRequestWrapper.java
----------------------------------------------------------------------
diff --git a/gateway-provider-identity-assertion-common/src/main/java/org/apache/hadoop/gateway/identityasserter/common/filter/IdentityAsserterHttpServletRequestWrapper.java b/gateway-provider-identity-assertion-common/src/main/java/org/apache/hadoop/gateway/identityasserter/common/filter/IdentityAsserterHttpServletRequestWrapper.java
index 3e4beb4..2a2d9d9 100644
--- a/gateway-provider-identity-assertion-common/src/main/java/org/apache/hadoop/gateway/identityasserter/common/filter/IdentityAsserterHttpServletRequestWrapper.java
+++ b/gateway-provider-identity-assertion-common/src/main/java/org/apache/hadoop/gateway/identityasserter/common/filter/IdentityAsserterHttpServletRequestWrapper.java
@@ -82,7 +82,7 @@ private static SpiGatewayMessages log = MessagesFactory.get( SpiGatewayMessages.
   public Enumeration getParameterNames() {
     Map<String, String[]> params = getParams();
     if (params == null) {
-      params = new HashMap<String, String[]>();
+      params = new HashMap<>();
     }
     Enumeration<String> e = Collections.enumeration((Collection<String>) params.keySet());
 
@@ -93,7 +93,7 @@ private static SpiGatewayMessages log = MessagesFactory.get( SpiGatewayMessages.
   public String[] getParameterValues(String name) {
     Map<String, String[]> params = getParams();
     if (params == null) {
-      params = new HashMap<String, String[]>();
+      params = new HashMap<>();
     }
 
     return params.get(name);
@@ -106,7 +106,7 @@ private static SpiGatewayMessages log = MessagesFactory.get( SpiGatewayMessages.
         params = HttpUtils.parseQueryString( qString );
       }
       else {
-        params = new HashMap<String, String[]>();
+        params = new HashMap<>();
       }
     }
     else {
@@ -130,7 +130,7 @@ private static SpiGatewayMessages log = MessagesFactory.get( SpiGatewayMessages.
     Map<String, String[]> params = getParams();
 
     if (params == null) {
-      params = new HashMap<String, String[]>();
+      params = new HashMap<>();
     }
     
     ArrayList<String> al = new ArrayList<String>();
@@ -167,7 +167,7 @@ private static SpiGatewayMessages log = MessagesFactory.get( SpiGatewayMessages.
 
   private Map<String, String[]> scrubOfExistingPrincipalParams(
       Map<String, String[]> params, List<String> principalParamNames) {
-    HashSet<String> remove = new HashSet<String>();
+    HashSet<String> remove = new HashSet<>();
     for (String paramKey : params.keySet()) {
       for (String p : principalParamNames) {
         if (p.equalsIgnoreCase(paramKey)) {
@@ -204,7 +204,7 @@ private static SpiGatewayMessages log = MessagesFactory.get( SpiGatewayMessages.
       String body = IOUtils.toString( super.getInputStream(), encoding );
       Map<String, String[]> params = getParams( body );
       if (params == null) {
-        params = new HashMap<String, String[]>();
+        params = new HashMap<>();
       }
       body = urlEncode( params, encoding );
       // ASCII is OK here because the urlEncode about should have already escaped

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-provider-identity-assertion-common/src/test/java/org/apache/hadoop/gateway/identityasserter/filter/IdentityAssertionHttpServletRequestWrapperTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-identity-assertion-common/src/test/java/org/apache/hadoop/gateway/identityasserter/filter/IdentityAssertionHttpServletRequestWrapperTest.java b/gateway-provider-identity-assertion-common/src/test/java/org/apache/hadoop/gateway/identityasserter/filter/IdentityAssertionHttpServletRequestWrapperTest.java
index 568c950..b026fc0 100644
--- a/gateway-provider-identity-assertion-common/src/test/java/org/apache/hadoop/gateway/identityasserter/filter/IdentityAssertionHttpServletRequestWrapperTest.java
+++ b/gateway-provider-identity-assertion-common/src/test/java/org/apache/hadoop/gateway/identityasserter/filter/IdentityAssertionHttpServletRequestWrapperTest.java
@@ -247,22 +247,22 @@ public class IdentityAssertionHttpServletRequestWrapperTest {
     String s;
     HashMap<String,String[]> m;
 
-    m = new HashMap<String,String[]>();
+    m = new HashMap<>();
     m.put( "null-values", null );
     s = IdentityAsserterHttpServletRequestWrapper.urlEncode( m, "UTF-8" );
     assertThat( s, is( "null-values" ) );
 
-    m = new HashMap<String,String[]>();
+    m = new HashMap<>();
     m.put( "no-values", new String[0] );
     s = IdentityAsserterHttpServletRequestWrapper.urlEncode( m, "UTF-8" );
     assertThat( s, is( "no-values" ) );
 
-    m = new HashMap<String,String[]>();
+    m = new HashMap<>();
     m.put( "one-value", new String[]{ "value1" } );
     s = IdentityAsserterHttpServletRequestWrapper.urlEncode( m, "UTF-8" );
     assertThat( s, is( "one-value=value1" ) );
 
-    m = new HashMap<String,String[]>();
+    m = new HashMap<>();
     m.put( "two-values", new String[]{ "value1", "value2" } );
     s = IdentityAsserterHttpServletRequestWrapper.urlEncode( m, "UTF-8" );
     assertThat( s, is( "two-values=value1&two-values=value2" ) );

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-provider-identity-assertion-common/src/test/java/org/apache/hadoop/gateway/identityasserter/function/UsernameFunctionProcessorTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-identity-assertion-common/src/test/java/org/apache/hadoop/gateway/identityasserter/function/UsernameFunctionProcessorTest.java b/gateway-provider-identity-assertion-common/src/test/java/org/apache/hadoop/gateway/identityasserter/function/UsernameFunctionProcessorTest.java
index 278d463..a54c03b 100644
--- a/gateway-provider-identity-assertion-common/src/test/java/org/apache/hadoop/gateway/identityasserter/function/UsernameFunctionProcessorTest.java
+++ b/gateway-provider-identity-assertion-common/src/test/java/org/apache/hadoop/gateway/identityasserter/function/UsernameFunctionProcessorTest.java
@@ -168,7 +168,7 @@ public class UsernameFunctionProcessorTest {
 
   @Test
   public void testRequestUrlRewriteOfUsernameViaRewriteRule() throws Exception {
-    Map<String,String> initParams = new HashMap<String,String>();
+    Map<String,String> initParams = new HashMap<>();
     initParams.put( "request.url", "test-rule-username" );
     setUp( "test-user", initParams );
 

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-provider-rewrite-func-hostmap-static/src/test/java/org/apache/hadoop/gateway/hostmap/impl/HostmapDeploymentContributorTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite-func-hostmap-static/src/test/java/org/apache/hadoop/gateway/hostmap/impl/HostmapDeploymentContributorTest.java b/gateway-provider-rewrite-func-hostmap-static/src/test/java/org/apache/hadoop/gateway/hostmap/impl/HostmapDeploymentContributorTest.java
index e8bf3c3..ef43735 100644
--- a/gateway-provider-rewrite-func-hostmap-static/src/test/java/org/apache/hadoop/gateway/hostmap/impl/HostmapDeploymentContributorTest.java
+++ b/gateway-provider-rewrite-func-hostmap-static/src/test/java/org/apache/hadoop/gateway/hostmap/impl/HostmapDeploymentContributorTest.java
@@ -62,7 +62,7 @@ public class HostmapDeploymentContributorTest {
 
     UrlRewriteRulesDescriptorImpl rewriteRules = new UrlRewriteRulesDescriptorImpl();
 
-    Map<String,String> providerParams = new HashMap<String, String>();
+    Map<String,String> providerParams = new HashMap<>();
     providerParams.put( "test-host-external", "test-host-internal" );
     Provider provider = new Provider();
     provider.setEnabled( true );

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-provider-rewrite-func-service-registry/src/test/java/org/apache/hadoop/gateway/svcregfunc/impl/ServiceRegistryFunctionsTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite-func-service-registry/src/test/java/org/apache/hadoop/gateway/svcregfunc/impl/ServiceRegistryFunctionsTest.java b/gateway-provider-rewrite-func-service-registry/src/test/java/org/apache/hadoop/gateway/svcregfunc/impl/ServiceRegistryFunctionsTest.java
index c61c013..c4a41d5 100644
--- a/gateway-provider-rewrite-func-service-registry/src/test/java/org/apache/hadoop/gateway/svcregfunc/impl/ServiceRegistryFunctionsTest.java
+++ b/gateway-provider-rewrite-func-service-registry/src/test/java/org/apache/hadoop/gateway/svcregfunc/impl/ServiceRegistryFunctionsTest.java
@@ -115,7 +115,7 @@ public class ServiceRegistryFunctionsTest {
 
   @Test
   public void testServiceRegistryFunctionsOnXmlRequestBody() throws Exception {
-    Map<String,String> initParams = new HashMap<String,String>();
+    Map<String,String> initParams = new HashMap<>();
     initParams.put( "request.body", "oozie-conf" );
     setUp( "test-user", initParams );
 
@@ -147,7 +147,7 @@ public class ServiceRegistryFunctionsTest {
 
   @Test
   public void testServiceRegistryFunctionsOnJsonRequestBody() throws Exception {
-    Map<String,String> initParams = new HashMap<String,String>();
+    Map<String,String> initParams = new HashMap<>();
     initParams.put( "request.body", "oozie-conf" );
     setUp( "test-user", initParams );
 

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-provider-rewrite-step-encrypt-uri/src/main/java/org/apache/hadoop/gateway/encrypturi/EncryptStepContextParams.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite-step-encrypt-uri/src/main/java/org/apache/hadoop/gateway/encrypturi/EncryptStepContextParams.java b/gateway-provider-rewrite-step-encrypt-uri/src/main/java/org/apache/hadoop/gateway/encrypturi/EncryptStepContextParams.java
index aa7ab49..6df13eb 100644
--- a/gateway-provider-rewrite-step-encrypt-uri/src/main/java/org/apache/hadoop/gateway/encrypturi/EncryptStepContextParams.java
+++ b/gateway-provider-rewrite-step-encrypt-uri/src/main/java/org/apache/hadoop/gateway/encrypturi/EncryptStepContextParams.java
@@ -25,7 +25,7 @@ import java.util.Set;
 import org.apache.hadoop.gateway.util.urltemplate.Params;
 
 public class EncryptStepContextParams implements Params {
-  Map<String, List<String>> params = new HashMap<String, List<String>>();
+  Map<String, List<String>> params = new HashMap<>();
 
   public EncryptStepContextParams() {
   }

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-provider-rewrite-step-secure-query/src/test/java/org/apache/hadoop/gateway/securequery/SecureQueryDeploymentContributorTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite-step-secure-query/src/test/java/org/apache/hadoop/gateway/securequery/SecureQueryDeploymentContributorTest.java b/gateway-provider-rewrite-step-secure-query/src/test/java/org/apache/hadoop/gateway/securequery/SecureQueryDeploymentContributorTest.java
index 04946d6..f56c398 100644
--- a/gateway-provider-rewrite-step-secure-query/src/test/java/org/apache/hadoop/gateway/securequery/SecureQueryDeploymentContributorTest.java
+++ b/gateway-provider-rewrite-step-secure-query/src/test/java/org/apache/hadoop/gateway/securequery/SecureQueryDeploymentContributorTest.java
@@ -47,7 +47,7 @@ public class SecureQueryDeploymentContributorTest {
 
 //    UrlRewriteRulesDescriptorImpl rewriteRules = new UrlRewriteRulesDescriptorImpl();
 
-    Map<String,String> providerParams = new HashMap<String, String>();
+    Map<String,String> providerParams = new HashMap<>();
 //    providerParams.put( "test-host-external", "test-host-internal" );
     Provider provider = new Provider();
     provider.setEnabled( true );

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteFunctionDescriptorFactory.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteFunctionDescriptorFactory.java b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteFunctionDescriptorFactory.java
index 92bdb16..5d72695 100644
--- a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteFunctionDescriptorFactory.java
+++ b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteFunctionDescriptorFactory.java
@@ -44,7 +44,7 @@ public abstract class UrlRewriteFunctionDescriptorFactory {
 
   private static Map<String,Class<? extends UrlRewriteFunctionDescriptor>> loadDescriptors() {
     Map<String,Class<? extends UrlRewriteFunctionDescriptor>> map
-        = new HashMap<String, Class<? extends UrlRewriteFunctionDescriptor>>();
+        = new HashMap<>();
     ServiceLoader<? extends UrlRewriteFunctionDescriptor> descriptors
         = ServiceLoader.load( UrlRewriteFunctionDescriptor.class );
     for( UrlRewriteFunctionDescriptor descriptor : descriptors ) {

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteProcessor.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteProcessor.java b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteProcessor.java
index 1c97dc2..c0a5639 100644
--- a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteProcessor.java
+++ b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteProcessor.java
@@ -45,10 +45,10 @@ public class UrlRewriteProcessor implements UrlRewriter {
 
   UrlRewriteEnvironment environment;
   UrlRewriteRulesDescriptor descriptor;
-  Map<String,UrlRewriteRuleProcessorHolder> rules = new HashMap<String,UrlRewriteRuleProcessorHolder>();
+  Map<String,UrlRewriteRuleProcessorHolder> rules = new HashMap<>();
   ScopedMatcher inbound = new ScopedMatcher();
   ScopedMatcher outbound = new ScopedMatcher();
-  Map<String,UrlRewriteFunctionProcessor> functions = new HashMap<String,UrlRewriteFunctionProcessor>();
+  Map<String,UrlRewriteFunctionProcessor> functions = new HashMap<>();
 
   public UrlRewriteProcessor() {
   }

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteStepDescriptorFactory.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteStepDescriptorFactory.java b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteStepDescriptorFactory.java
index ef1c19f..9c30c3f 100644
--- a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteStepDescriptorFactory.java
+++ b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteStepDescriptorFactory.java
@@ -43,7 +43,7 @@ public abstract class UrlRewriteStepDescriptorFactory {
 
   private static Map<String,Class<? extends UrlRewriteStepDescriptor>> loadStepDescriptors() {
     Map<String,Class<? extends UrlRewriteStepDescriptor>> map
-        = new HashMap<String, Class<? extends UrlRewriteStepDescriptor>>();
+        = new HashMap<>();
     ServiceLoader<? extends UrlRewriteStepDescriptor> descriptors
         = ServiceLoader.load( UrlRewriteStepDescriptor.class );
     for( UrlRewriteStepDescriptor descriptor : descriptors ) {

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteStreamFilterFactory.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteStreamFilterFactory.java b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteStreamFilterFactory.java
index 0fa791c..cd7c439 100644
--- a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteStreamFilterFactory.java
+++ b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteStreamFilterFactory.java
@@ -59,7 +59,7 @@ public abstract class UrlRewriteStreamFilterFactory {
   }
 
   private static Map<String,Map<String,UrlRewriteStreamFilter>> loadFactories() {
-    Map<String,Map<String,UrlRewriteStreamFilter>> typeMap = new HashMap<String,Map<String,UrlRewriteStreamFilter>>();
+    Map<String,Map<String,UrlRewriteStreamFilter>> typeMap = new HashMap<>();
     ServiceLoader<UrlRewriteStreamFilter> filters = ServiceLoader.load( UrlRewriteStreamFilter.class );
     for( UrlRewriteStreamFilter filter : filters ) {
       String[] types = filter.getTypes();

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/FrontendFunctionProcessor.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/FrontendFunctionProcessor.java b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/FrontendFunctionProcessor.java
index 2b66b6c..be1eca5 100644
--- a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/FrontendFunctionProcessor.java
+++ b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/FrontendFunctionProcessor.java
@@ -49,7 +49,7 @@ public class FrontendFunctionProcessor implements UrlRewriteFunctionProcessor<Fr
       throw new IllegalArgumentException( "environment==null" );
     }
     URI frontend = environment.getAttribute( FrontendFunctionDescriptor.FRONTEND_URI_ATTRIBUTE );
-    resolvers = new HashMap<String,UrlRewriteResolver>();
+    resolvers = new HashMap<>();
     if( frontend == null ) {
       resolvers.put( "url", new ParamResolver( "gateway.url" ) );
       resolvers.put( "addr", new ParamResolver( "gateway.addr" ) );

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteContextImpl.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteContextImpl.java b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteContextImpl.java
index 57e54c0..4a153d0 100644
--- a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteContextImpl.java
+++ b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteContextImpl.java
@@ -99,7 +99,7 @@ public class UrlRewriteContextImpl implements UrlRewriteContext {
 
   private class ContextParameters implements Params {
 
-    Map<String,List<String>> map = new HashMap<String,List<String>>();
+    Map<String,List<String>> map = new HashMap<>();
 
     @Override
     public Set<String> getNames() {

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteFunctionProcessorFactory.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteFunctionProcessorFactory.java b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteFunctionProcessorFactory.java
index 56c0034..2676cfc 100644
--- a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteFunctionProcessorFactory.java
+++ b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteFunctionProcessorFactory.java
@@ -62,13 +62,13 @@ public abstract class UrlRewriteFunctionProcessorFactory {
 
   private static Map<Class<? extends UrlRewriteFunctionDescriptor>,Map<String,Class<? extends UrlRewriteFunctionProcessor>>> loadProcessors() {
     Map<Class<? extends UrlRewriteFunctionDescriptor>,Map<String,Class<? extends UrlRewriteFunctionProcessor>>> descriptorMap
-        = new HashMap<Class<? extends UrlRewriteFunctionDescriptor>,Map<String,Class<? extends UrlRewriteFunctionProcessor>>>();
+        = new HashMap<>();
     ServiceLoader<UrlRewriteFunctionProcessor> processors = ServiceLoader.load( UrlRewriteFunctionProcessor.class );
     for( UrlRewriteFunctionProcessor processor : processors ) {
       Class<? extends UrlRewriteFunctionDescriptor> descriptorInterface = getDescriptorInterface( processor );
       Map<String,Class<? extends UrlRewriteFunctionProcessor>> typeMap = descriptorMap.get( descriptorInterface );
       if( typeMap == null ) {
-        typeMap = new HashMap<String,Class<? extends UrlRewriteFunctionProcessor>>();
+        typeMap = new HashMap<>();
         descriptorMap.put( descriptorInterface, typeMap );
       }
       String functionName = processor.name();

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteResponse.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteResponse.java b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteResponse.java
index c006d01..af280cd 100644
--- a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteResponse.java
+++ b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteResponse.java
@@ -69,7 +69,7 @@ public class UrlRewriteResponse extends GatewayResponseWrapper implements Params
   // Testing with 16K made no appreciable difference.
   private static final int STREAM_BUFFER_SIZE = 8 * 1024;
 
-  private static final Set<String> IGNORE_HEADER_NAMES = new HashSet<String>();
+  private static final Set<String> IGNORE_HEADER_NAMES = new HashSet<>();
   static {
     IGNORE_HEADER_NAMES.add( "Content-Length" );
   }

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteRuleDescriptorImpl.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteRuleDescriptorImpl.java b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteRuleDescriptorImpl.java
index 0658c86..c0396a2 100644
--- a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteRuleDescriptorImpl.java
+++ b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteRuleDescriptorImpl.java
@@ -176,7 +176,7 @@ public class UrlRewriteRuleDescriptorImpl extends UrlRewriteFlowDescriptorBase<U
     return directionNameMap.get( direction );
   }
 
-  private static Map<String,UrlRewriter.Direction> directionNameMap = new HashMap<String,UrlRewriter.Direction>();
+  private static Map<String,UrlRewriter.Direction> directionNameMap = new HashMap<>();
   static {
     directionNameMap.put( "inbound", UrlRewriter.Direction.IN );
     directionNameMap.put( "in", UrlRewriter.Direction.IN );

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteRulesDescriptorImpl.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteRulesDescriptorImpl.java b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteRulesDescriptorImpl.java
index 108793f..9e08bcb 100644
--- a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteRulesDescriptorImpl.java
+++ b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteRulesDescriptorImpl.java
@@ -30,12 +30,12 @@ import java.util.Map;
 
 public class UrlRewriteRulesDescriptorImpl implements UrlRewriteRulesDescriptor {
 
-  private Map<String,UrlRewriteFunctionDescriptor> funcMap = new HashMap<String,UrlRewriteFunctionDescriptor>();
+  private Map<String,UrlRewriteFunctionDescriptor> funcMap = new HashMap<>();
   private List<UrlRewriteFunctionDescriptor> funcList = new ArrayList<UrlRewriteFunctionDescriptor>();
   private List<UrlRewriteRuleDescriptor> ruleList = new ArrayList<UrlRewriteRuleDescriptor>();
-  private Map<String,UrlRewriteRuleDescriptor> ruleMap = new HashMap<String,UrlRewriteRuleDescriptor>();
+  private Map<String,UrlRewriteRuleDescriptor> ruleMap = new HashMap<>();
   private List<UrlRewriteFilterDescriptor> filterList = new ArrayList<UrlRewriteFilterDescriptor>();
-  private Map<String,UrlRewriteFilterDescriptor> filterMap = new HashMap<String,UrlRewriteFilterDescriptor>();
+  private Map<String,UrlRewriteFilterDescriptor> filterMap = new HashMap<>();
 
   @Override
   public void addRules( UrlRewriteRulesDescriptor rules ) {

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteStepProcessorFactory.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteStepProcessorFactory.java b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteStepProcessorFactory.java
index 88de376..27f7f9f 100644
--- a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteStepProcessorFactory.java
+++ b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteStepProcessorFactory.java
@@ -58,13 +58,13 @@ public abstract class UrlRewriteStepProcessorFactory {
 
   private static Map<Class<? extends UrlRewriteStepDescriptor>,Map<String,Class<? extends UrlRewriteStepProcessor>>> loadStepProcessors() {
     Map<Class<? extends UrlRewriteStepDescriptor>,Map<String,Class<? extends UrlRewriteStepProcessor>>> descriptorMap
-        = new HashMap<Class<? extends UrlRewriteStepDescriptor>,Map<String,Class<? extends UrlRewriteStepProcessor>>>();
+        = new HashMap<>();
     ServiceLoader<UrlRewriteStepProcessor> processors = ServiceLoader.load( UrlRewriteStepProcessor.class );
     for( UrlRewriteStepProcessor processor : processors ) {
       Class<? extends UrlRewriteStepDescriptor> descriptorInterface = getDescriptorInterface( processor );
       Map<String,Class<? extends UrlRewriteStepProcessor>> typeMap = descriptorMap.get( descriptorInterface );
       if( typeMap == null ) {
-        typeMap = new HashMap<String,Class<? extends UrlRewriteStepProcessor>>();
+        typeMap = new HashMap<>();
         descriptorMap.put( descriptorInterface, typeMap );
       }
       String processorType = processor.getType();

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/html/HtmlFilterReaderBase.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/html/HtmlFilterReaderBase.java b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/html/HtmlFilterReaderBase.java
index 8866f24..6be7010 100644
--- a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/html/HtmlFilterReaderBase.java
+++ b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/html/HtmlFilterReaderBase.java
@@ -296,7 +296,7 @@ public abstract class HtmlFilterReaderBase extends Reader implements UrlRewriteF
 
     private Map<String,String> getNamespaces() {
       if( namespaces == null ) {
-        namespaces = new HashMap<String,String>();
+        namespaces = new HashMap<>();
         parseNamespaces();
       }
       return namespaces;

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteProcessorTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteProcessorTest.java b/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteProcessorTest.java
index e40a9a9..410f60b 100644
--- a/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteProcessorTest.java
+++ b/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteProcessorTest.java
@@ -400,7 +400,7 @@ public class UrlRewriteProcessorTest {
    * @return a map, with the key-values pairs representing the URL parameters.
    */
   private Map<String, String> mapUrlParameters(String urlParameters) {
-    final Map<String, String> map = new HashMap<String, String>();
+    final Map<String, String> map = new HashMap<>();
     for (String pair : urlParameters.split("&")) {
       String[] kv = pair.split("=");
       map.put(kv[0], kv[1]);

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteServletFilterTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteServletFilterTest.java b/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteServletFilterTest.java
index d435ef7..82824a4 100644
--- a/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteServletFilterTest.java
+++ b/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/api/UrlRewriteServletFilterTest.java
@@ -390,7 +390,7 @@ public class UrlRewriteServletFilterTest {
 
   @Test
   public void testRequestUrlRewriteWithFilterInitParam() throws Exception {
-    Map<String,String> initParams = new HashMap<String,String>();
+    Map<String,String> initParams = new HashMap<>();
     initParams.put( "request.url", "test-rule-2" );
     setUp( initParams );
 
@@ -423,7 +423,7 @@ public class UrlRewriteServletFilterTest {
 
   @Test
   public void testRequestHeaderRewriteWithFilterInitParam() throws Exception {
-    Map<String,String> initParams = new HashMap<String,String>();
+    Map<String,String> initParams = new HashMap<>();
     initParams.put( "request.headers", "test-filter-2" );
     setUp( initParams );
 
@@ -464,7 +464,7 @@ public class UrlRewriteServletFilterTest {
 
   @Test
   public void testRequestJsonBodyRewriteWithFilterInitParam() throws Exception {
-    Map<String,String> initParams = new HashMap<String,String>();
+    Map<String,String> initParams = new HashMap<>();
     //initParams.put( "url, "" );
     initParams.put( "request.body", "test-filter-2" );
     //initParams.put( "response", "" );
@@ -498,7 +498,7 @@ public class UrlRewriteServletFilterTest {
 
   @Test
   public void testRequestXmlBodyRewriteWithFilterInitParam() throws Exception {
-    Map<String,String> initParams = new HashMap<String,String>();
+    Map<String,String> initParams = new HashMap<>();
     initParams.put( "request.body", "test-filter-2" );
     setUp( initParams );
 
@@ -534,7 +534,7 @@ public class UrlRewriteServletFilterTest {
     Enumeration<Appender> realAppenders = NoOpAppender.setUp();
     try {
 
-      Map<String,String> initParams = new HashMap<String,String>();
+      Map<String,String> initParams = new HashMap<>();
       initParams.put( "request.body", "test-filter-3" );
       setUp( initParams );
 
@@ -570,7 +570,7 @@ public class UrlRewriteServletFilterTest {
 
   @Test
   public void testRequestFormBodyRewriteWithFilterInitParam() throws Exception {
-    Map<String,String> initParams = new HashMap<String,String>();
+    Map<String,String> initParams = new HashMap<>();
     initParams.put( "request.body", "test-filter-2" );
     setUp( initParams );
 
@@ -602,7 +602,7 @@ public class UrlRewriteServletFilterTest {
 
   @Test
   public void testResponseHeaderRewriteWithFilterInitParam() throws Exception {
-    Map<String,String> initParams = new HashMap<String,String>();
+    Map<String,String> initParams = new HashMap<>();
     initParams.put( "response.headers", "test-filter-2" );
     setUp( initParams );
 
@@ -644,7 +644,7 @@ public class UrlRewriteServletFilterTest {
 
   @Test
   public void testResponseJsonBodyRewriteWithFilterInitParam() throws Exception {
-    Map<String,String> initParams = new HashMap<String,String>();
+    Map<String,String> initParams = new HashMap<>();
     //initParams.put( "url, "" );
     initParams.put( "response.body", "test-filter-2" );
     //initParams.put( "response", "" );
@@ -677,7 +677,7 @@ public class UrlRewriteServletFilterTest {
 
   @Test
   public void testResponseHtmlBodyRewriteWithFilterInitParam() throws Exception {
-    Map<String,String> initParams = new HashMap<String,String>();
+    Map<String,String> initParams = new HashMap<>();
     //initParams.put( "url, "" );
     initParams.put( "response.body", "test-filter-4" );
     //initParams.put( "response", "" );
@@ -728,7 +728,7 @@ public class UrlRewriteServletFilterTest {
 
   @Test
   public void testResponseXmlBodyRewriteWithFilterInitParam() throws Exception {
-    Map<String,String> initParams = new HashMap<String,String>();
+    Map<String,String> initParams = new HashMap<>();
     initParams.put( "response.body", "test-filter-2" );
     setUp( initParams );
 
@@ -762,7 +762,7 @@ public class UrlRewriteServletFilterTest {
 
   @Test
   public void testResponseHtmlBodyRewriteCSSImport() throws Exception {
-    Map<String,String> initParams = new HashMap<String,String>();
+    Map<String,String> initParams = new HashMap<>();
     //initParams.put( "url, "" );
     initParams.put( "response.body", "test-filter-5" );
     //initParams.put( "response", "" );
@@ -814,7 +814,7 @@ public class UrlRewriteServletFilterTest {
    */
   @Test
   public void testResponseHtmlAttributeEscaping() throws Exception {
-    final Map<String, String> initParams = new HashMap<String, String>();
+    final Map<String, String> initParams = new HashMap<>();
     initParams.put("response.body", "test-filter-4");
     setUp(initParams);
 

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/impl/FrontendFunctionProcessorTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/impl/FrontendFunctionProcessorTest.java b/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/impl/FrontendFunctionProcessorTest.java
index ac8e142..e28f692 100644
--- a/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/impl/FrontendFunctionProcessorTest.java
+++ b/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/impl/FrontendFunctionProcessorTest.java
@@ -172,7 +172,7 @@ public class FrontendFunctionProcessorTest {
 
   @Test
   public void testFrontendFunctionsOnJsonRequestBody() throws Exception {
-    Map<String,String> initParams = new HashMap<String,String>();
+    Map<String,String> initParams = new HashMap<>();
     initParams.put( "response.body", "test-filter" );
     setUp( "test-user", initParams, null );
 
@@ -213,7 +213,7 @@ public class FrontendFunctionProcessorTest {
   public void testFrontendFunctionsWithFrontendUriConfigOnJsonRequestBody() throws Exception {
 
     // This hooks up the filter in rewrite.xml in this class' test resource directory.
-    Map<String,String> initParams = new HashMap<String,String>();
+    Map<String,String> initParams = new HashMap<>();
     initParams.put( "response.body", "test-filter" );
 
     // This simulates having gateway.frontend.uri in gateway-site.xml

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteContextImplTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteContextImplTest.java b/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteContextImplTest.java
index 7267b87..cb9b347 100644
--- a/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteContextImplTest.java
+++ b/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/impl/UrlRewriteContextImplTest.java
@@ -49,7 +49,7 @@ public class UrlRewriteContextImplTest {
 
     EasyMock.replay( environment, resolver );
 
-    Map<String,UrlRewriteFunctionProcessor> functions = new HashMap<String,UrlRewriteFunctionProcessor>();
+    Map<String,UrlRewriteFunctionProcessor> functions = new HashMap<>();
 
     UrlRewriter.Direction direction = UrlRewriter.Direction.OUT;
     Template template = Parser.parseLiteral( "scheme://host:port/dir/file" );

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/impl/html/HtmlFilterReaderBaseTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/impl/html/HtmlFilterReaderBaseTest.java b/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/impl/html/HtmlFilterReaderBaseTest.java
index 55c7ca8..deed693 100644
--- a/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/impl/html/HtmlFilterReaderBaseTest.java
+++ b/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/impl/html/HtmlFilterReaderBaseTest.java
@@ -217,7 +217,7 @@ public class HtmlFilterReaderBaseTest {
 
   @Test
   public void testMappedText() throws IOException, ParserConfigurationException {
-    Map<String,String> map = new HashMap<String,String>();
+    Map<String,String> map = new HashMap<>();
     map.put( "input-text", "output-text" );
     String inputXml = "<root>input-text</root>";
     StringReader inputReader = new StringReader( inputXml );
@@ -229,7 +229,7 @@ public class HtmlFilterReaderBaseTest {
 
   @Test
   public void testMappedAttribute() throws IOException, ParserConfigurationException {
-    Map<String,String> map = new HashMap<String,String>();
+    Map<String,String> map = new HashMap<>();
     map.put( "input-text", "output-text" );
     String inputXml = "<root attribute='input-text'/>";
     StringReader inputReader = new StringReader( inputXml );
@@ -241,7 +241,7 @@ public class HtmlFilterReaderBaseTest {
 
   @Test
   public void testCombined() throws IOException, ParserConfigurationException {
-    Map<String,String> map = new HashMap<String,String>();
+    Map<String,String> map = new HashMap<>();
     map.put( "attr1-input", "attr1-output" );
     map.put( "attr2-input", "attr2-output" );
     map.put( "attr3-input", "attr3-output" );
@@ -309,8 +309,8 @@ public class HtmlFilterReaderBaseTest {
 
   @Test
   public void testMatchedJavaScriptText() throws IOException, ParserConfigurationException {
-    Map<String, Map<String, String>> rules = new HashMap<String, Map<String, String>>();
-    Map<String, String> map = new HashMap<String, String>();
+    Map<String, Map<String, String>> rules = new HashMap<>();
+    Map<String, String> map = new HashMap<>();
     map.put( "(https?://[^/':,]+:[\\d]+)?/cluster/app", "https://knoxhost:8443/cluster/app" );
     rules.put( "test-rule", map );
     String inputXml =
@@ -343,8 +343,8 @@ public class HtmlFilterReaderBaseTest {
 
   @Test
   public void testMRJobHistoryUIJavaScriptText() throws IOException, ParserConfigurationException {
-    Map<String, Map<String, String>> rules = new HashMap<String, Map<String, String>>();
-    Map<String, String> map = new HashMap<String, String>();
+    Map<String, Map<String, String>> rules = new HashMap<>();
+    Map<String, String> map = new HashMap<>();
     map.put( "https?://[^/':,]+:[\\d]+", "https://knoxhost:8443/gateway/nodemanagerui/node?host=knoxhost" );
     rules.put( "test-rule", map );
     String inputXml =

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/impl/javascript/JavaScriptFilterReaderTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/impl/javascript/JavaScriptFilterReaderTest.java b/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/impl/javascript/JavaScriptFilterReaderTest.java
index 88362db..08458a8 100644
--- a/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/impl/javascript/JavaScriptFilterReaderTest.java
+++ b/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/impl/javascript/JavaScriptFilterReaderTest.java
@@ -92,8 +92,8 @@ public class JavaScriptFilterReaderTest {
 
   @Test
   public void testMatchedJsContent() throws IOException {
-    Map<String, Map<String, String>> rules = new HashMap<String, Map<String, String>>();
-    Map<String, String> map = new HashMap<String, String>();
+    Map<String, Map<String, String>> rules = new HashMap<>();
+    Map<String, String> map = new HashMap<>();
     map.put( "(https?://[^/':,]+:[\\d]+)?/cluster/app", "https://knoxhost:8443/cluster/app" );
     map.put( "/webhdfs/v1", "https://knoxhost:8443/webhdfs/v1" );
     rules.put( "test-rule", map );

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/impl/xml/XmlFilterReaderTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/impl/xml/XmlFilterReaderTest.java b/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/impl/xml/XmlFilterReaderTest.java
index 08b4d33..82948a3 100644
--- a/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/impl/xml/XmlFilterReaderTest.java
+++ b/gateway-provider-rewrite/src/test/java/org/apache/hadoop/gateway/filter/rewrite/impl/xml/XmlFilterReaderTest.java
@@ -237,7 +237,7 @@ public class XmlFilterReaderTest {
 
   @Test
   public void testMappedText() throws IOException, ParserConfigurationException, XMLStreamException {
-    Map<String,String> map = new HashMap<String,String>();
+    Map<String,String> map = new HashMap<>();
     map.put( "input-text", "output-text" );
     String inputXml = "<root>input-text</root>";
     StringReader inputReader = new StringReader( inputXml );
@@ -249,7 +249,7 @@ public class XmlFilterReaderTest {
 
   @Test
   public void testMappedAttribute() throws IOException, ParserConfigurationException, XMLStreamException {
-    Map<String,String> map = new HashMap<String,String>();
+    Map<String,String> map = new HashMap<>();
     map.put( "input-text", "output-text" );
     String inputXml = "<root attribute='input-text'/>";
     StringReader inputReader = new StringReader( inputXml );
@@ -261,7 +261,7 @@ public class XmlFilterReaderTest {
 
   @Test
   public void testCombined() throws IOException, ParserConfigurationException, XMLStreamException {
-    Map<String,String> map = new HashMap<String,String>();
+    Map<String,String> map = new HashMap<>();
     map.put( "attr1-input", "attr1-output" );
     map.put( "attr2-input", "attr2-output" );
     map.put( "attr3-input", "attr3-output" );

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-provider-security-jwt/src/main/java/org/apache/hadoop/gateway/provider/federation/jwt/filter/AccessTokenFederationFilter.java
----------------------------------------------------------------------
diff --git a/gateway-provider-security-jwt/src/main/java/org/apache/hadoop/gateway/provider/federation/jwt/filter/AccessTokenFederationFilter.java b/gateway-provider-security-jwt/src/main/java/org/apache/hadoop/gateway/provider/federation/jwt/filter/AccessTokenFederationFilter.java
index ab29a4d..9a78745 100644
--- a/gateway-provider-security-jwt/src/main/java/org/apache/hadoop/gateway/provider/federation/jwt/filter/AccessTokenFederationFilter.java
+++ b/gateway-provider-security-jwt/src/main/java/org/apache/hadoop/gateway/provider/federation/jwt/filter/AccessTokenFederationFilter.java
@@ -145,7 +145,7 @@ public class AccessTokenFederationFilter implements Filter {
     final String principal = token.getPrincipal();
 
     HashSet emptySet = new HashSet();
-    Set<Principal> principals = new HashSet<Principal>();
+    Set<Principal> principals = new HashSet<>();
     Principal p = new PrimaryPrincipal(principal);
     principals.add(p);
     

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-provider-security-jwt/src/main/java/org/apache/hadoop/gateway/provider/federation/jwt/filter/JWTAccessTokenAssertionFilter.java
----------------------------------------------------------------------
diff --git a/gateway-provider-security-jwt/src/main/java/org/apache/hadoop/gateway/provider/federation/jwt/filter/JWTAccessTokenAssertionFilter.java b/gateway-provider-security-jwt/src/main/java/org/apache/hadoop/gateway/provider/federation/jwt/filter/JWTAccessTokenAssertionFilter.java
index b6efb63..f8d9a02 100644
--- a/gateway-provider-security-jwt/src/main/java/org/apache/hadoop/gateway/provider/federation/jwt/filter/JWTAccessTokenAssertionFilter.java
+++ b/gateway-provider-security-jwt/src/main/java/org/apache/hadoop/gateway/provider/federation/jwt/filter/JWTAccessTokenAssertionFilter.java
@@ -112,7 +112,7 @@ public class JWTAccessTokenAssertionFilter extends AbstractIdentityAssertionFilt
       
       String serviceURL = sr.lookupServiceURL(clusterName, serviceName);
       
-      HashMap<String, Object> map = new HashMap<String, Object>();
+      HashMap<String, Object> map = new HashMap<>();
       // TODO: populate map from JWT authorization code
       map.put(ACCESS_TOKEN, accessToken);
       map.put(TOKEN_TYPE, BEARER);

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-provider-security-jwt/src/main/java/org/apache/hadoop/gateway/provider/federation/jwt/filter/JWTAuthCodeAssertionFilter.java
----------------------------------------------------------------------
diff --git a/gateway-provider-security-jwt/src/main/java/org/apache/hadoop/gateway/provider/federation/jwt/filter/JWTAuthCodeAssertionFilter.java b/gateway-provider-security-jwt/src/main/java/org/apache/hadoop/gateway/provider/federation/jwt/filter/JWTAuthCodeAssertionFilter.java
index d15d727..07cdf62 100644
--- a/gateway-provider-security-jwt/src/main/java/org/apache/hadoop/gateway/provider/federation/jwt/filter/JWTAuthCodeAssertionFilter.java
+++ b/gateway-provider-security-jwt/src/main/java/org/apache/hadoop/gateway/provider/federation/jwt/filter/JWTAuthCodeAssertionFilter.java
@@ -73,7 +73,7 @@ public class JWTAuthCodeAssertionFilter extends AbstractIdentityAssertionFilter
           url = sr.lookupServiceURL("token", "TGS");
         }
         
-        HashMap<String, Object> map = new HashMap<String, Object>();
+        HashMap<String, Object> map = new HashMap<>();
         // TODO: populate map from JWT authorization code
         // Coverity CID 1327960
         if( authCode != null ) {

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-provider-security-jwt/src/main/java/org/apache/hadoop/gateway/provider/federation/jwt/filter/JWTFederationFilter.java
----------------------------------------------------------------------
diff --git a/gateway-provider-security-jwt/src/main/java/org/apache/hadoop/gateway/provider/federation/jwt/filter/JWTFederationFilter.java b/gateway-provider-security-jwt/src/main/java/org/apache/hadoop/gateway/provider/federation/jwt/filter/JWTFederationFilter.java
index 9facd30..a627671 100644
--- a/gateway-provider-security-jwt/src/main/java/org/apache/hadoop/gateway/provider/federation/jwt/filter/JWTFederationFilter.java
+++ b/gateway-provider-security-jwt/src/main/java/org/apache/hadoop/gateway/provider/federation/jwt/filter/JWTFederationFilter.java
@@ -181,7 +181,7 @@ public class JWTFederationFilter extends AbstractJWTFilter {
 
     @SuppressWarnings("rawtypes")
     HashSet emptySet = new HashSet();
-    Set<Principal> principals = new HashSet<Principal>();
+    Set<Principal> principals = new HashSet<>();
     Principal p = new PrimaryPrincipal(principal);
     principals.add(p);
     

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-provider-security-jwt/src/main/java/org/apache/hadoop/gateway/provider/federation/jwt/filter/SSOCookieFederationFilter.java
----------------------------------------------------------------------
diff --git a/gateway-provider-security-jwt/src/main/java/org/apache/hadoop/gateway/provider/federation/jwt/filter/SSOCookieFederationFilter.java b/gateway-provider-security-jwt/src/main/java/org/apache/hadoop/gateway/provider/federation/jwt/filter/SSOCookieFederationFilter.java
index 68e8f7b..0984ef3 100644
--- a/gateway-provider-security-jwt/src/main/java/org/apache/hadoop/gateway/provider/federation/jwt/filter/SSOCookieFederationFilter.java
+++ b/gateway-provider-security-jwt/src/main/java/org/apache/hadoop/gateway/provider/federation/jwt/filter/SSOCookieFederationFilter.java
@@ -224,7 +224,7 @@ public class SSOCookieFederationFilter extends AbstractJWTFilter implements Filt
 
     @SuppressWarnings("rawtypes")
     HashSet emptySet = new HashSet();
-    Set<Principal> principals = new HashSet<Principal>();
+    Set<Principal> principals = new HashSet<>();
     Principal p = new PrimaryPrincipal(principal);
     principals.add(p);
     

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-provider-security-shiro/src/main/java/org/apache/hadoop/gateway/filter/ShiroSubjectIdentityAdapter.java
----------------------------------------------------------------------
diff --git a/gateway-provider-security-shiro/src/main/java/org/apache/hadoop/gateway/filter/ShiroSubjectIdentityAdapter.java b/gateway-provider-security-shiro/src/main/java/org/apache/hadoop/gateway/filter/ShiroSubjectIdentityAdapter.java
index 0affb5d..705430c 100644
--- a/gateway-provider-security-shiro/src/main/java/org/apache/hadoop/gateway/filter/ShiroSubjectIdentityAdapter.java
+++ b/gateway-provider-security-shiro/src/main/java/org/apache/hadoop/gateway/filter/ShiroSubjectIdentityAdapter.java
@@ -95,7 +95,7 @@ public class ShiroSubjectIdentityAdapter implements Filter {
       Subject shiroSubject = SecurityUtils.getSubject();
       final String principal = (String) shiroSubject.getPrincipal().toString();
       HashSet emptySet = new HashSet();
-      Set<Principal> principals = new HashSet<Principal>();
+      Set<Principal> principals = new HashSet<>();
       Principal p = new PrimaryPrincipal(principal);
       principals.add(p);
       auditService.getContext().setUsername( principal ); //KM: Audit Fix
@@ -108,11 +108,11 @@ public class ShiroSubjectIdentityAdapter implements Filter {
         userGroups = (Set<String>)SecurityUtils.getSubject().getSession().getAttribute(SUBJECT_USER_GROUPS);
       } else { // KnoxLdapRealm case
         if(  shiroSubject.getPrincipal() instanceof String ) { 
-           userGroups = new HashSet<String>(shiroSubject.getPrincipals().asSet());
+           userGroups = new HashSet<>(shiroSubject.getPrincipals().asSet());
            userGroups.remove(principal);
         } else { // KnoxPamRealm case
-           Set<Principal> shiroPrincipals = new HashSet<Principal>(shiroSubject.getPrincipals().asSet());
-           userGroups = new HashSet<String>(); // Here we are creating a new UserGroup
+           Set<Principal> shiroPrincipals = new HashSet<>(shiroSubject.getPrincipals().asSet());
+           userGroups = new HashSet<>(); // Here we are creating a new UserGroup
                                                // so we don't need to remove a Principal
                                                // In the case of LDAP the userGroup may have already Principal
                                                // added to the list of groups, so it is not needed.

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-provider-security-shiro/src/main/java/org/apache/hadoop/gateway/shirorealm/KnoxLdapRealm.java
----------------------------------------------------------------------
diff --git a/gateway-provider-security-shiro/src/main/java/org/apache/hadoop/gateway/shirorealm/KnoxLdapRealm.java b/gateway-provider-security-shiro/src/main/java/org/apache/hadoop/gateway/shirorealm/KnoxLdapRealm.java
index d57964d..c81125a 100644
--- a/gateway-provider-security-shiro/src/main/java/org/apache/hadoop/gateway/shirorealm/KnoxLdapRealm.java
+++ b/gateway-provider-security-shiro/src/main/java/org/apache/hadoop/gateway/shirorealm/KnoxLdapRealm.java
@@ -515,7 +515,7 @@ public class KnoxLdapRealm extends JndiLdapRealm {
     }
 
     private Map<String, List<String>> parsePermissionByRoleString(String permissionsByRoleStr) {
-      Map<String,List<String>> perms = new HashMap<String, List<String>>();
+      Map<String,List<String>> perms = new HashMap<>();
    
       // split by semicolon ; then by eq = then by  comma ,
       StringTokenizer stSem = new StringTokenizer(permissionsByRoleStr, ";");

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-provider-security-shiro/src/test/java/org/apache/hadoop/gateway/deploy/impl/ShiroDeploymentContributorTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-security-shiro/src/test/java/org/apache/hadoop/gateway/deploy/impl/ShiroDeploymentContributorTest.java b/gateway-provider-security-shiro/src/test/java/org/apache/hadoop/gateway/deploy/impl/ShiroDeploymentContributorTest.java
index bf8263b..63f8e9f 100644
--- a/gateway-provider-security-shiro/src/test/java/org/apache/hadoop/gateway/deploy/impl/ShiroDeploymentContributorTest.java
+++ b/gateway-provider-security-shiro/src/test/java/org/apache/hadoop/gateway/deploy/impl/ShiroDeploymentContributorTest.java
@@ -66,7 +66,7 @@ public class ShiroDeploymentContributorTest {
   public void testDeployment() throws IOException {
     WebArchive webArchive = ShrinkWrap.create( WebArchive.class, "test-archive" );
 
-    Map<String,String> providerParams = new HashMap<String, String>();
+    Map<String,String> providerParams = new HashMap<>();
     Provider provider = new Provider();
     provider.setEnabled( true );
     provider.setName( "shiro" );

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-provider-security-webappsec/src/main/java/org/apache/hadoop/gateway/webappsec/filter/CSRFPreventionFilter.java
----------------------------------------------------------------------
diff --git a/gateway-provider-security-webappsec/src/main/java/org/apache/hadoop/gateway/webappsec/filter/CSRFPreventionFilter.java b/gateway-provider-security-webappsec/src/main/java/org/apache/hadoop/gateway/webappsec/filter/CSRFPreventionFilter.java
index c84a9ce..9b07662 100644
--- a/gateway-provider-security-webappsec/src/main/java/org/apache/hadoop/gateway/webappsec/filter/CSRFPreventionFilter.java
+++ b/gateway-provider-security-webappsec/src/main/java/org/apache/hadoop/gateway/webappsec/filter/CSRFPreventionFilter.java
@@ -48,7 +48,7 @@ public class CSRFPreventionFilter implements Filter {
       mti = customMTI;
     }
     String[] methods = mti.split(",");
-    methodsToIgnore = new HashSet<String>();
+    methodsToIgnore = new HashSet<>();
     for (int i = 0; i < methods.length; i++) {
       methodsToIgnore.add(methods[i]);
     }

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-server/src/main/java/org/apache/hadoop/gateway/GatewayFactory.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/hadoop/gateway/GatewayFactory.java b/gateway-server/src/main/java/org/apache/hadoop/gateway/GatewayFactory.java
index 8e978a2..f813b44 100644
--- a/gateway-server/src/main/java/org/apache/hadoop/gateway/GatewayFactory.java
+++ b/gateway-server/src/main/java/org/apache/hadoop/gateway/GatewayFactory.java
@@ -78,7 +78,7 @@ public class GatewayFactory {
   }
 
   private static Map<String, String> createParams( FilterDescriptor filter ) {
-    Map<String, String> paramMap = new HashMap<String, String>();
+    Map<String, String> paramMap = new HashMap<>();
     ResourceDescriptor resource = filter.up();
     GatewayDescriptor gateway = resource.up();
     for( GatewayParamDescriptor param : gateway.params() ) {

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-server/src/main/java/org/apache/hadoop/gateway/GatewayFilter.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/hadoop/gateway/GatewayFilter.java b/gateway-server/src/main/java/org/apache/hadoop/gateway/GatewayFilter.java
index ba12fd9..c92ebfe 100644
--- a/gateway-server/src/main/java/org/apache/hadoop/gateway/GatewayFilter.java
+++ b/gateway-server/src/main/java/org/apache/hadoop/gateway/GatewayFilter.java
@@ -78,7 +78,7 @@ public class GatewayFilter implements Filter {
   private FilterConfig config;
 
   public GatewayFilter() {
-    holders = new HashSet<Holder>();
+    holders = new HashSet<>();
     chains = new Matcher<Chain>();
   }
 

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-server/src/main/java/org/apache/hadoop/gateway/GatewayServer.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/hadoop/gateway/GatewayServer.java b/gateway-server/src/main/java/org/apache/hadoop/gateway/GatewayServer.java
index 2c4c034..d6aa43d 100644
--- a/gateway-server/src/main/java/org/apache/hadoop/gateway/GatewayServer.java
+++ b/gateway-server/src/main/java/org/apache/hadoop/gateway/GatewayServer.java
@@ -141,7 +141,7 @@ public class GatewayServer {
         if (config.isHadoopKerberosSecured()) {
           configureKerberosSecurity( config );
         }
-        Map<String,String> options = new HashMap<String,String>();
+        Map<String,String> options = new HashMap<>();
         options.put(GatewayCommandLine.PERSIST_LONG, Boolean.toString(cmd.hasOption(GatewayCommandLine.PERSIST_LONG)));
         services.init(config, options);
         if (!cmd.hasOption(GatewayCommandLine.NOSTART_LONG)) {

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-server/src/main/java/org/apache/hadoop/gateway/deploy/DeploymentContextImpl.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/hadoop/gateway/deploy/DeploymentContextImpl.java b/gateway-server/src/main/java/org/apache/hadoop/gateway/deploy/DeploymentContextImpl.java
index 918cdbb..39a2a1b 100644
--- a/gateway-server/src/main/java/org/apache/hadoop/gateway/deploy/DeploymentContextImpl.java
+++ b/gateway-server/src/main/java/org/apache/hadoop/gateway/deploy/DeploymentContextImpl.java
@@ -54,7 +54,7 @@ public class DeploymentContextImpl implements DeploymentContext {
     this.webArchive = webArchive;
     this.webAppDescriptor = webAppDescriptor;
     this.providers = providers;
-    this.descriptors = new HashMap<String,Object>();
+    this.descriptors = new HashMap<>();
   }
 
 //  @Override

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-server/src/main/java/org/apache/hadoop/gateway/deploy/DeploymentFactory.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/hadoop/gateway/deploy/DeploymentFactory.java b/gateway-server/src/main/java/org/apache/hadoop/gateway/deploy/DeploymentFactory.java
index 32628d8..5c9922c 100644
--- a/gateway-server/src/main/java/org/apache/hadoop/gateway/deploy/DeploymentFactory.java
+++ b/gateway-server/src/main/java/org/apache/hadoop/gateway/deploy/DeploymentFactory.java
@@ -202,7 +202,7 @@ public abstract class DeploymentFactory {
     StringWriter writer = new StringWriter();
     String xml;
     try {
-      Map<String,Object> properties = new HashMap<String,Object>(2);
+      Map<String,Object> properties = new HashMap<>(2);
       properties.put( "eclipselink-oxm-xml", "org/apache/hadoop/gateway/topology/topology_binding-xml.xml" );
       properties.put( "eclipselink.media-type", "application/xml" );
       JAXBContext jaxbContext = JAXBContext.newInstance( Topology.class.getPackage().getName(), Topology.class.getClassLoader() , properties );
@@ -293,7 +293,7 @@ public abstract class DeploymentFactory {
   // For each that we find add it to the list of service roles included in the topology.
   private static Map<String,List<ServiceDeploymentContributor>> selectContextServices( Topology topology ) {
     Map<String,List<ServiceDeploymentContributor>> defaults
-        = new HashMap<String,List<ServiceDeploymentContributor>>();
+        = new HashMap<>();
     for( Service service : topology.getServices() ) {
       String role = service.getRole();
       ServiceDeploymentContributor contributor = getServiceContributor( role, service.getName(), service.getVersion() );
@@ -679,7 +679,7 @@ public abstract class DeploymentFactory {
   }
 
   private static void loadServiceContributors() {
-    SERVICE_CONTRIBUTOR_MAP = new HashMap<String, Map<String, Map<Version, ServiceDeploymentContributor>>>();
+    SERVICE_CONTRIBUTOR_MAP = new HashMap<>();
     ServiceLoader<ServiceDeploymentContributor> loader = ServiceLoader.load( ServiceDeploymentContributor.class );
     Iterator<ServiceDeploymentContributor> contributors = loader.iterator();
     addServiceDeploymentContributors(contributors);
@@ -702,12 +702,12 @@ public abstract class DeploymentFactory {
         }
         Map<String,Map<Version, ServiceDeploymentContributor>> nameMap = SERVICE_CONTRIBUTOR_MAP.get( contributor.getRole() );
         if( nameMap == null ) {
-          nameMap = new HashMap<String,Map<Version, ServiceDeploymentContributor>>();
+          nameMap = new HashMap<>();
           SERVICE_CONTRIBUTOR_MAP.put( contributor.getRole(), nameMap );
         }
         Map<Version, ServiceDeploymentContributor> versionMap = nameMap.get(contributor.getName());
         if (versionMap == null) {
-          versionMap = new TreeMap<Version, ServiceDeploymentContributor>();
+          versionMap = new TreeMap<>();
           nameMap.put(contributor.getName(), versionMap);
         }
         versionMap.put( contributor.getVersion(), contributor );
@@ -715,9 +715,9 @@ public abstract class DeploymentFactory {
    }
 
    private static void loadProviderContributors() {
-    Set<ProviderDeploymentContributor> set = new HashSet<ProviderDeploymentContributor>();
+    Set<ProviderDeploymentContributor> set = new HashSet<>();
     Map<String,Map<String,ProviderDeploymentContributor>> roleMap
-        = new HashMap<String,Map<String,ProviderDeploymentContributor>>();
+        = new HashMap<>();
 
     ServiceLoader<ProviderDeploymentContributor> loader = ServiceLoader.load( ProviderDeploymentContributor.class );
     Iterator<ProviderDeploymentContributor> contributors = loader.iterator();
@@ -734,7 +734,7 @@ public abstract class DeploymentFactory {
       set.add( contributor );
       Map nameMap = roleMap.get( contributor.getRole() );
       if( nameMap == null ) {
-        nameMap = new HashMap<String,ProviderDeploymentContributor>();
+        nameMap = new HashMap<>();
         roleMap.put( contributor.getRole(), nameMap );
       }
       nameMap.put( contributor.getName(), contributor );

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-server/src/main/java/org/apache/hadoop/gateway/deploy/impl/ApplicationDeploymentContributor.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/hadoop/gateway/deploy/impl/ApplicationDeploymentContributor.java b/gateway-server/src/main/java/org/apache/hadoop/gateway/deploy/impl/ApplicationDeploymentContributor.java
index bd15314..4686c22 100644
--- a/gateway-server/src/main/java/org/apache/hadoop/gateway/deploy/impl/ApplicationDeploymentContributor.java
+++ b/gateway-server/src/main/java/org/apache/hadoop/gateway/deploy/impl/ApplicationDeploymentContributor.java
@@ -148,7 +148,7 @@ public class ApplicationDeploymentContributor extends ServiceDeploymentContribut
   }
 
   private void contributeResources(DeploymentContext context, Service service) {
-    Map<String, String> filterParams = new HashMap<String, String>();
+    Map<String, String> filterParams = new HashMap<>();
     List<Route> bindings = serviceDefinition.getRoutes();
     for ( Route binding : bindings ) {
       List<Rewrite> filters = binding.getRewrites();

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-server/src/main/java/org/apache/hadoop/gateway/deploy/impl/ServiceDefinitionDeploymentContributor.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/hadoop/gateway/deploy/impl/ServiceDefinitionDeploymentContributor.java b/gateway-server/src/main/java/org/apache/hadoop/gateway/deploy/impl/ServiceDefinitionDeploymentContributor.java
index 439df3c..7b23715 100644
--- a/gateway-server/src/main/java/org/apache/hadoop/gateway/deploy/impl/ServiceDefinitionDeploymentContributor.java
+++ b/gateway-server/src/main/java/org/apache/hadoop/gateway/deploy/impl/ServiceDefinitionDeploymentContributor.java
@@ -100,7 +100,7 @@ public class ServiceDefinitionDeploymentContributor extends ServiceDeploymentCon
   }
 
   private void contributeResources(DeploymentContext context, Service service) {
-    Map<String, String> filterParams = new HashMap<String, String>();
+    Map<String, String> filterParams = new HashMap<>();
     List<Route> bindings = serviceDefinition.getRoutes();
     for ( Route binding : bindings ) {
       List<Rewrite> filters = binding.getRewrites();

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-server/src/main/java/org/apache/hadoop/gateway/services/CLIGatewayServices.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/hadoop/gateway/services/CLIGatewayServices.java b/gateway-server/src/main/java/org/apache/hadoop/gateway/services/CLIGatewayServices.java
index 6fc10a2..114aa83 100644
--- a/gateway-server/src/main/java/org/apache/hadoop/gateway/services/CLIGatewayServices.java
+++ b/gateway-server/src/main/java/org/apache/hadoop/gateway/services/CLIGatewayServices.java
@@ -39,7 +39,7 @@ public class CLIGatewayServices implements GatewayServices {
 
   private static GatewayMessages log = MessagesFactory.get( GatewayMessages.class );
 
-  private Map<String,Service> services = new HashMap<String, Service>();
+  private Map<String,Service> services = new HashMap<>();
   private CLIMasterService ms = null;
   private DefaultKeystoreService ks = null;
 

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-server/src/main/java/org/apache/hadoop/gateway/services/DefaultGatewayServices.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/hadoop/gateway/services/DefaultGatewayServices.java b/gateway-server/src/main/java/org/apache/hadoop/gateway/services/DefaultGatewayServices.java
index 2cf043e..e0c843a 100644
--- a/gateway-server/src/main/java/org/apache/hadoop/gateway/services/DefaultGatewayServices.java
+++ b/gateway-server/src/main/java/org/apache/hadoop/gateway/services/DefaultGatewayServices.java
@@ -47,7 +47,7 @@ public class DefaultGatewayServices implements GatewayServices {
 
   private static GatewayMessages log = MessagesFactory.get( GatewayMessages.class );
 
-  private Map<String,Service> services = new HashMap<String, Service>();
+  private Map<String,Service> services = new HashMap<>();
   private DefaultMasterService ms = null;
   private DefaultKeystoreService ks = null;
 

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-server/src/main/java/org/apache/hadoop/gateway/services/registry/impl/DefaultServiceRegistryService.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/hadoop/gateway/services/registry/impl/DefaultServiceRegistryService.java b/gateway-server/src/main/java/org/apache/hadoop/gateway/services/registry/impl/DefaultServiceRegistryService.java
index b446b3a..c590f0d 100644
--- a/gateway-server/src/main/java/org/apache/hadoop/gateway/services/registry/impl/DefaultServiceRegistryService.java
+++ b/gateway-server/src/main/java/org/apache/hadoop/gateway/services/registry/impl/DefaultServiceRegistryService.java
@@ -96,7 +96,7 @@ public class DefaultServiceRegistryService implements ServiceRegistry, Service {
       HashMap<String,RegEntry> clusterServices = registry.get(clusterName);
       if (clusterServices == null) {
         synchronized(this) {
-          clusterServices = new HashMap<String,RegEntry>();
+          clusterServices = new HashMap<>();
           registry.put(clusterName, clusterServices);
         }
       }

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-server/src/main/java/org/apache/hadoop/gateway/services/security/impl/DefaultCryptoService.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/hadoop/gateway/services/security/impl/DefaultCryptoService.java b/gateway-server/src/main/java/org/apache/hadoop/gateway/services/security/impl/DefaultCryptoService.java
index 0700417..b8348dc 100644
--- a/gateway-server/src/main/java/org/apache/hadoop/gateway/services/security/impl/DefaultCryptoService.java
+++ b/gateway-server/src/main/java/org/apache/hadoop/gateway/services/security/impl/DefaultCryptoService.java
@@ -43,7 +43,7 @@ public class DefaultCryptoService implements CryptoService {
 
   private AliasService as = null;
   private KeystoreService ks = null;
-  private HashMap<String,AESEncryptor> encryptorCache = new HashMap<String,AESEncryptor>();
+  private HashMap<String,AESEncryptor> encryptorCache = new HashMap<>();
 
   public void setKeystoreService(KeystoreService ks) {
     this.ks = ks;

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-server/src/main/java/org/apache/hadoop/gateway/services/topology/impl/DefaultTopologyService.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/hadoop/gateway/services/topology/impl/DefaultTopologyService.java b/gateway-server/src/main/java/org/apache/hadoop/gateway/services/topology/impl/DefaultTopologyService.java
index eec26ce..3321f3d 100644
--- a/gateway-server/src/main/java/org/apache/hadoop/gateway/services/topology/impl/DefaultTopologyService.java
+++ b/gateway-server/src/main/java/org/apache/hadoop/gateway/services/topology/impl/DefaultTopologyService.java
@@ -217,8 +217,8 @@ public class DefaultTopologyService
     observer.addListener(this);
     monitor.addObserver(observer);
 
-    this.listeners = new HashSet<TopologyListener>();
-    this.topologies = new HashMap<File, Topology>(); //loadTopologies( this.directory );
+    this.listeners = new HashSet<>();
+    this.topologies = new HashMap<>(); //loadTopologies( this.directory );
   }
 
   private void initListener(File directory) throws IOException, SAXException {
@@ -228,7 +228,7 @@ public class DefaultTopologyService
   }
 
   private Map<File, Topology> loadTopologies(File directory) {
-    Map<File, Topology> map = new HashMap<File, Topology>();
+    Map<File, Topology> map = new HashMap<>();
     if (directory.isDirectory() && directory.canRead()) {
       for (File file : directory.listFiles(this)) {
         try {
@@ -269,7 +269,7 @@ public class DefaultTopologyService
       String pkgName = topologyPkg.getName();
       String bindingFile = pkgName.replace(".", "/") + "/topology_binding-xml.xml";
 
-      Map<String, Object> properties = new HashMap<String, Object>(1);
+      Map<String, Object> properties = new HashMap<>(1);
       properties.put(JAXBContextProperties.OXM_METADATA_SOURCE, bindingFile);
       JAXBContext jc = JAXBContext.newInstance(pkgName, Topology.class.getClassLoader(), properties);
       Marshaller mr = jc.createMarshaller();

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-server/src/main/java/org/apache/hadoop/gateway/trace/TraceUtil.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/hadoop/gateway/trace/TraceUtil.java b/gateway-server/src/main/java/org/apache/hadoop/gateway/trace/TraceUtil.java
index 1379406..d313f92 100644
--- a/gateway-server/src/main/java/org/apache/hadoop/gateway/trace/TraceUtil.java
+++ b/gateway-server/src/main/java/org/apache/hadoop/gateway/trace/TraceUtil.java
@@ -49,7 +49,7 @@ public class TraceUtil {
   }
 
   static final Set<Integer> parseIntegerSet( String str ) {
-    Set<Integer> set = new HashSet<Integer>();
+    Set<Integer> set = new HashSet<>();
     if( str != null && !str.trim().isEmpty() ) {
       StringTokenizer parser = new StringTokenizer( str.trim(), ",", false );
       while( parser.hasMoreTokens() ) {

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-server/src/main/java/org/apache/hadoop/gateway/util/KnoxCLI.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/hadoop/gateway/util/KnoxCLI.java b/gateway-server/src/main/java/org/apache/hadoop/gateway/util/KnoxCLI.java
index 30356ec..046b7ac 100644
--- a/gateway-server/src/main/java/org/apache/hadoop/gateway/util/KnoxCLI.java
+++ b/gateway-server/src/main/java/org/apache/hadoop/gateway/util/KnoxCLI.java
@@ -164,7 +164,7 @@ public class KnoxCLI extends Configured implements Tool {
 
   private void initializeServices(boolean persisting) throws ServiceLifecycleException {
     GatewayConfig config = getGatewayConfig();
-    Map<String,String> options = new HashMap<String,String>();
+    Map<String,String> options = new HashMap<>();
     options.put(GatewayCommandLine.PERSIST_LONG, Boolean.toString(persisting));
     if (master != null) {
       options.put("master", master);

http://git-wip-us.apache.org/repos/asf/knox/blob/55150564/gateway-server/src/main/java/org/apache/hadoop/gateway/util/ServiceDefinitionsLoader.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/hadoop/gateway/util/ServiceDefinitionsLoader.java b/gateway-server/src/main/java/org/apache/hadoop/gateway/util/ServiceDefinitionsLoader.java
index 4ed148d..5892218 100644
--- a/gateway-server/src/main/java/org/apache/hadoop/gateway/util/ServiceDefinitionsLoader.java
+++ b/gateway-server/src/main/java/org/apache/hadoop/gateway/util/ServiceDefinitionsLoader.java
@@ -50,7 +50,7 @@ public class ServiceDefinitionsLoader {
   private static final String REWRITE_FILE = "rewrite.xml";
 
   public static Set<ServiceDeploymentContributor> loadServiceDefinitions(File servicesDir) {
-    Set<ServiceDeploymentContributor> contributors = new HashSet<ServiceDeploymentContributor>();
+    Set<ServiceDeploymentContributor> contributors = new HashSet<>();
     if ( servicesDir.exists() && servicesDir.isDirectory() ) {
       try {
         JAXBContext context = JAXBContext.newInstance(ServiceDefinition.class);
@@ -108,7 +108,7 @@ public class ServiceDefinitionsLoader {
         }
       }, TrueFileFilter.INSTANCE);
     } else {
-      files = new HashSet<File>();
+      files = new HashSet<>();
     }
 
     return files;


Mime
View raw message