Fixed Sonar LicenseKeyGroupZusammenDaoImpl 99/28299/2
authorAbhai Singh <Abhai.Singh@amdocs.com>
Tue, 16 Jan 2018 10:16:45 +0000 (15:46 +0530)
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>
Tue, 16 Jan 2018 11:29:54 +0000 (11:29 +0000)
Fixed reported sonar issues

Change-Id: Ic98f53add062c684fe63fbf60c358a305e432255
Issue-ID: SDC-343
Signed-off-by: Abhai Singh <Abhai.Singh@amdocs.com>
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 4e7aee3..d302ab4 100644 (file)
@@ -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))