summaryrefslogtreecommitdiffstats
path: root/cps-ri
diff options
context:
space:
mode:
authorDylanB95EST <dylan.byrne@est.tech>2022-04-08 15:53:50 +0100
committerDylanB95EST <dylan.byrne@est.tech>2022-04-08 15:53:54 +0100
commitac6f54fcfd2b07a4804620bd9cfa6de6ce4e1c0c (patch)
treeecded1f31b827bb09841c831a4a4cef7551d1a9f /cps-ri
parentb7ad8ef3750e2d633acfb8e70255b4d4cb195430 (diff)
Fix Sonar Qube Violations - Recurring task
Fix sonar issues in CPS. - Remove Unnecessary cast to List - Immediately return expession Issue-ID: CPS-475 Change-Id: Ic3fa2f3f92784682045a780d87c6737d04f37659 Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
Diffstat (limited to 'cps-ri')
-rw-r--r--cps-ri/src/main/java/org/onap/cps/spi/repository/ModuleReferenceRepositoryImpl.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/cps-ri/src/main/java/org/onap/cps/spi/repository/ModuleReferenceRepositoryImpl.java b/cps-ri/src/main/java/org/onap/cps/spi/repository/ModuleReferenceRepositoryImpl.java
index 40a93da71c..f85dea3a73 100644
--- a/cps-ri/src/main/java/org/onap/cps/spi/repository/ModuleReferenceRepositoryImpl.java
+++ b/cps-ri/src/main/java/org/onap/cps/spi/repository/ModuleReferenceRepositoryImpl.java
@@ -155,8 +155,8 @@ public class ModuleReferenceRepositoryImpl implements ModuleReferenceQuery {
+ " AND yang_resource.revision=%1$s.revision"
+ " WHERE yang_resource.module_name IS NULL;", tempTableName);
- final List<Object[]> resultsAsObjects =
- (List<Object[]>) entityManager.createNativeQuery(sql).getResultList();
+ @SuppressWarnings("unchecked")
+ final List<Object[]> resultsAsObjects = entityManager.createNativeQuery(sql).getResultList();
final List<ModuleReference> resultsAsModuleReferences = new ArrayList<>(resultsAsObjects.size());
for (final Object[] row : resultsAsObjects) {