knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lmc...@apache.org
Subject knox git commit: KNOX-816 - Make private inner classes static (Colm O hEigeartaigh via lmccay)
Date Thu, 27 Apr 2017 20:16:23 GMT
Repository: knox
Updated Branches:
  refs/heads/master 5cb614de4 -> 5dac768d2


KNOX-816 - Make private inner classes static (Colm O hEigeartaigh via lmccay)

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

Branch: refs/heads/master
Commit: 5dac768d2ed2ad051724b998db5a7a1f39a599b0
Parents: 5cb614d
Author: Larry McCay <lmccay@hortonworks.com>
Authored: Thu Apr 27 16:16:16 2017 -0400
Committer: Larry McCay <lmccay@hortonworks.com>
Committed: Thu Apr 27 16:16:16 2017 -0400

----------------------------------------------------------------------
 ...entityAsserterHttpServletRequestWrapper.java |  2 +-
 .../rewrite/impl/FrontendFunctionProcessor.java |  4 +--
 .../impl/xml/XmlRewriteRulesDigester.java       | 30 ++++++++++----------
 .../gateway/filter/ResponseCookieFilter.java    |  2 +-
 .../filter/ShiroSubjectIdentityAdapter.java     |  2 +-
 .../apache/hadoop/gateway/GatewayServer.java    |  2 +-
 .../apache/hadoop/gateway/GatewayServlet.java   |  2 +-
 .../xml/XmlGatewayDescriptorRules.java          |  2 +-
 .../service/admin/TopologiesResource.java       |  2 +-
 .../dispatch/DefaultHttpClientFactory.java      |  6 ++--
 .../gateway/util/urltemplate/Rewriter.java      |  2 +-
 11 files changed, 28 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/5dac768d/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 68f57f4..3e4beb4 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
@@ -252,7 +252,7 @@ private static SpiGatewayMessages log = MessagesFactory.get( SpiGatewayMessages.
     return sb.toString();
   }
 
