From 3178bbc132b403e7c3ee7317df2362e0a8f0059e Mon Sep 17 00:00:00 2001 From: Sandeep J Date: Fri, 7 Dec 2018 16:32:26 +0530 Subject: fixed sonar issue in SvcLogicLoader.java fixed sonar issues Issue-ID: CCSDK-525 Change-Id: I515fcdbae28518e0a25f1370173b1dd4f77b816e Signed-off-by: Sandeep J --- .../src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicLoader.java | 8 +++++--- 1 file 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 processActivationFiles(List activationPaths) { - List activationEntries = new ArrayList(); + List 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 pathList = new ArrayList(1); + List pathList = new ArrayList<>(1); pathList.add(activationFile); List activationEntries = processActivationFiles(pathList); activateGraphs(activationEntries); -- cgit 1.2.3-korg