summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2018-12-11 15:38:19 +0000
committerGerrit Code Review <gerrit@onap.org>2018-12-11 15:38:19 +0000
commit2455541e29c7695d0b2ef99f9a8d2be7b9d61c44 (patch)
tree52af00080e8d81700326812ae89f31d8b5987450
parentf811296beffa0773b20b30acc85df7e01c6fbd87 (diff)
parent3178bbc132b403e7c3ee7317df2362e0a8f0059e (diff)
Merge "fixed sonar issue in SvcLogicLoader.java"
-rw-r--r--sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicLoader.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicLoader.java b/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicLoader.java
index d50c371c0..433b723e7 100644
--- a/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicLoader.java
+++ b/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicLoader.java
@@ -5,6 +5,8 @@
* Copyright (C) 2017 AT&T Intellectual Property. All rights
* reserved.
* ================================================================================
+ * Modifications Copyright (C) 2018 IBM.
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -62,7 +64,7 @@ public class SvcLogicLoader {
}
protected List<ActivationEntry> processActivationFiles(List<Path> activationPaths) {
- List<ActivationEntry> activationEntries = new ArrayList<ActivationEntry>();
+ List<ActivationEntry> activationEntries = new ArrayList<>();
for (Path activationFile : activationPaths) {
activationEntries.addAll(getActivationEntries(activationFile));
}
@@ -104,7 +106,7 @@ public class SvcLogicLoader {
return activationEntries;
} catch (IOException ioe) {
LOGGER.error("Couldn't read the activation file at " + activationFilePath, ioe);
- return null;
+ return new ArrayList<>();
}
}
@@ -167,7 +169,7 @@ public class SvcLogicLoader {
public void bulkActivate() {
Path activationFile = Paths.get(directoryRoot);
- List<Path> pathList = new ArrayList<Path>(1);
+ List<Path> pathList = new ArrayList<>(1);
pathList.add(activationFile);
List<ActivationEntry> activationEntries = processActivationFiles(pathList);
activateGraphs(activationEntries);