From f2b425d077b4256ccdf2accab4e4e08186415ff6 Mon Sep 17 00:00:00 2001 From: Francis Toth Date: Fri, 10 Jul 2020 07:48:56 -0400 Subject: Fix minor sonar issues Signed-off-by: Francis Toth Change-Id: Iea540bb663429d55ce90879f9d9a22888c583833 Issue-ID: AAI-2128 --- .../src/main/java/org/onap/aai/rest/RestHandlerService.java | 11 +++++------ .../org/onap/aai/serialization/engines/query/QueryEngine.java | 5 ++--- 2 files changed, 7 insertions(+), 9 deletions(-) (limited to 'aai-core/src/main/java') diff --git a/aai-core/src/main/java/org/onap/aai/rest/RestHandlerService.java b/aai-core/src/main/java/org/onap/aai/rest/RestHandlerService.java index aeb58c4b..e3ac2b26 100644 --- a/aai-core/src/main/java/org/onap/aai/rest/RestHandlerService.java +++ b/aai-core/src/main/java/org/onap/aai/rest/RestHandlerService.java @@ -1,4 +1,4 @@ -/** +/* * ============LICENSE_START======================================================= * org.onap.aai * ================================================================================ @@ -24,10 +24,9 @@ import java.util.concurrent.Executors; import java.util.concurrent.ThreadPoolExecutor; public class RestHandlerService { - private static RestHandlerService single_instance = null; + private static RestHandlerService singleInstance = null; public ThreadPoolExecutor executor; - // private constructor restricted to this class itself private RestHandlerService() { executor = (ThreadPoolExecutor) Executors.newFixedThreadPool(50); } @@ -38,9 +37,9 @@ public class RestHandlerService { * @return single instance of RestHandlerService */ public static RestHandlerService getInstance() { - if (single_instance == null) { - single_instance = new RestHandlerService(); + if (singleInstance == null) { + singleInstance = new RestHandlerService(); } - return single_instance; + return singleInstance; } } diff --git a/aai-core/src/main/java/org/onap/aai/serialization/engines/query/QueryEngine.java b/aai-core/src/main/java/org/onap/aai/serialization/engines/query/QueryEngine.java index b250d8f3..41d97077 100644 --- a/aai-core/src/main/java/org/onap/aai/serialization/engines/query/QueryEngine.java +++ b/aai-core/src/main/java/org/onap/aai/serialization/engines/query/QueryEngine.java @@ -1,4 +1,4 @@ -/** +/* * ============LICENSE_START======================================================= * org.onap.aai * ================================================================================ @@ -34,7 +34,7 @@ import org.onap.aai.introspection.Loader; public abstract class QueryEngine { - final protected GraphTraversalSource g; + protected final GraphTraversalSource g; protected double dbTimeMsecs = 0; /** @@ -177,5 +177,4 @@ public abstract class QueryEngine { public abstract List findCousinsAsPath(Vertex start); public abstract double getDBTimeMsecs(); - } -- cgit 1.2.3-korg