summaryrefslogtreecommitdiffstats
path: root/client/client-monitoring
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2020-08-10 14:47:08 +0000
committerGerrit Code Review <gerrit@onap.org>2020-08-10 14:47:08 +0000
commit69db35c582df773c5559ee569f9ba22c6bcb69d8 (patch)
treef7df858dc04a9dd55996b6ba784e82d4e1f3b348 /client/client-monitoring
parent09212e0d7326c2933ed437ee36188a241b8cf900 (diff)
parentdc2b85e4ae6db95a0c09494a928ee6fbdf95594e (diff)
Merge "Sonar Fixes"
Diffstat (limited to 'client/client-monitoring')
-rw-r--r--client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestResource.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestResource.java b/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestResource.java
index dd9d8b2c6..f31f47cd4 100644
--- a/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestResource.java
+++ b/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestResource.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2020 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -294,7 +295,7 @@ public class ApexMonitoringRestResource {
SlidingWindowList<Counter> valueList;
if (!cache.containsKey(host)) {
- cache.put(host, new HashMap<String, List<Counter>>());
+ cache.put(host, new HashMap<>());
}
if (cache.get(host).containsKey(id)) {
@@ -312,7 +313,7 @@ public class ApexMonitoringRestResource {
/**
* Get an engine service facade for sending REST requests. This method is package because it is used by unit test.
- *
+ *
* @param hostName the host name of the Apex engine
* @param port the port of the Apex engine
* @return the engine service facade
@@ -359,21 +360,21 @@ public class ApexMonitoringRestResource {
if (this == obj) {
return true;
}
-
+
if (!super.equals(obj)) {
return false;
}
-
+
if (getClass() != obj.getClass()) {
return false;
}
-
+
@SuppressWarnings("unchecked")
SlidingWindowList<V> other = (SlidingWindowList<V>) obj;
if (!getOuterType().equals(other.getOuterType())) {
return false;
}
-
+
return maxEntries == other.maxEntries;
}
}