From b3d4898d9e8452ea0b8d848c048e712d43b8d9a3 Mon Sep 17 00:00:00 2001 From: Michael Lando Date: Sun, 11 Jun 2017 14:22:02 +0300 Subject: [SDC-29] rebase continue work to align source Change-Id: I218f1c5ee23fb2c8314f1c70921d3ad8682c10f4 Signed-off-by: Michael Lando --- .../impl/VendorLicenseManagerImpl.java | 27 +++++++++++++++------- 1 file changed, 19 insertions(+), 8 deletions(-) (limited to 'openecomp-be/backend/openecomp-sdc-vendor-license-manager') diff --git a/openecomp-be/backend/openecomp-sdc-vendor-license-manager/src/main/java/org/openecomp/sdc/vendorlicense/impl/VendorLicenseManagerImpl.java b/openecomp-be/backend/openecomp-sdc-vendor-license-manager/src/main/java/org/openecomp/sdc/vendorlicense/impl/VendorLicenseManagerImpl.java index 451415c5ea..eb559f2e62 100644 --- a/openecomp-be/backend/openecomp-sdc-vendor-license-manager/src/main/java/org/openecomp/sdc/vendorlicense/impl/VendorLicenseManagerImpl.java +++ b/openecomp-be/backend/openecomp-sdc-vendor-license-manager/src/main/java/org/openecomp/sdc/vendorlicense/impl/VendorLicenseManagerImpl.java @@ -25,6 +25,8 @@ import org.openecomp.sdc.activityLog.ActivityLogManager; import org.openecomp.sdc.activityLog.ActivityLogManagerFactory; import org.openecomp.sdc.activitylog.dao.type.ActivityLogEntity; import org.openecomp.sdc.datatypes.error.ErrorLevel; +import org.openecomp.sdc.logging.api.Logger; +import org.openecomp.sdc.logging.api.LoggerFactory; import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage; import org.openecomp.sdc.logging.context.impl.MdcDataErrorMessage; import org.openecomp.sdc.logging.types.LoggerConstants; @@ -87,6 +89,8 @@ public class VendorLicenseManagerImpl implements VendorLicenseManager { LicenseKeyGroupDaoFactory.getInstance().createInterface(); private ActivityLogManager activityLogManager = ActivityLogManagerFactory.getInstance().createInterface(); private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage(); + private static final Logger logger = + LoggerFactory.getLogger(VendorLicenseManagerImpl.class); private static void sortVlmListByModificationTimeDescOrder( List vendorLicenseModels) { @@ -178,14 +182,21 @@ public class VendorLicenseManagerImpl implements VendorLicenseManager { version.setStatus(VersionStatus.Locked); } - VendorLicenseModelEntity vlm = - vendorLicenseModelDao.get(new VendorLicenseModelEntity(entry.getKey(), version)); - if (vlm != null) { - VersionedVendorLicenseModel versionedVlm = new VersionedVendorLicenseModel(); - versionedVlm.setVendorLicenseModel(vlm); - versionedVlm.setVersionInfo(versionInfo); - vendorLicenseModels.add(versionedVlm); - } + try { + VendorLicenseModelEntity vlm = + vendorLicenseModelDao.get(new VendorLicenseModelEntity(entry.getKey(), version)); + if (vlm != null) { + VersionedVendorLicenseModel versionedVlm = new VersionedVendorLicenseModel(); + versionedVlm.setVendorLicenseModel(vlm); + versionedVlm.setVersionInfo(versionInfo); + vendorLicenseModels.add(versionedVlm); + } + }catch(RuntimeException rte){ + logger.error("Error trying to retrieve vlm["+entry.getKey()+"] version["+version.toString + ()+"] " + + "message:"+rte + .getMessage()); + } } sortVlmListByModificationTimeDescOrder(vendorLicenseModels); -- cgit 1.2.3-korg