From 5272c1d22981a41053406c11b1544172924bcfce Mon Sep 17 00:00:00 2001 From: Abhai Singh Date: Tue, 16 Jan 2018 14:09:32 +0530 Subject: Fix Sonar EntitlementPoolZusammenDaoImpl Fixed reported sonar issues Change-Id: I0a6d965a20d1bfe04b8d7ba62e12a830d763cec0 Issue-ID: SDC-343 Signed-off-by: Abhai Singh --- .../dao/impl/zusammen/EntitlementPoolZusammenDaoImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'openecomp-be/lib/openecomp-sdc-vendor-license-lib') 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/EntitlementPoolZusammenDaoImpl.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/EntitlementPoolZusammenDaoImpl.java index 35182a3502..be073abae5 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/EntitlementPoolZusammenDaoImpl.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/EntitlementPoolZusammenDaoImpl.java @@ -77,7 +77,7 @@ public class EntitlementPoolZusammenDaoImpl implements EntitlementPoolDao { if (entitlmentpoolElement.getRelations() == null) { entitlmentpoolElement.setRelations(new ArrayList<>()); } - if (epFromDb.get().getRelations() != null && epFromDb.get().getRelations().size() > 0) { + if (epFromDb.get().getRelations() != null && !epFromDb.get().getRelations().isEmpty()) { entitlmentpoolElement.getRelations().addAll(epFromDb.get().getRelations()); } } @@ -228,7 +228,7 @@ public class EntitlementPoolZusammenDaoImpl implements EntitlementPoolDao { entitlementPoolElement.setInfo(info); if (entitlementPool.getReferencingFeatureGroups() != null - && entitlementPool.getReferencingFeatureGroups().size() > 0) { + && !entitlementPool.getReferencingFeatureGroups().isEmpty()) { entitlementPoolElement.setRelations(entitlementPool.getReferencingFeatureGroups().stream() .map(rel -> VlmZusammenUtil .createRelation(RelationType.EntitlmentPoolToReferencingFeatureGroup, rel)) -- cgit 1.2.3-korg