-  private class ServletInputStreamWrapper extends SynchronousServletInputStreamAdapter {
+  private static class ServletInputStreamWrapper extends SynchronousServletInputStreamAdapter
{
 
     private InputStream stream;
 

http://git-wip-us.apache.org/repos/asf/knox/blob/5dac768d/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 3ecb097..2b66b6c 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
@@ -92,7 +92,7 @@ public class FrontendFunctionProcessor implements UrlRewriteFunctionProcessor<Fr
     return results;
   }
 
-  private class ParamResolver implements UrlRewriteResolver {
+  private static class ParamResolver implements UrlRewriteResolver {
 
     private String paramName;
 
@@ -107,7 +107,7 @@ public class FrontendFunctionProcessor implements UrlRewriteFunctionProcessor<Fr
 
   }
 
-  private class FixedResolver implements UrlRewriteResolver {
+  private static class FixedResolver implements UrlRewriteResolver {
 
     private List<String> fixedValues;
 

http://git-wip-us.apache.org/repos/asf/knox/blob/5dac768d/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/xml/XmlRewriteRulesDigester.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/xml/XmlRewriteRulesDigester.java
b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/xml/XmlRewriteRulesDigester.java
index d4aa7ea..640d731 100644
--- a/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/xml/XmlRewriteRulesDigester.java
+++ b/gateway-provider-rewrite/src/main/java/org/apache/hadoop/gateway/filter/rewrite/impl/xml/XmlRewriteRulesDigester.java
@@ -83,14 +83,14 @@ public class XmlRewriteRulesDigester extends AbstractRulesModule implements
XmlR
 //    forPattern( "*/" + ACTION ).addRule( new SetPropertiesRule() );
   }
 
-  private class RulesFactory extends FactoryRule {
+  private static class RulesFactory extends FactoryRule {
     @Override
     public Object create( String namespace, String name, Attributes attributes ) {
       return UrlRewriteRulesDescriptorFactory.create();
     }
   }
 
-  private class RuleFactory extends Rule {
+  private static class RuleFactory extends Rule {
     @Override
     public void begin( String namespace, String name, Attributes attributes ) throws Exception
{
       Digester digester = getDigester();
@@ -108,7 +108,7 @@ public class XmlRewriteRulesDigester extends AbstractRulesModule implements
XmlR
     }
   }
 
-  private class StepFactory extends FactoryRule {
+  private static class StepFactory extends FactoryRule {
     @Override
     public Object create( String namespace, String name, Attributes attributes ) {
       UrlRewriteFlowDescriptor flow = getDigester().peek();
@@ -116,7 +116,7 @@ public class XmlRewriteRulesDigester extends AbstractRulesModule implements
XmlR
     }
   }
 
-  private class FunctionFactory extends FactoryRule {
+  private static class FunctionFactory extends FactoryRule {
     @Override
     public Object create( String namespace, String name, Attributes attributes ) {
       UrlRewriteRulesDescriptor rules = getDigester().peek();
@@ -124,7 +124,7 @@ public class XmlRewriteRulesDigester extends AbstractRulesModule implements
XmlR
     }
   }
 
-  private class FilterFactory extends FactoryRule {
+  private static class FilterFactory extends FactoryRule {
     @Override
     public Object create( String namespace, String name, Attributes attributes ) {
       UrlRewriteRulesDescriptor parent = getDigester().peek();
@@ -132,7 +132,7 @@ public class XmlRewriteRulesDigester extends AbstractRulesModule implements
XmlR
     }
   }
 
-  private class FilterContentFactory extends FactoryRule {
+  private static class FilterContentFactory extends FactoryRule {
     @Override
     public Object create( String namespace, String name, Attributes attributes ) {
       UrlRewriteFilterDescriptor parent = getDigester().peek();
@@ -144,7 +144,7 @@ public class XmlRewriteRulesDigester extends AbstractRulesModule implements
XmlR
     }
   }
 
-  private class FilterApplyFactory extends FactoryRule {
+  private static class FilterApplyFactory extends FactoryRule {
     @Override
     public Object create( String namespace, String name, Attributes attributes ) {
       UrlRewriteFilterGroupDescriptor parent = getDigester().peek();
@@ -155,7 +155,7 @@ public class XmlRewriteRulesDigester extends AbstractRulesModule implements
XmlR
     }
   }
 
-  private class FilterScopeFactory extends FactoryRule {
+  private static class FilterScopeFactory extends FactoryRule {
     @Override
     public Object create( String namespace, String name, Attributes attributes ) {
       UrlRewriteFilterGroupDescriptor parent = getDigester().peek();
@@ -166,7 +166,7 @@ public class XmlRewriteRulesDigester extends AbstractRulesModule implements
XmlR
     }
   }
 
-  private class FilterBufferFactory extends FactoryRule {
+  private static class FilterBufferFactory extends FactoryRule {
     @Override
     public Object create( String namespace, String name, Attributes attributes ) {
       UrlRewriteFilterGroupDescriptor parent = getDigester().peek();
@@ -177,7 +177,7 @@ public class XmlRewriteRulesDigester extends AbstractRulesModule implements
XmlR
     }
   }
 
-  private class FilterDetectFactory extends FactoryRule {
+  private static class FilterDetectFactory extends FactoryRule {
     @Override
     public Object create( String namespace, String name, Attributes attributes ) {
       UrlRewriteFilterGroupDescriptor parent = getDigester().peek();
@@ -188,7 +188,7 @@ public class XmlRewriteRulesDigester extends AbstractRulesModule implements
XmlR
     }
   }
 
-//  private class MatchFactory extends FactoryRule {
+//  private static class MatchFactory extends FactoryRule {
 //    @Override
 //    public Object create( String namespace, String name, Attributes attributes ) {
 //      UrlRewriteRuleDescriptor rule = getDigester().peek();
@@ -196,7 +196,7 @@ public class XmlRewriteRulesDigester extends AbstractRulesModule implements
XmlR
 //    }
 //  }
 //
-//  private class CheckFactory extends FactoryRule {
+//  private static class CheckFactory extends FactoryRule {
 //    @Override
 //    public Object create( String namespace, String name, Attributes attributes ) {
 //      UrlRewriteRuleDescriptor rule = getDigester().peek();
@@ -204,7 +204,7 @@ public class XmlRewriteRulesDigester extends AbstractRulesModule implements
XmlR
 //    }
 //  }
 //
-//  private class ActionFactory extends FactoryRule {
+//  private static class ActionFactory extends FactoryRule {
 //    @Override
 //    public Object create( String namespace, String name, Attributes attributes ) {
 //      UrlRewriteRuleDescriptor rule = getDigester().peek();
@@ -212,7 +212,7 @@ public class XmlRewriteRulesDigester extends AbstractRulesModule implements
XmlR
 //    }
 //  }
 //
-//  private class ControlFactory extends FactoryRule {
+//  private static class ControlFactory extends FactoryRule {
 //    @Override
 //    public Object create( String namespace, String name, Attributes attributes ) {
 //      UrlRewriteRuleDescriptor rule = getDigester().peek();
@@ -220,7 +220,7 @@ public class XmlRewriteRulesDigester extends AbstractRulesModule implements
XmlR
 //    }
 //  }
 
-  private abstract class FactoryRule extends Rule {
+  private static abstract class FactoryRule extends Rule {
 
     protected abstract Object create( String namespace, String name, Attributes attributes
);
 

http://git-wip-us.apache.org/repos/asf/knox/blob/5dac768d/gateway-provider-security-shiro/src/main/java/org/apache/hadoop/gateway/filter/ResponseCookieFilter.java
----------------------------------------------------------------------
diff --git a/gateway-provider-security-shiro/src/main/java/org/apache/hadoop/gateway/filter/ResponseCookieFilter.java
b/gateway-provider-security-shiro/src/main/java/org/apache/hadoop/gateway/filter/ResponseCookieFilter.java
index 28af445..29d30c0 100644
--- a/gateway-provider-security-shiro/src/main/java/org/apache/hadoop/gateway/filter/ResponseCookieFilter.java
+++ b/gateway-provider-security-shiro/src/main/java/org/apache/hadoop/gateway/filter/ResponseCookieFilter.java
@@ -51,7 +51,7 @@ public class ResponseCookieFilter extends AbstractGatewayFilter {
   }
 
   // inner class wraps response to prevent adding of not allowed headers
-  private class ResponseWrapper extends HttpServletResponseWrapper {
+  private static class ResponseWrapper extends HttpServletResponseWrapper {
     public ResponseWrapper( HttpServletResponse response ) {
       super( response );
     }

http://git-wip-us.apache.org/repos/asf/knox/blob/5dac768d/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 2477589..0affb5d 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
@@ -72,7 +72,7 @@ public class ShiroSubjectIdentityAdapter implements Filter {
     SecurityUtils.getSubject().execute(callableChain);
   }
   
-  private class CallableChain implements Callable<Void> {
+  private static class CallableChain implements Callable<Void> {
     private FilterChain chain = null;
     ServletRequest request = null;
     ServletResponse response = null;

http://git-wip-us.apache.org/repos/asf/knox/blob/5dac768d/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 69d7c4b..2c4c034 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
@@ -752,7 +752,7 @@ public class GatewayServer {
     socket.close();
   }
 
-  private class RegexFilenameFilter implements FilenameFilter {
+  private static class RegexFilenameFilter implements FilenameFilter {
 
     Pattern pattern;
 

http://git-wip-us.apache.org/repos/asf/knox/blob/5dac768d/gateway-server/src/main/java/org/apache/hadoop/gateway/GatewayServlet.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/hadoop/gateway/GatewayServlet.java b/gateway-server/src/main/java/org/apache/hadoop/gateway/GatewayServlet.java
index d3339ab..79cab09 100644
--- a/gateway-server/src/main/java/org/apache/hadoop/gateway/GatewayServlet.java
+++ b/gateway-server/src/main/java/org/apache/hadoop/gateway/GatewayServlet.java
@@ -266,7 +266,7 @@ public class GatewayServlet implements Servlet, Filter {
     return filter;
   }
 
-  private class FilterConfigAdapter implements FilterConfig {
+  private static class FilterConfigAdapter implements FilterConfig {
 
     private ServletConfig config;
 

http://git-wip-us.apache.org/repos/asf/knox/blob/5dac768d/gateway-server/src/main/java/org/apache/hadoop/gateway/descriptor/xml/XmlGatewayDescriptorRules.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/hadoop/gateway/descriptor/xml/XmlGatewayDescriptorRules.java
b/gateway-server/src/main/java/org/apache/hadoop/gateway/descriptor/xml/XmlGatewayDescriptorRules.java
index 72d3119..24c7578 100644
--- a/gateway-server/src/main/java/org/apache/hadoop/gateway/descriptor/xml/XmlGatewayDescriptorRules.java
+++ b/gateway-server/src/main/java/org/apache/hadoop/gateway/descriptor/xml/XmlGatewayDescriptorRules.java
@@ -44,7 +44,7 @@ public class XmlGatewayDescriptorRules extends AbstractRulesModule implements
Xm
     forPattern( GATEWAY + "/" + RESOURCE + "/" + FILTER + "/" + FILTER_PARAM + "/" + FILTER_PARAM_VALUE
).callMethod( "value" ).usingElementBodyAsArgument();
   }
 
-  private class AddNextRule extends Rule {
+  private static class AddNextRule extends Rule {
 
     private String method;
 

http://git-wip-us.apache.org/repos/asf/knox/blob/5dac768d/gateway-service-admin/src/main/java/org/apache/hadoop/gateway/service/admin/TopologiesResource.java
----------------------------------------------------------------------
diff --git a/gateway-service-admin/src/main/java/org/apache/hadoop/gateway/service/admin/TopologiesResource.java
b/gateway-service-admin/src/main/java/org/apache/hadoop/gateway/service/admin/TopologiesResource.java
index f3ce0f3..22d976c 100644
--- a/gateway-service-admin/src/main/java/org/apache/hadoop/gateway/service/admin/TopologiesResource.java
+++ b/gateway-service-admin/src/main/java/org/apache/hadoop/gateway/service/admin/TopologiesResource.java
@@ -144,7 +144,7 @@ public class TopologiesResource {
   }
 
 
-  private class TopologyComparator implements Comparator<SimpleTopology> {
+  private static class TopologyComparator implements Comparator<SimpleTopology> {
     @Override
     public int compare(SimpleTopology t1, SimpleTopology t2) {
       return t1.getName().compareTo(t2.getName());

http://git-wip-us.apache.org/repos/asf/knox/blob/5dac768d/gateway-spi/src/main/java/org/apache/hadoop/gateway/dispatch/DefaultHttpClientFactory.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/hadoop/gateway/dispatch/DefaultHttpClientFactory.java
b/gateway-spi/src/main/java/org/apache/hadoop/gateway/dispatch/DefaultHttpClientFactory.java
index 83cf7c0..3c11468 100644
--- a/gateway-spi/src/main/java/org/apache/hadoop/gateway/dispatch/DefaultHttpClientFactory.java
+++ b/gateway-spi/src/main/java/org/apache/hadoop/gateway/dispatch/DefaultHttpClientFactory.java
@@ -112,7 +112,7 @@ public class DefaultHttpClientFactory implements HttpClientFactory {
     return builder.build();
   }
 
-  private class NoCookieStore implements CookieStore {
+  private static class NoCookieStore implements CookieStore {
     @Override
     public void addCookie(Cookie cookie) {
       //no op
@@ -134,7 +134,7 @@ public class DefaultHttpClientFactory implements HttpClientFactory {
     }
   }
 
-  private class NeverRedirectStrategy implements RedirectStrategy {
+  private static class NeverRedirectStrategy implements RedirectStrategy {
     @Override
     public boolean isRedirected( HttpRequest request, HttpResponse response, HttpContext
context )
         throws ProtocolException {
@@ -148,7 +148,7 @@ public class DefaultHttpClientFactory implements HttpClientFactory {
     }
   }
 
-  private class NeverRetryHandler implements HttpRequestRetryHandler {
+  private static class NeverRetryHandler implements HttpRequestRetryHandler {
     @Override
     public boolean retryRequest( IOException exception, int executionCount, HttpContext context
) {
       return false;

http://git-wip-us.apache.org/repos/asf/knox/blob/5dac768d/gateway-util-urltemplate/src/main/java/org/apache/hadoop/gateway/util/urltemplate/Rewriter.java
----------------------------------------------------------------------
diff --git a/gateway-util-urltemplate/src/main/java/org/apache/hadoop/gateway/util/urltemplate/Rewriter.java
b/gateway-util-urltemplate/src/main/java/org/apache/hadoop/gateway/util/urltemplate/Rewriter.java
index bb140fe..34fcee9 100644
--- a/gateway-util-urltemplate/src/main/java/org/apache/hadoop/gateway/util/urltemplate/Rewriter.java
+++ b/gateway-util-urltemplate/src/main/java/org/apache/hadoop/gateway/util/urltemplate/Rewriter.java
@@ -69,7 +69,7 @@ public class Rewriter {
     return outputUri;
   }
 
-  private class RewriteParams implements Params {
+  private static class RewriteParams implements Params {
     private Params params;
     private Resolver[] resolvers;
 


Mime
View raw message