From b28eb010e324c06d06c080569f162182233855f9 Mon Sep 17 00:00:00 2001 From: Abhai Singh Date: Tue, 16 Jan 2018 14:24:16 +0530 Subject: Fixed Sonar FeatureGroupDaoZusammenImpl Fixed reported sonar issues Change-Id: Id85cfee057f4443f26bac0e6987cb52864a4d426 Issue-ID: SDC-343 Signed-off-by: Abhai Singh --- .../dao/impl/zusammen/FeatureGroupDaoZusammenImpl.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'openecomp-be/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/FeatureGroupDaoZusammenImpl.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/FeatureGroupDaoZusammenImpl.java index 8dcc964e7d..27bb79e0d4 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/FeatureGroupDaoZusammenImpl.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/FeatureGroupDaoZusammenImpl.java @@ -201,14 +201,14 @@ public class FeatureGroupDaoZusammenImpl implements FeatureGroupDao { .createRelation(RelationType.FeatureGroupToLicenseKeyGroup, relation)) .collect(Collectors.toList())); - Collection LaRelations = elementInfo.get().getRelations().stream().filter + Collection laRelations = elementInfo.get().getRelations().stream().filter (rel -> rel.getType() .equals(RelationType.FeatureGroupToReferencingLicenseAgreement.name())) .map(rel -> VlmZusammenUtil.createRelation(RelationType .FeatureGroupToReferencingLicenseAgreement, rel.getEdge2().getElementId().toString())) .collect(Collectors.toList()); - featureGroupElement.getRelations().addAll(LaRelations); + featureGroupElement.getRelations().addAll(laRelations); zusammenAdaptor .saveElement(context, elementContext, featureGroupElement, "update feature group"); @@ -277,7 +277,7 @@ public class FeatureGroupDaoZusammenImpl implements FeatureGroupDao { featureGroupElement.setRelations(new ArrayList<>()); if (featureGroup.getEntitlementPoolIds() != null && - featureGroup.getEntitlementPoolIds().size() > 0) { + !featureGroup.getEntitlementPoolIds().isEmpty()) { featureGroupElement.getRelations().addAll(featureGroup.getEntitlementPoolIds().stream() .map(rel -> VlmZusammenUtil .createRelation(RelationType.FeatureGroupToEntitlmentPool, rel)) @@ -285,7 +285,7 @@ public class FeatureGroupDaoZusammenImpl implements FeatureGroupDao { } if (featureGroup.getLicenseKeyGroupIds() != null && - featureGroup.getLicenseKeyGroupIds().size() > 0) { + !featureGroup.getLicenseKeyGroupIds().isEmpty()) { featureGroupElement.getRelations() .addAll(featureGroup.getLicenseKeyGroupIds().stream() .map(rel -> VlmZusammenUtil @@ -294,7 +294,7 @@ public class FeatureGroupDaoZusammenImpl implements FeatureGroupDao { } if (featureGroup.getReferencingLicenseAgreements() != null && - featureGroup.getReferencingLicenseAgreements().size() > 0) { + !featureGroup.getReferencingLicenseAgreements().isEmpty()) { featureGroupElement.getRelations() .addAll(featureGroup.getReferencingLicenseAgreements().stream() .map(rel -> VlmZusammenUtil -- cgit 1.2.3-korg