diff options
author | Jim Hahn <jrh3@att.com> | 2021-08-26 14:36:35 -0400 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2021-08-26 15:12:19 -0400 |
commit | d04af420514c9c852af77780f0bd5ee23ebb401a (patch) | |
tree | 4212f3e411714770bd4bae3ecb25634190868b13 /feature-controller-logging | |
parent | 9869e3a9665c0215dc9f9724fe3b5576c0479157 (diff) |
Fix sonars in drools-pdp
Fixed sonars:
- use "var"
- override "equals"
- unused imports
Also changed some of the JPA queries to make them typed queries.
Issue-ID: POLICY-3289
Change-Id: Ib3a00be322d8d00ba492673708439cacfe2c7fc4
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'feature-controller-logging')
-rwxr-xr-x | feature-controller-logging/src/main/java/org/onap/policy/drools/controller/logging/ControllerLoggingFeature.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/feature-controller-logging/src/main/java/org/onap/policy/drools/controller/logging/ControllerLoggingFeature.java b/feature-controller-logging/src/main/java/org/onap/policy/drools/controller/logging/ControllerLoggingFeature.java index 30f90763..6cca9cef 100755 --- a/feature-controller-logging/src/main/java/org/onap/policy/drools/controller/logging/ControllerLoggingFeature.java +++ b/feature-controller-logging/src/main/java/org/onap/policy/drools/controller/logging/ControllerLoggingFeature.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * feature-controller-logging * ================================================================================ - * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,7 +31,6 @@ import org.onap.policy.drools.protocol.configuration.PdpdConfiguration; import org.onap.policy.drools.system.PolicyController; import org.onap.policy.drools.system.PolicyControllerConstants; import org.onap.policy.drools.system.PolicyEngine; -import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** @@ -64,7 +63,7 @@ public class ControllerLoggingFeature */ @Override public boolean beforeOffer(PolicyController controller, CommInfrastructure protocol, String topic, String event) { - Logger controllerLogger = LoggerFactory.getLogger(controller.getName()); + var controllerLogger = LoggerFactory.getLogger(controller.getName()); controllerLogger.info("[IN|{}|{}]{}{}", protocol, topic, LINE_SEP, event); return false; } @@ -77,7 +76,7 @@ public class ControllerLoggingFeature public boolean afterDeliver(DroolsController controller, TopicSink sink, Object fact, String json, boolean success) { if (success) { - Logger controllerLogger = LoggerFactory + var controllerLogger = LoggerFactory .getLogger(PolicyControllerConstants.getFactory().get(controller).getName()); controllerLogger.info("[OUT|{}|{}]{}{}", sink.getTopicCommInfrastructure(), sink.getTopic(), LINE_SEP, json); @@ -93,7 +92,7 @@ public class ControllerLoggingFeature public boolean afterOnTopicEvent(PolicyEngine engine, PdpdConfiguration configuration, CommInfrastructure commType, String topic, String event) { for (ControllerConfiguration controller : configuration.getControllers()) { - Logger controllerLogger = LoggerFactory.getLogger(controller.getName()); + var controllerLogger = LoggerFactory.getLogger(controller.getName()); controllerLogger.info("[IN|{}|{}]{}{}", commType, topic, LINE_SEP, event); } return false; |