From 269e543ba89dbf553fc66227f7123a302f56b5b4 Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Fri, 10 Aug 2018 14:45:45 -0400 Subject: Remove simple checkstyle Mostly concentrated on the period at the end of summary. But I did clear a few others for longer than 120 characters and placement of methods next to each other. Possibly a few others. I did not clear everything, but will submit a few more reviews to get the others. Issue-ID: POLICY-881 Change-Id: I692a5349d686d52fee4040757cdc2ed8b5cc221b Signed-off-by: Pamela Dragosh --- .../http/server/internal/JettyServletServer.java | 53 +++++++++++++--------- 1 file changed, 32 insertions(+), 21 deletions(-) (limited to 'policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/internal/JettyServletServer.java') diff --git a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/internal/JettyServletServer.java b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/internal/JettyServletServer.java index b22a9401..b866a81e 100644 --- a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/internal/JettyServletServer.java +++ b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/internal/JettyServletServer.java @@ -43,12 +43,12 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * Http Server implementation using Embedded Jetty + * Http Server implementation using Embedded Jetty. */ public abstract class JettyServletServer implements HttpServletServer, Runnable { /** - * Keystore/Truststore system property names + * Keystore/Truststore system property names. */ public static final String SYSTEM_KEYSTORE_PROPERTY_NAME = "javax.net.ssl.keyStore"; public static final String SYSTEM_KEYSTORE_PASSWORD_PROPERTY_NAME = "javax.net.ssl.keyStorePassword"; @@ -56,67 +56,67 @@ public abstract class JettyServletServer implements HttpServletServer, Runnable public static final String SYSTEM_TRUSTSTORE_PASSWORD_PROPERTY_NAME = "javax.net.ssl.trustStorePassword"; /** - * Logger + * Logger. */ private static Logger logger = LoggerFactory.getLogger(JettyServletServer.class); /** - * server name + * Server name. */ protected final String name; /** - * server host address + * Server host address. */ protected final String host; /** - * server port to bind + * Server port to bind. */ protected final int port; /** - * server auth user name + * Server auth user name. */ protected String user; /** - * server auth password name + * Server auth password name. */ protected String password; /** - * server base context path + * Server base context path. */ protected final String contextPath; /** - * embedded jetty server + * Embedded jetty server. */ protected final Server jettyServer; /** - * servlet context + * Servlet context. */ protected final ServletContextHandler context; /** - * jetty connector + * Jetty connector. */ protected final ServerConnector connector; /** - * jetty thread + * Jetty thread. */ protected volatile Thread jettyThread; /** - * start condition + * Start condition. */ protected Object startCondition = new Object(); /** - * constructor + * Constructor. * * @param name server name * @param host server host @@ -159,11 +159,12 @@ public abstract class JettyServletServer implements HttpServletServer, Runnable this.jettyServer = new Server(); this.jettyServer.setRequestLog(new Slf4jRequestLog()); - if (https) + if (https) { this.connector = httpsConnector(); - else + } else { this.connector = httpConnector(); - + } + this.connector.setName(srvName); this.connector.setReuseAddress(true); this.connector.setPort(port); @@ -200,8 +201,9 @@ public abstract class JettyServletServer implements HttpServletServer, Runnable sslContextFactory.setKeyStorePath(keyStore); String ksPassword = System.getProperty(SYSTEM_KEYSTORE_PASSWORD_PROPERTY_NAME); - if (ksPassword != null) + if (ksPassword != null) { sslContextFactory.setKeyStorePassword(ksPassword); + } } String trustStore = System.getProperty(SYSTEM_TRUSTSTORE_PROPERTY_NAME); @@ -209,8 +211,9 @@ public abstract class JettyServletServer implements HttpServletServer, Runnable sslContextFactory.setTrustStorePath(trustStore); String tsPassword = System.getProperty(SYSTEM_TRUSTSTORE_PASSWORD_PROPERTY_NAME); - if (tsPassword != null) + if (tsPassword != null) { sslContextFactory.setTrustStorePassword(tsPassword); + } } HttpConfiguration https = new HttpConfiguration(); @@ -261,7 +264,7 @@ public abstract class JettyServletServer implements HttpServletServer, Runnable } /** - * jetty server execution + * jetty server execution. */ @Override public void run() { @@ -425,6 +428,8 @@ public abstract class JettyServletServer implements HttpServletServer, Runnable } /** + * Get name. + * * @return the name */ public String getName() { @@ -432,6 +437,8 @@ public abstract class JettyServletServer implements HttpServletServer, Runnable } /** + * Get host. + * * @return the host */ public String getHost() { @@ -439,6 +446,8 @@ public abstract class JettyServletServer implements HttpServletServer, Runnable } /** + * Get user. + * * @return the user */ public String getUser() { @@ -446,6 +455,8 @@ public abstract class JettyServletServer implements HttpServletServer, Runnable } /** + * Get password. + * * @return the password */ @JsonIgnore -- cgit 1.2.3-korg