From 91a31137b44d034823f72b190fc42539993c6593 Mon Sep 17 00:00:00 2001 From: Tomasz Golabek Date: Wed, 22 May 2019 16:41:09 +0200 Subject: Inheritance in ComponentException ComponentException was split into ByActionStatus and ByResponseFormat exceptions. Test added for ComponentLockAspectTest in passing Change-Id: I89c9ee966b8b4445e791af897bd60cdb845b845b Issue-ID: SDC-2321 Signed-off-by: Tomasz Golabek --- .../sdc/asdctool/migration/tasks/mig1710/UpgradeMigration1710.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'asdctool/src/main/java/org/openecomp') diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig1710/UpgradeMigration1710.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig1710/UpgradeMigration1710.java index c63749e0d6..bff30683ca 100644 --- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig1710/UpgradeMigration1710.java +++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig1710/UpgradeMigration1710.java @@ -12,6 +12,7 @@ import org.openecomp.sdc.asdctool.migration.tasks.handlers.XlsOutputHandler; import org.openecomp.sdc.be.components.impl.ComponentInstanceBusinessLogic; import org.openecomp.sdc.be.components.impl.ResourceBusinessLogic; import org.openecomp.sdc.be.components.impl.ServiceBusinessLogic; +import org.openecomp.sdc.be.components.impl.exceptions.ByResponseFormatComponentException; import org.openecomp.sdc.be.components.impl.exceptions.ComponentException; import org.openecomp.sdc.be.components.lifecycle.LifecycleBusinessLogic; import org.openecomp.sdc.be.components.lifecycle.LifecycleChangeInfoWithAction; @@ -732,7 +733,7 @@ public class UpgradeMigration1710 implements PostMigration { resourceToUpdate.setCategories(((Resource)checkouRes.left().value()).getCategories()); try { Resource updateResourceFromCsarRes = resourceBusinessLogic.validateAndUpdateResourceFromCsar(resourceToUpdate, user, null, null, resourceToUpdate.getUniqueId()); - } catch(ComponentException e){ + } catch(ByResponseFormatComponentException e){ outputHandler.addRecord(resourceToUpdate.getComponentType().name(), resourceToUpdate.getName(), resourceToUpdate.getUUID(), resourceToUpdate.getUniqueId(), MigrationResult.MigrationStatus.FAILED.name(), e.getResponseFormat().getFormattedMessage()); log.info("Failed to update vf with name {}, invariantUUID {}, version {} and latest VSP {}. ", vf.getName(), vf.getInvariantUUID(), vf.getVersion(), latestVersion); return false; -- cgit 1.2.3-korg