aboutsummaryrefslogtreecommitdiffstats
path: root/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/utils
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2019-07-05 10:52:20 -0400
committerJim Hahn <jrh3@att.com>2019-07-05 12:25:00 -0400
commite173fc5ab13b095d8f70fd8a8d4d063adeba6e6b (patch)
tree8e63717c99cfe9f52f905974c8c67fb8a1dece29 /policy-endpoints/src/main/java/org/onap/policy/common/endpoints/utils
parent53f9550501ca1854318c1f552b0aba2e255b6748 (diff)
Fix sonar issues in policy/endpoints
Sonar fixes, other than code coverage. These changes are disruptive and will likely cause breakage in a number of policy repos. Renamed constants. Moved constants/factories from interfaces to classes. Change-Id: I182d50320aa6b53e383081af806c60dd2f806cbe Issue-ID: POLICY-1791 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'policy-endpoints/src/main/java/org/onap/policy/common/endpoints/utils')
-rw-r--r--policy-endpoints/src/main/java/org/onap/policy/common/endpoints/utils/DmaapPropertyUtils.java15
-rw-r--r--policy-endpoints/src/main/java/org/onap/policy/common/endpoints/utils/NetLoggerUtil.java5
-rw-r--r--policy-endpoints/src/main/java/org/onap/policy/common/endpoints/utils/ParameterUtils.java3
3 files changed, 12 insertions, 11 deletions
diff --git a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/utils/DmaapPropertyUtils.java b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/utils/DmaapPropertyUtils.java
index 6b44e5c8..7e0d3ff6 100644
--- a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/utils/DmaapPropertyUtils.java
+++ b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/utils/DmaapPropertyUtils.java
@@ -27,7 +27,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
-import org.onap.policy.common.endpoints.event.comm.bus.DmaapTopicSourceFactory;
import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams.TopicParamsBuilder;
import org.onap.policy.common.endpoints.properties.PolicyEndPointProperties;
@@ -43,25 +42,25 @@ public class DmaapPropertyUtils {
Map<String,String> map = new HashMap<>();
map.put(PolicyEndPointProperties.PROPERTY_DMAAP_DME2_ROUTE_OFFER_SUFFIX,
- DmaapTopicSourceFactory.DME2_ROUTE_OFFER_PROPERTY);
+ PolicyEndPointProperties.DME2_ROUTE_OFFER_PROPERTY);
map.put(PolicyEndPointProperties.PROPERTY_DMAAP_DME2_EP_READ_TIMEOUT_MS_SUFFIX,
- DmaapTopicSourceFactory.DME2_READ_TIMEOUT_PROPERTY);
+ PolicyEndPointProperties.DME2_READ_TIMEOUT_PROPERTY);
map.put(PolicyEndPointProperties.PROPERTY_DMAAP_DME2_EP_CONN_TIMEOUT_SUFFIX,
- DmaapTopicSourceFactory.DME2_EP_CONN_TIMEOUT_PROPERTY);
+ PolicyEndPointProperties.DME2_EP_CONN_TIMEOUT_PROPERTY);
map.put(PolicyEndPointProperties.PROPERTY_DMAAP_DME2_ROUNDTRIP_TIMEOUT_MS_SUFFIX,
- DmaapTopicSourceFactory.DME2_ROUNDTRIP_TIMEOUT_PROPERTY);
+ PolicyEndPointProperties.DME2_ROUNDTRIP_TIMEOUT_PROPERTY);
map.put(PolicyEndPointProperties.PROPERTY_DMAAP_DME2_VERSION_SUFFIX,
- DmaapTopicSourceFactory.DME2_VERSION_PROPERTY);
+ PolicyEndPointProperties.DME2_VERSION_PROPERTY);
map.put(PolicyEndPointProperties.PROPERTY_DMAAP_DME2_SUB_CONTEXT_PATH_SUFFIX,
- DmaapTopicSourceFactory.DME2_SUBCONTEXT_PATH_PROPERTY);
+ PolicyEndPointProperties.DME2_SUBCONTEXT_PATH_PROPERTY);
map.put(PolicyEndPointProperties.PROPERTY_DMAAP_DME2_SESSION_STICKINESS_REQUIRED_SUFFIX,
- DmaapTopicSourceFactory.DME2_SESSION_STICKINESS_REQUIRED_PROPERTY);
+ PolicyEndPointProperties.DME2_SESSION_STICKINESS_REQUIRED_PROPERTY);
PROP_TO_DME = Collections.unmodifiableMap(map);
}
diff --git a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/utils/NetLoggerUtil.java b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/utils/NetLoggerUtil.java
index f82e6a8c..d8f48a26 100644
--- a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/utils/NetLoggerUtil.java
+++ b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/utils/NetLoggerUtil.java
@@ -22,6 +22,7 @@ package org.onap.policy.common.endpoints.utils;
import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
import org.onap.policy.common.endpoints.features.NetLoggerFeatureApi;
+import org.onap.policy.common.endpoints.features.NetLoggerFeatureProviders;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -110,7 +111,7 @@ public class NetLoggerUtil {
*/
private static boolean featureBeforeLog(Logger eventLogger, EventType type, CommInfrastructure protocol,
String topic, String message) {
- for (NetLoggerFeatureApi feature : NetLoggerFeatureApi.providers.getList()) {
+ for (NetLoggerFeatureApi feature : NetLoggerFeatureProviders.getProviders().getList()) {
try {
if (feature.beforeLog(eventLogger, type, protocol, topic, message)) {
return true;
@@ -137,7 +138,7 @@ public class NetLoggerUtil {
*/
private static boolean featureAfterLog(Logger eventLogger, EventType type, CommInfrastructure protocol,
String topic, String message) {
- for (NetLoggerFeatureApi feature : NetLoggerFeatureApi.providers.getList()) {
+ for (NetLoggerFeatureApi feature : NetLoggerFeatureProviders.getProviders().getList()) {
try {
if (feature.afterLog(eventLogger, type, protocol, topic, message)) {
return true;
diff --git a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/utils/ParameterUtils.java b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/utils/ParameterUtils.java
index 40ce8fa5..cabfe58f 100644
--- a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/utils/ParameterUtils.java
+++ b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/utils/ParameterUtils.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019 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.
@@ -32,7 +33,7 @@ import org.onap.policy.common.endpoints.properties.PolicyEndPointProperties;
*
* @author Ajith Sreekumar (ajith.sreekumar@est.tech)
*/
-public abstract class ParameterUtils {
+public class ParameterUtils {
/**
* Private constructor used to prevent sub class instantiation.