knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kris...@apache.org
Subject knox git commit: KNOX-1685 - MockServlet - avoid mutable instance variables
Date Tue, 18 Dec 2018 17:09:28 GMT
Repository: knox
Updated Branches:
  refs/heads/master dc90162c3 -> c659fdb70


KNOX-1685 - MockServlet - avoid mutable instance variables

Signed-off-by: Kevin Risden <krisden@apache.org>


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

Branch: refs/heads/master
Commit: c659fdb70d8927c613964dcef6a9e5765dd0b126
Parents: dc90162
Author: Kevin Risden <krisden@apache.org>
Authored: Tue Dec 18 11:44:15 2018 -0500
Committer: Kevin Risden <krisden@apache.org>
Committed: Tue Dec 18 11:44:23 2018 -0500

----------------------------------------------------------------------
 .../src/main/java/org/apache/knox/test/mock/MockServlet.java | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/c659fdb7/gateway-test-utils/src/main/java/org/apache/knox/test/mock/MockServlet.java
----------------------------------------------------------------------
diff --git a/gateway-test-utils/src/main/java/org/apache/knox/test/mock/MockServlet.java b/gateway-test-utils/src/main/java/org/apache/knox/test/mock/MockServlet.java
index 38c67fb..1818e25 100644
--- a/gateway-test-utils/src/main/java/org/apache/knox/test/mock/MockServlet.java
+++ b/gateway-test-utils/src/main/java/org/apache/knox/test/mock/MockServlet.java
@@ -29,11 +29,10 @@ import org.apache.log4j.Logger;
 import static org.junit.Assert.fail;
 
 public class MockServlet extends HttpServlet {
+  private static final Logger LOG = Logger.getLogger(MockServlet.class);
 
-  private static final Logger LOG = Logger.getLogger(MockServlet.class.getName());
-
-  public String name;
-  public Queue<MockInteraction> interactions;
+  private final String name;
+  private final Queue<MockInteraction> interactions;
 
   public MockServlet( String name, Queue<MockInteraction> interactions ) {
     this.name = name;
@@ -57,5 +56,4 @@ public class MockServlet extends HttpServlet {
       throw new ServletException( e );
     }
   }
-
 }


Mime
View raw message