From 1f254c086efdf6e9d451c4712a44bce0932c67ea Mon Sep 17 00:00:00 2001 From: Taka Date: Thu, 18 Jan 2018 11:51:47 -0500 Subject: fixed some Sonar critical issues Change-Id: I9dfe73a45b43919ff7b01ab3217d957a40ac2018 Issue-ID: APPC-408 Signed-off-by: Taka --- .../onap/appc/adapter/factory/DmaapMessageAdapterFactoryImpl.java | 7 +++++-- .../main/java/org/onap/appc/adapter/factory/MessageService.java | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'appc-adapters/appc-dmaap-adapter/appc-message-adapter-factory') diff --git a/appc-adapters/appc-dmaap-adapter/appc-message-adapter-factory/src/main/java/org/onap/appc/adapter/factory/DmaapMessageAdapterFactoryImpl.java b/appc-adapters/appc-dmaap-adapter/appc-message-adapter-factory/src/main/java/org/onap/appc/adapter/factory/DmaapMessageAdapterFactoryImpl.java index cb23f5faa..5fe2d0391 100644 --- a/appc-adapters/appc-dmaap-adapter/appc-message-adapter-factory/src/main/java/org/onap/appc/adapter/factory/DmaapMessageAdapterFactoryImpl.java +++ b/appc-adapters/appc-dmaap-adapter/appc-message-adapter-factory/src/main/java/org/onap/appc/adapter/factory/DmaapMessageAdapterFactoryImpl.java @@ -36,16 +36,19 @@ import org.onap.appc.adapter.messaging.dmaap.impl.DmaapProducerImpl; public class DmaapMessageAdapterFactoryImpl implements MessageAdapterFactory { + @Override public Producer createProducer(Collection pools, String writeTopic, String apiKey, String apiSecret) { return new DmaapProducerImpl(pools, writeTopic,apiKey, apiSecret); } + @Override public Producer createProducer(Collection pools, Set writeTopics, String apiKey, String apiSecret) { return new DmaapProducerImpl(pools, writeTopics, apiKey, apiSecret); } + @Override public Consumer createConsumer(Collection pool, String readTopic, - String clientName, String clientId, String filter_json, String apiKey, String apiSecret) { - return new DmaapConsumerImpl(pool, readTopic, clientName, clientId, apiKey, apiSecret, filter_json); + String clientName, String clientId, String filterJson, String apiKey, String apiSecret) { + return new DmaapConsumerImpl(pool, readTopic, clientName, clientId, apiKey, apiSecret, filterJson); } } diff --git a/appc-adapters/appc-dmaap-adapter/appc-message-adapter-factory/src/main/java/org/onap/appc/adapter/factory/MessageService.java b/appc-adapters/appc-dmaap-adapter/appc-message-adapter-factory/src/main/java/org/onap/appc/adapter/factory/MessageService.java index 952f903b1..9418a40ee 100644 --- a/appc-adapters/appc-dmaap-adapter/appc-message-adapter-factory/src/main/java/org/onap/appc/adapter/factory/MessageService.java +++ b/appc-adapters/appc-dmaap-adapter/appc-message-adapter-factory/src/main/java/org/onap/appc/adapter/factory/MessageService.java @@ -49,7 +49,7 @@ public enum MessageService { public static MessageService parse(String input) { if (input != null) { for (MessageService ms : MessageService.values()) { - if (ms.getValue().equals(input.toLowerCase())) { + if (input.equalsIgnoreCase(ms.getValue())) { return ms; } } -- cgit 1.2.3-korg