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:
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<>();