aboutsummaryrefslogtreecommitdiffstats
path: root/models-dao
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-08-25 12:30:29 -0400
committerJim Hahn <jrh3@att.com>2020-08-25 14:28:02 -0400
commit59f4f54cdf4c1a5c155360239272da690e8c4a72 (patch)
tree47fc9d91bb83b62f429e1ae8b1587c314f710f41 /models-dao
parent43aaa62cdf9a7dadfb6d688f1fe83c5bd355a86d (diff)
Address more sonar issues in policy-models
Addressed sonar issues: - diamond operator Also removed a number of the "NOSONAR" comments now that we know how to address them without disabling sonar. Issue-ID: POLICY-2714 Change-Id: I440f4fa955968fd911616c2b6ee61b4b4d013821 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'models-dao')
-rw-r--r--models-dao/src/main/java/org/onap/policy/models/dao/impl/DefaultPfDao.java6
1 files changed, 1 insertions, 5 deletions
diff --git a/models-dao/src/main/java/org/onap/policy/models/dao/impl/DefaultPfDao.java b/models-dao/src/main/java/org/onap/policy/models/dao/impl/DefaultPfDao.java
index 092b14ad8..ad9ef1215 100644
--- a/models-dao/src/main/java/org/onap/policy/models/dao/impl/DefaultPfDao.java
+++ b/models-dao/src/main/java/org/onap/policy/models/dao/impl/DefaultPfDao.java
@@ -552,11 +552,7 @@ public class DefaultPfDao implements PfDao {
final EntityManager mg = getEntityManager();
long size = 0;
try {
- /*
- * Concatenation should be safe because the class name should be safe, thus
- * disabling sonar.
- */
- size = mg.createQuery("SELECT COUNT(c) FROM " + someClass.getSimpleName() + " c", Long.class) // NOSONAR
+ size = mg.createQuery("SELECT COUNT(c) FROM " + someClass.getSimpleName() + " c", Long.class)
.getSingleResult();
} finally {
mg.close();