diff options
author | Pamela Dragosh <pdragosh@research.att.com> | 2017-09-22 13:30:44 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2017-09-22 13:30:44 +0000 |
commit | 085dd9b5c211edaf70533105de1a460bcfae0a14 (patch) | |
tree | 9ffd5f5fd09303c9ae8217b98bebb2e7764518fa | |
parent | b607cda1c5304b23ee9326cd24cae3f615813b10 (diff) | |
parent | 5a928151f308602fb091a728c739c0aea2106c8b (diff) |
Merge "Added diamond symbol on RHS"
5 files changed, 19 insertions, 16 deletions
diff --git a/feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/HealthCheck.java b/feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/HealthCheck.java index 5cbcf555..cc6f02e0 100644 --- a/feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/HealthCheck.java +++ b/feature-healthcheck/src/main/java/org/onap/policy/drools/healthcheck/HealthCheck.java @@ -144,6 +144,7 @@ class HealthCheckMonitor implements HealthCheck { /** * {@inheritDoc} */ + @Override public Reports healthCheck() { Reports reports = new Reports(); reports.healthy = PolicyEngine.manager.isAlive(); @@ -152,8 +153,8 @@ class HealthCheckMonitor implements HealthCheck { engineReport.healthy = PolicyEngine.manager.isAlive(); engineReport.name = "PDP-D"; engineReport.url = "self"; - engineReport.code = (PolicyEngine.manager.isAlive()) ? 200 : 500; - engineReport.message = (PolicyEngine.manager.isAlive()) ? "alive" : "not alive"; + engineReport.code = PolicyEngine.manager.isAlive() ? 200 : 500; + engineReport.message = PolicyEngine.manager.isAlive() ? "alive" : "not alive"; reports.details.add(engineReport); for (HttpClient client : clients) { diff --git a/feature-session-persistence/src/main/java/org/onap/policy/drools/persistence/DroolsPersistenceProperties.java b/feature-session-persistence/src/main/java/org/onap/policy/drools/persistence/DroolsPersistenceProperties.java index fabcbc03..1c935b0c 100644 --- a/feature-session-persistence/src/main/java/org/onap/policy/drools/persistence/DroolsPersistenceProperties.java +++ b/feature-session-persistence/src/main/java/org/onap/policy/drools/persistence/DroolsPersistenceProperties.java @@ -21,6 +21,8 @@ package org.onap.policy.drools.persistence; public class DroolsPersistenceProperties { + private DroolsPersistenceProperties() { + } /* * feature-session-persistence.properties parameter key values */ diff --git a/policy-endpoints/src/main/java/org/onap/policy/drools/http/client/HttpClientFactory.java b/policy-endpoints/src/main/java/org/onap/policy/drools/http/client/HttpClientFactory.java index aa0a8e6b..06aa4630 100644 --- a/policy-endpoints/src/main/java/org/onap/policy/drools/http/client/HttpClientFactory.java +++ b/policy-endpoints/src/main/java/org/onap/policy/drools/http/client/HttpClientFactory.java @@ -85,7 +85,7 @@ class IndexedHttpClientFactory implements HttpClientFactory { */ private static Logger logger = LoggerFactory.getLogger(IndexedHttpClientFactory.class); - protected HashMap<String, HttpClient> clients = new HashMap<String, HttpClient>(); + protected HashMap<String, HttpClient> clients = new HashMap<>(); @Override public synchronized HttpClient build(String name, boolean https, boolean selfSignedCerts, @@ -108,7 +108,7 @@ class IndexedHttpClientFactory implements HttpClientFactory { @Override public synchronized ArrayList<HttpClient> build(Properties properties) throws KeyManagementException, NoSuchAlgorithmException { - ArrayList<HttpClient> clientList = new ArrayList<HttpClient>(); + ArrayList<HttpClient> clientList = new ArrayList<>(); String clientNames = properties.getProperty(PolicyProperties.PROPERTY_HTTP_CLIENT_SERVICES); if (clientNames == null || clientNames.isEmpty()) { @@ -116,7 +116,7 @@ class IndexedHttpClientFactory implements HttpClientFactory { } List<String> clientNameList = - new ArrayList<String>(Arrays.asList(clientNames.split("\\s*,\\s*"))); + new ArrayList<>(Arrays.asList(clientNames.split("\\s*,\\s*"))); for (String clientName : clientNameList) { String httpsString = properties.getProperty(PolicyProperties.PROPERTY_HTTP_CLIENT_SERVICES + "." + @@ -189,7 +189,7 @@ class IndexedHttpClientFactory implements HttpClientFactory { @Override public synchronized List<HttpClient> inventory() { - return new ArrayList<HttpClient>(this.clients.values()); + return new ArrayList<>(this.clients.values()); } @Override diff --git a/policy-endpoints/src/main/java/org/onap/policy/drools/http/server/HttpServletServerFactory.java b/policy-endpoints/src/main/java/org/onap/policy/drools/http/server/HttpServletServerFactory.java index 56e9ccdd..b6366d00 100644 --- a/policy-endpoints/src/main/java/org/onap/policy/drools/http/server/HttpServletServerFactory.java +++ b/policy-endpoints/src/main/java/org/onap/policy/drools/http/server/HttpServletServerFactory.java @@ -100,7 +100,7 @@ class IndexedHttpServletServerFactory implements HttpServletServerFactory { /** * servers index */ - protected HashMap<Integer, HttpServletServer> servers = new HashMap<Integer, HttpServletServer>(); + protected HashMap<Integer, HttpServletServer> servers = new HashMap<>(); @Override public synchronized HttpServletServer build(String name, String host, int port, @@ -122,7 +122,7 @@ class IndexedHttpServletServerFactory implements HttpServletServerFactory { public synchronized ArrayList<HttpServletServer> build(Properties properties) throws IllegalArgumentException { - ArrayList<HttpServletServer> serviceList = new ArrayList<HttpServletServer>(); + ArrayList<HttpServletServer> serviceList = new ArrayList<>(); String serviceNames = properties.getProperty(PolicyProperties.PROPERTY_HTTP_SERVER_SERVICES); if (serviceNames == null || serviceNames.isEmpty()) { @@ -131,7 +131,7 @@ class IndexedHttpServletServerFactory implements HttpServletServerFactory { } List<String> serviceNameList = - new ArrayList<String>(Arrays.asList(serviceNames.split("\\s*,\\s*"))); + new ArrayList<>(Arrays.asList(serviceNames.split("\\s*,\\s*"))); for (String serviceName : serviceNameList) { String servicePortString = properties.getProperty(PolicyProperties.PROPERTY_HTTP_SERVER_SERVICES + "." + @@ -206,14 +206,14 @@ class IndexedHttpServletServerFactory implements HttpServletServerFactory { if (restClasses != null && !restClasses.isEmpty()) { List<String> restClassesList = - new ArrayList<String>(Arrays.asList(restClasses.split("\\s*,\\s*"))); + new ArrayList<>(Arrays.asList(restClasses.split("\\s*,\\s*"))); for (String restClass : restClassesList) service.addServletClass(restUriPath, restClass); } if (restPackages != null && !restPackages.isEmpty()) { List<String> restPackageList = - new ArrayList<String>(Arrays.asList(restPackages.split("\\s*,\\s*"))); + new ArrayList<>(Arrays.asList(restPackages.split("\\s*,\\s*"))); for (String restPackage : restPackageList) service.addServletPackage(restUriPath, restPackage); } @@ -236,7 +236,7 @@ class IndexedHttpServletServerFactory implements HttpServletServerFactory { @Override public synchronized List<HttpServletServer> inventory() { - return new ArrayList<HttpServletServer>(this.servers.values()); + return new ArrayList<>(this.servers.values()); } @Override @@ -252,8 +252,8 @@ class IndexedHttpServletServerFactory implements HttpServletServerFactory { @Override public synchronized void destroy() throws IllegalArgumentException, IllegalStateException { - List<HttpServletServer> servers = this.inventory(); - for (HttpServletServer server: servers) { + List<HttpServletServer> httpServletServers = this.inventory(); + for (HttpServletServer server: httpServletServers) { server.shutdown(); } diff --git a/policy-endpoints/src/main/java/org/onap/policy/drools/http/server/internal/JettyServletServer.java b/policy-endpoints/src/main/java/org/onap/policy/drools/http/server/internal/JettyServletServer.java index 55d058f5..e0a46173 100644 --- a/policy-endpoints/src/main/java/org/onap/policy/drools/http/server/internal/JettyServletServer.java +++ b/policy-endpoints/src/main/java/org/onap/policy/drools/http/server/internal/JettyServletServer.java @@ -243,7 +243,7 @@ public abstract class JettyServletServer implements HttpServletServer, Runnable } } - return (this.jettyServer.isRunning()); + return this.jettyServer.isRunning(); } } @@ -373,7 +373,7 @@ public abstract class JettyServletServer implements HttpServletServer, Runnable public String toString() { StringBuilder builder = new StringBuilder(); builder.append("JettyServer [name=").append(name).append(", host=").append(host).append(", port=").append(port) - .append(", user=").append(user).append(", password=").append((password != null)).append(", contextPath=") + .append(", user=").append(user).append(", password=").append(password != null).append(", contextPath=") .append(contextPath).append(", jettyServer=").append(jettyServer).append(", context=").append(this.context) .append(", connector=").append(connector).append(", jettyThread=").append(jettyThread) .append("]"); |