diff options
author | az2497 <avi.ziv@amdocs.com> | 2017-08-10 17:49:40 +0300 |
---|---|---|
committer | az2497 <avi.ziv@amdocs.com> | 2017-08-10 18:47:32 +0300 |
commit | 644017cb3edd5b7a077a634ffd5daf2fee6bc088 (patch) | |
tree | d371219cede1734d6909568325345ef196be677b /openecomp-be/backend/openecomp-sdc-action-manager/src/main/java | |
parent | 7f7925e39cf2f428061d161bc4ffe67cad80c76e (diff) |
[SDC] OnBoard with enabled tests and features
Change-Id: I4c1bbf6e1c854cf97a3561c736f83da44b58b7c0
Signed-off-by: az2497 <avi.ziv@amdocs.com>
[SDC] OnBoard with enabled tests and features.
Change-Id: Icd52f039aee4dd393a1404d530bb9fdd0b20e604
Signed-off-by: az2497 <avi.ziv@amdocs.com>
Diffstat (limited to 'openecomp-be/backend/openecomp-sdc-action-manager/src/main/java')
-rw-r--r-- | openecomp-be/backend/openecomp-sdc-action-manager/src/main/java/org/openecomp/sdc/action/impl/ActionManagerImpl.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/openecomp-be/backend/openecomp-sdc-action-manager/src/main/java/org/openecomp/sdc/action/impl/ActionManagerImpl.java b/openecomp-be/backend/openecomp-sdc-action-manager/src/main/java/org/openecomp/sdc/action/impl/ActionManagerImpl.java index 4f58957c2d..36493e2b14 100644 --- a/openecomp-be/backend/openecomp-sdc-action-manager/src/main/java/org/openecomp/sdc/action/impl/ActionManagerImpl.java +++ b/openecomp-be/backend/openecomp-sdc-action-manager/src/main/java/org/openecomp/sdc/action/impl/ActionManagerImpl.java @@ -68,6 +68,7 @@ import static org.openecomp.sdc.action.util.ActionUtil.actionLogPreProcessor; import static org.openecomp.sdc.action.util.ActionUtil.getCurrentTimeStampUtc; import static org.openecomp.sdc.versioning.dao.types.Version.VERSION_STRING_VIOLATION_MSG; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang.StringUtils; import org.openecomp.sdc.action.types.*; import org.openecomp.sdc.logging.api.Logger; @@ -142,7 +143,7 @@ public class ActionManagerImpl implements ActionManager { @Override public List<Action> getActionsByActionInvariantUuId(String invariantId) throws ActionException { - List<Action> actions = null; + List<Action> actions; log.debug(" entering getActionsByActionInvariantUuId with invariantID = " + invariantId); actions = actionDao @@ -291,6 +292,7 @@ public class ActionManagerImpl implements ActionManager { String errorDesc = String .format(ACTION_ENTITY_UNIQUE_VALUE_MSG, ActionConstants.UniqueValues.ACTION_NAME, action.getName()); + log.error(errorDesc, exception); actionLogPostProcessor(StatusCode.ERROR, ACTION_ENTITY_UNIQUE_VALUE_ERROR, errorDesc, false); throw new ActionException(ACTION_ENTITY_UNIQUE_VALUE_ERROR, errorDesc); } finally { @@ -470,7 +472,7 @@ public class ActionManagerImpl implements ActionManager { List<ActionArtifact> currentVersionArtifacts = action.getArtifacts(); //Delete the artifacts from action_artifact table (if any) - if (currentVersionArtifacts != null && currentVersionArtifacts.size() > 0) { + if (CollectionUtils.isNotEmpty(currentVersionArtifacts) && currentVersionArtifacts.size() > 0) { for (ActionArtifact artifact : currentVersionArtifacts) { ActionArtifactEntity artifactDeleteEntity = new ActionArtifactEntity(artifact.getArtifactUuId(), |