You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@knox.apache.org by kr...@apache.org on 2019/08/07 17:23:09 UTC

[knox] branch master updated: Fix javadoc warnings

This is an automated email from the ASF dual-hosted git repository.

krisden pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/knox.git


The following commit(s) were added to refs/heads/master by this push:
     new 880ced1  Fix javadoc warnings
880ced1 is described below

commit 880ced160966dca3979d11aa401552e834d8d460
Author: Kevin Risden <kr...@apache.org>
AuthorDate: Wed Aug 7 13:22:59 2019 -0400

    Fix javadoc warnings
---
 .../apache/knox/gateway/GatewayPortMappingConfigTest.java  |  7 +------
 .../java/org/apache/knox/gateway/PortMappingHelper.java    | 14 +++++++-------
 2 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/gateway-server/src/test/java/org/apache/knox/gateway/GatewayPortMappingConfigTest.java b/gateway-server/src/test/java/org/apache/knox/gateway/GatewayPortMappingConfigTest.java
index 56b59b9..94f5fa6 100644
--- a/gateway-server/src/test/java/org/apache/knox/gateway/GatewayPortMappingConfigTest.java
+++ b/gateway-server/src/test/java/org/apache/knox/gateway/GatewayPortMappingConfigTest.java
@@ -42,7 +42,6 @@ import static org.hamcrest.Matchers.greaterThan;
  *
  */
 public class GatewayPortMappingConfigTest {
-
   /**
    * Mock gateway config
    */
@@ -108,10 +107,8 @@ public class GatewayPortMappingConfigTest {
    * @param max max port to check
    * @return Port that is available.
    */
-  public static int getAvailablePort(final int min, final int max) {
-
+  private static int getAvailablePort(final int min, final int max) {
     for (int i = min; i <= max; i++) {
-
       if (!GatewayServer.isPortInUse(i)) {
         return i;
       }
@@ -199,7 +196,5 @@ public class GatewayPortMappingConfigTest {
 
     // Start Server
     gatewayServer.start();
-
   }
-
 }
diff --git a/gateway-test/src/test/java/org/apache/knox/gateway/PortMappingHelper.java b/gateway-test/src/test/java/org/apache/knox/gateway/PortMappingHelper.java
index cede7aa..cd441db 100644
--- a/gateway-test/src/test/java/org/apache/knox/gateway/PortMappingHelper.java
+++ b/gateway-test/src/test/java/org/apache/knox/gateway/PortMappingHelper.java
@@ -44,7 +44,7 @@ public abstract class PortMappingHelper {
   static MockServer masterServer;
   static int eeriePort;
 
-  public PortMappingHelper() {
+  PortMappingHelper() {
     super();
   }
 
@@ -59,11 +59,14 @@ public abstract class PortMappingHelper {
    * This would normally be done once for this suite but the failure tests start
    * affecting each other depending on the state the last 'active' url
    *
+   * @param defaultTopologyName default topology name
+   * @param topologyPortMapping mapping to topology to port
+   * @param isPortMappingEnabled boolean if port mapping is enabled
    * @throws Exception Thrown if any failure occurs.
    */
   public static void init(final String defaultTopologyName,
-      final ConcurrentHashMap<String, Integer> topologyPortMapping, final boolean isPortMappingEnabled)
-      throws Exception {
+                          final ConcurrentHashMap<String, Integer> topologyPortMapping,
+                          final boolean isPortMappingEnabled) throws Exception {
     LOG_ENTER();
 
     masterServer = new MockServer("master", true);
@@ -114,8 +117,7 @@ public abstract class PortMappingHelper {
    * @param gatewayPort port for the gateway
    * @return A populated XML structure for a topology file.
    */
-  static XMLTag createTopology(final String role, final String ldapURL,
-      final int gatewayPort) {
+  static XMLTag createTopology(final String role, final String ldapURL, final int gatewayPort) {
     return XMLDoc.newDocument(true).addRoot("topology").addTag("gateway")
         .addTag("provider").addTag("role").addText("webappsec").addTag("name")
         .addText("WebAppSec").addTag("enabled").addText("true").addTag("param")
@@ -158,9 +160,7 @@ public abstract class PortMappingHelper {
    * @return Port that is available.
    */
   static int getAvailablePort(final int min, final int max) {
-
     for (int i = min; i <= max; i++) {
-
       if (!GatewayServer.isPortInUse(i)) {
         return i;
       }