diff options
author | Sandeep J <sandeejh@in.ibm.com> | 2018-12-07 16:32:26 +0530 |
---|---|---|
committer | Sandeep J <sandeejh@in.ibm.com> | 2018-12-07 16:32:34 +0530 |
commit | 3178bbc132b403e7c3ee7317df2362e0a8f0059e (patch) | |
tree | e966ebc54a7de201c05c0b19fe75c57164d4ce76 | |
parent | 7db11491f101ed834da2f73958647240502677df (diff) |
fixed sonar issue in SvcLogicLoader.java
fixed sonar issues
Issue-ID: CCSDK-525
Change-Id: I515fcdbae28518e0a25f1370173b1dd4f77b816e
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
-rw-r--r-- | sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicLoader.java | 8 |
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); |