Merge "Fix SonarQube Violations"
authorSourabh Sourabh <sourabh.sourabh@est.tech>
Thu, 8 Dec 2022 10:55:49 +0000 (10:55 +0000)
committerGerrit Code Review <gerrit@onap.org>
Thu, 8 Dec 2022 10:55:49 +0000 (10:55 +0000)
cps-ri/src/main/java/org/onap/cps/spi/impl/CpsDataPersistenceServiceImpl.java

index ac1be1c..b22f171 100644 (file)
@@ -232,9 +232,8 @@ public class CpsDataPersistenceServiceImpl implements CpsDataPersistenceService
         if (isRootXpath(xpath)) {
             final List<FragmentExtract> fragmentExtracts = fragmentRepository.getTopLevelFragments(dataspaceEntity,
                     anchorEntity);
-            final FragmentEntity fragmentEntity = FragmentEntityArranger.toFragmentEntityTree(anchorEntity,
+            return FragmentEntityArranger.toFragmentEntityTree(anchorEntity,
                     fragmentExtracts);
-            return fragmentEntity;
         } else {
             final String normalizedXpath = getNormalizedXpath(xpath);
             final FragmentEntity fragmentEntity;