From 64a014a75a8b7c23dc05b1c889ece6ae92ed9eeb Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Fri, 28 May 2021 10:59:36 -0400 Subject: No-sonar on the wrong line Tried putting NOSONAR comment at the end of the statement, because it seems like checkstyle/sonar doesn't like comments in the middle of a statement. Nonetheless, sonar still reports an issue on the line with the "SELECT" statement, so I guess there's no choice but to move NOSONAR to the end of that line. Issue-ID: POLICY-3094 Change-Id: If26ad0b1e7dcc9c7aa963da10a9c5160a8fe272d Signed-off-by: Jim Hahn --- .../src/main/java/org/onap/policy/models/dao/impl/DefaultPfDao.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'models-dao/src') 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 d1e32935c..d27f3c6ed 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 @@ -630,8 +630,8 @@ public class DefaultPfDao implements PfDao { * The invoking code only passes well-known classes into this method, thus * disabling the sonar about SQL injection. */ - size = mg.createQuery("SELECT COUNT(c) FROM " + someClass.getSimpleName() + " c", Long.class) - .getSingleResult(); // NOSONAR + size = mg.createQuery("SELECT COUNT(c) FROM " + someClass.getSimpleName() + " c", Long.class) // NOSONAR + .getSingleResult(); } finally { mg.close(); } -- cgit 1.2.3-korg