aboutsummaryrefslogtreecommitdiffstats
path: root/policy-endpoints/src
diff options
context:
space:
mode:
authora.sreekumar <ajith.sreekumar@bell.ca>2020-12-04 11:04:10 +0000
committera.sreekumar <ajith.sreekumar@bell.ca>2020-12-04 11:22:21 +0000
commitdd2aef555893e48ca8fcdc0cfb0a54538e49cfad (patch)
treefc994378a4db65415daaea16679575d8b07c93a1 /policy-endpoints/src
parent371821c3191999dfc90f77569b184172e598f431 (diff)
Fixing sonar issues in policy-common
Change-Id: I4dce0dbdf71d01fbb59e9bf861d1af1ab49e5ae7 Issue-ID: POLICY-2914 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
Diffstat (limited to 'policy-endpoints/src')
-rw-r--r--policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/NoopTopicEndpoint.java3
-rw-r--r--policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/BusConsumer.java3
-rw-r--r--policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/BusPublisher.java3
-rw-r--r--policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/BusTopicBase.java13
-rw-r--r--policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/InlineBusTopicSink.java5
-rw-r--r--policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/SingleThreadedBusTopicSource.java3
-rw-r--r--policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/TopicBase.java5
-rw-r--r--policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/internal/JettyServletServer.java5
-rw-r--r--policy-endpoints/src/main/java/org/onap/policy/common/endpoints/listeners/JsonListener.java3
-rw-r--r--policy-endpoints/src/main/java/org/onap/policy/common/endpoints/listeners/ScoListener.java3
10 files changed, 28 insertions, 18 deletions
diff --git a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/NoopTopicEndpoint.java b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/NoopTopicEndpoint.java
index 833574a3..73ff6ed6 100644
--- a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/NoopTopicEndpoint.java
+++ b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/NoopTopicEndpoint.java
@@ -4,6 +4,7 @@
* ================================================================================
* Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019 Samsung Electronics Co., Ltd.
+ * Modifications Copyright (C) 2020 Bell Canada. 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.
@@ -41,7 +42,7 @@ public abstract class NoopTopicEndpoint extends TopicBase {
/**
* Constructs the object.
*/
- public NoopTopicEndpoint(List<String> servers, String topic) {
+ protected NoopTopicEndpoint(List<String> servers, String topic) {
super(servers, topic);
}
diff --git a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/BusConsumer.java b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/BusConsumer.java
index 60ab2e9e..5fb3aedb 100644
--- a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/BusConsumer.java
+++ b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/BusConsumer.java
@@ -4,6 +4,7 @@
* ================================================================================
* Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2018 Samsung Electronics Co., Ltd.
+ * Modifications Copyright (C) 2020 Bell Canada. 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.
@@ -223,7 +224,7 @@ public interface BusConsumer {
* @param busTopicParams contains above listed attributes
* @throws MalformedURLException URL should be valid
*/
- public DmaapConsumerWrapper(BusTopicParams busTopicParams) throws MalformedURLException {
+ protected DmaapConsumerWrapper(BusTopicParams busTopicParams) throws MalformedURLException {
this.fetchTimeout = busTopicParams.getFetchTimeout();
diff --git a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/BusPublisher.java b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/BusPublisher.java
index 09d52946..0c058adb 100644
--- a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/BusPublisher.java
+++ b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/BusPublisher.java
@@ -4,6 +4,7 @@
* ================================================================================
* Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2018 Samsung Electronics Co., Ltd.
+ * Modifications Copyright (C) 2020 Bell Canada. 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.
@@ -164,7 +165,7 @@ public interface BusPublisher {
* @param username AAF or DME2 Login
* @param password AAF or DME2 Password
*/
- public DmaapPublisherWrapper(ProtocolTypeConstants protocol, List<String> servers, String topic,
+ protected DmaapPublisherWrapper(ProtocolTypeConstants protocol, List<String> servers, String topic,
String username, String password, boolean useHttps) {
diff --git a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/BusTopicBase.java b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/BusTopicBase.java
index ccf25753..6dd6a3eb 100644
--- a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/BusTopicBase.java
+++ b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/BusTopicBase.java
@@ -3,13 +3,14 @@
* ONAP
* ================================================================================
* Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2020 Bell Canada. 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.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -49,7 +50,7 @@ public abstract class BusTopicBase extends TopicBase implements ApiKeyEnabled {
/**
* Instantiates a new Bus Topic Base.
- *
+ *
* <p>servers list of servers
* topic topic name
* apiKey API Key
@@ -59,7 +60,7 @@ public abstract class BusTopicBase extends TopicBase implements ApiKeyEnabled {
* @param busTopicParams holds all our parameters
* @throws IllegalArgumentException if invalid parameters are present
*/
- public BusTopicBase(BusTopicParams busTopicParams) {
+ protected BusTopicBase(BusTopicParams busTopicParams) {
super(busTopicParams.getServers(), busTopicParams.getTopic(), busTopicParams.getEffectiveTopic());
this.apiKey = busTopicParams.getApiKey();
this.apiSecret = busTopicParams.getApiSecret();
@@ -79,7 +80,7 @@ public abstract class BusTopicBase extends TopicBase implements ApiKeyEnabled {
/**
* Is using HTTPS.
- *
+ *
* @return if using https
*/
public boolean isUseHttps() {
@@ -88,7 +89,7 @@ public abstract class BusTopicBase extends TopicBase implements ApiKeyEnabled {
/**
* Is self signed certificates allowed.
- *
+ *
* @return if self signed certificates are allowed
*/
public boolean isAllowSelfSignedCerts() {
diff --git a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/InlineBusTopicSink.java b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/InlineBusTopicSink.java
index 00bd9e3a..d586f887 100644
--- a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/InlineBusTopicSink.java
+++ b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/InlineBusTopicSink.java
@@ -4,6 +4,7 @@
* ================================================================================
* Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2018-2019 Samsung Electronics Co., Ltd.
+ * Modifications Copyright (C) 2020 Bell Canada. 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.
@@ -60,9 +61,9 @@ public abstract class InlineBusTopicSink extends BusTopicBase implements BusTopi
* partitionId partition id
* useHttps does connection use HTTPS?
* allowSelfSignedCerts are self-signed certificates allow *
- * @throws IllegalArgumentException in invalid parameters are passed in
+ * @throws IllegalArgumentException if invalid parameters are passed in
*/
- public InlineBusTopicSink(BusTopicParams busTopicParams) {
+ protected InlineBusTopicSink(BusTopicParams busTopicParams) {
super(busTopicParams);
diff --git a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/SingleThreadedBusTopicSource.java b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/SingleThreadedBusTopicSource.java
index 6e746948..376a62d1 100644
--- a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/SingleThreadedBusTopicSource.java
+++ b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/SingleThreadedBusTopicSource.java
@@ -4,6 +4,7 @@
* ================================================================================
* Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2018-2019 Samsung Electronics Co., Ltd.
+ * Modifications Copyright (C) 2020 Bell Canada. 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.
@@ -84,7 +85,7 @@ public abstract class SingleThreadedBusTopicSource extends BusTopicBase
*
* @throws IllegalArgumentException An invalid parameter passed in
*/
- public SingleThreadedBusTopicSource(BusTopicParams busTopicParams) {
+ protected SingleThreadedBusTopicSource(BusTopicParams busTopicParams) {
super(busTopicParams);
diff --git a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/TopicBase.java b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/TopicBase.java
index 2e0a9a46..efa06e22 100644
--- a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/TopicBase.java
+++ b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/TopicBase.java
@@ -3,6 +3,7 @@
* ONAP
* ================================================================================
* Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2020 Bell Canada. 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.
@@ -81,7 +82,7 @@ public abstract class TopicBase implements Topic {
*
* @throws IllegalArgumentException if invalid parameters are present
*/
- public TopicBase(List<String> servers, String topic) {
+ protected TopicBase(List<String> servers, String topic) {
this(servers, topic, topic);
}
@@ -93,7 +94,7 @@ public abstract class TopicBase implements Topic {
*
* @throws IllegalArgumentException if invalid parameters are present
*/
- public TopicBase(List<String> servers, String topic, String effectiveTopic) {
+ protected TopicBase(List<String> servers, String topic, String effectiveTopic) {
if (servers == null || servers.isEmpty()) {
throw new IllegalArgumentException("Server(s) must be provided");
diff --git a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/internal/JettyServletServer.java b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/internal/JettyServletServer.java
index 699d5d43..29e7bbfd 100644
--- a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/internal/JettyServletServer.java
+++ b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/internal/JettyServletServer.java
@@ -4,6 +4,7 @@
* ================================================================================
* Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019-2020 Nordix Foundation.
+ * Modifications Copyright (C) 2020 Bell Canada. 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.
@@ -131,7 +132,7 @@ public abstract class JettyServletServer implements HttpServletServer, Runnable
*
* @throws IllegalArgumentException if invalid parameters are passed in
*/
- public JettyServletServer(String name, boolean https, String host, int port, String contextPath) {
+ protected JettyServletServer(String name, boolean https, String host, int port, String contextPath) {
String srvName = name;
if (srvName == null || srvName.isEmpty()) {
@@ -183,7 +184,7 @@ public abstract class JettyServletServer implements HttpServletServer, Runnable
this.jettyServer.setHandler(context);
}
- public JettyServletServer(String name, String host, int port, String contextPath) {
+ protected JettyServletServer(String name, String host, int port, String contextPath) {
this(name, false, host, port, contextPath);
}
diff --git a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/listeners/JsonListener.java b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/listeners/JsonListener.java
index ff8cbc5b..ce60f59c 100644
--- a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/listeners/JsonListener.java
+++ b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/listeners/JsonListener.java
@@ -3,6 +3,7 @@
* ONAP
* ================================================================================
* Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2020 Bell Canada. 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.
@@ -44,7 +45,7 @@ public abstract class JsonListener implements TopicListener {
/**
* Constructs the object.
*/
- public JsonListener() {
+ protected JsonListener() {
super();
}
diff --git a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/listeners/ScoListener.java b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/listeners/ScoListener.java
index a3d33965..117071c3 100644
--- a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/listeners/ScoListener.java
+++ b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/listeners/ScoListener.java
@@ -3,6 +3,7 @@
* ONAP
* ================================================================================
* Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2020 Bell Canada. 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.
@@ -53,7 +54,7 @@ public abstract class ScoListener<T> {
*
* @param clazz class of message this handles
*/
- public ScoListener(Class<T> clazz) {
+ protected ScoListener(Class<T> clazz) {
this.clazz = clazz;
}