diff options
author | 2017-09-21 14:56:51 +0530 | |
---|---|---|
committer | 2017-09-21 12:54:16 +0000 | |
commit | 5a928151f308602fb091a728c739c0aea2106c8b (patch) | |
tree | 608ce53be1f17aa70561b6194bd8bc0833d95782 /policy-endpoints/src/main/java | |
parent | 642936382b388b6d7574c21f04909abb42477c9d (diff) |
Added diamond symbol on RHS
Removed useless parentheses
Issue-ID: POLICY-239
Change-Id: Icad445f49cc619d71f71ef913f2592d5c7ebf29c
Signed-off-by: rama-huawei <rama.subba.reddy.s@huawei.com>
Diffstat (limited to 'policy-endpoints/src/main/java')
3 files changed, 14 insertions, 14 deletions
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("]"); |