aboutsummaryrefslogtreecommitdiffstats
path: root/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationChangeNotifier.java
diff options
context:
space:
mode:
authordekstroza <dejan.kitic@ericsson.com>2018-05-02 15:59:35 +0100
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>2018-05-14 14:15:49 +0000
commitffcc9dc691833d40df7f3d2aea75b1c071d139b7 (patch)
tree9f4c36510d04c4c71b06f0cdc66605d4c1d7d6e1 /common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationChangeNotifier.java
parentfd6d9d517d24803a7be21e468ccce7f2cf177972 (diff)
Fixes several sonarqube reported issues
Fixes couple of major sonar reported issues, code is reformatted using ONAP java code style Issue-ID: SDC-1270 Change-Id: I8ae52deac5cf73eaedb0f104d72e5f4446239c6a Signed-off-by: dekstroza <dejan.kitic@ericsson.com>
Diffstat (limited to 'common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationChangeNotifier.java')
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationChangeNotifier.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationChangeNotifier.java b/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationChangeNotifier.java
index a7c10caae9..015634b1cd 100644
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationChangeNotifier.java
+++ b/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationChangeNotifier.java
@@ -204,7 +204,7 @@ public final class ConfigurationChangeNotifier {
List<NotificationData> notificationList =
store.get(tenant + Constants.KEY_ELEMENTS_DELEMETER + component);
if (notificationList == null) {
- notificationList = Collections.synchronizedList(new ArrayList<NotificationData>());
+ notificationList = Collections.synchronizedList(new ArrayList<>());
store.put(tenant + Constants.KEY_ELEMENTS_DELEMETER + component, notificationList);
executor.scheduleWithFixedDelay(
() -> triggerScanning(tenant + Constants.KEY_ELEMENTS_DELEMETER + component), 1, 30000,
@@ -263,11 +263,11 @@ public final class ConfigurationChangeNotifier {
private Set<Path> watchForChange(String location) throws Exception {
if (location == null || location.trim().length() == 0) {
- return null;
+ return Collections.emptySet();
}
File file = new File(location);
if (!file.exists()) {
- return null;
+ return Collections.emptySet();
}
Path path = file.toPath();
Set<Path> toReturn = new HashSet<>();