From 61b7e4e1d7a48ec239b1e8e53736c234b4451c0c Mon Sep 17 00:00:00 2001 From: Abhai Singh Date: Tue, 16 Jan 2018 15:46:45 +0530 Subject: Fixed Sonar LicenseKeyGroupZusammenDaoImpl Fixed reported sonar issues Change-Id: Ic98f53add062c684fe63fbf60c358a305e432255 Issue-ID: SDC-343 Signed-off-by: Abhai Singh --- .../dao/impl/zusammen/LicenseKeyGroupZusammenDaoImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/zusammen/LicenseKeyGroupZusammenDaoImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/zusammen/LicenseKeyGroupZusammenDaoImpl.java index 4e7aee377a..d302ab49b5 100644 --- a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/zusammen/LicenseKeyGroupZusammenDaoImpl.java +++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/zusammen/LicenseKeyGroupZusammenDaoImpl.java @@ -76,7 +76,7 @@ public class LicenseKeyGroupZusammenDaoImpl implements LicenseKeyGroupDao { licenseKeyGroupElement.setRelations(new ArrayList<>()); } - if (lkgFromDb.get().getRelations() != null && lkgFromDb.get().getRelations().size() > 0) { + if (lkgFromDb.get().getRelations() != null && !lkgFromDb.get().getRelations().isEmpty()) { licenseKeyGroupElement.getRelations().addAll(lkgFromDb.get().getRelations()); } } @@ -212,7 +212,7 @@ public class LicenseKeyGroupZusammenDaoImpl implements LicenseKeyGroupDao { lkgElement.setInfo(info); if (licenseKeyGroup.getReferencingFeatureGroups() != null - && licenseKeyGroup.getReferencingFeatureGroups().size() > 0) { + && !licenseKeyGroup.getReferencingFeatureGroups().isEmpty()) { lkgElement.setRelations(licenseKeyGroup.getReferencingFeatureGroups().stream() .map(rel -> VlmZusammenUtil .createRelation(RelationType.LicenseKeyGroupToReferencingFeatureGroup, rel)) -- cgit 1.2.3-korg