aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/plugins-event/plugins-event-carrier
diff options
context:
space:
mode:
authoraditya.puthuparambil <aditya.puthuparambil@est.tech>2020-03-02 13:25:29 +0000
committeraditya puthuparambil <aditya.puthuparambil@est.tech>2020-03-02 13:32:40 +0000
commit255cd306fd0fcdcef864bde12048b7a8b265b26e (patch)
tree8fb47a70c644ab4371b46df1a4b7dee2dd17b8a9 /plugins/plugins-event/plugins-event-carrier
parent49a1875925e73bd782382bd7ee1cf67e0709f190 (diff)
FIxing Sonar issues in APEX
Change-Id: I8ac07eede6758c84a4a9ca505382f215d531cf47 Issue-ID: POLICY-1913 Signed-off-by: aditya.puthuparambil <aditya.puthuparambil@est.tech>
Diffstat (limited to 'plugins/plugins-event/plugins-event-carrier')
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsConsumer.java4
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsProducer.java8
2 files changed, 1 insertions, 11 deletions
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsConsumer.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsConsumer.java
index ff300423f..f70a3c1ac 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsConsumer.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsConsumer.java
@@ -74,7 +74,6 @@ public class ApexJmsConsumer extends ApexPluginsEventConsumer implements Message
final String errorMessage = "specified consumer properties of type \""
+ consumerParameters.getCarrierTechnologyParameters().getClass().getName()
+ "\" are not applicable to a JMS consumer";
- LOGGER.warn(errorMessage);
throw new ApexEventException(errorMessage);
}
jmsConsumerProperties = (JmsCarrierTechnologyParameters) consumerParameters.getCarrierTechnologyParameters();
@@ -95,7 +94,6 @@ public class ApexJmsConsumer extends ApexPluginsEventConsumer implements Message
final String errorMessage = "lookup of JMS connection factory \""
+ jmsConsumerProperties.getConnectionFactory() + "\" failed for JMS consumer properties \""
+ jmsConsumerProperties.getJmsConsumerProperties() + "\"";
- LOGGER.warn(errorMessage, e);
throw new ApexEventException(errorMessage, e);
}
@@ -112,7 +110,6 @@ public class ApexJmsConsumer extends ApexPluginsEventConsumer implements Message
final String errorMessage = "lookup of JMS topic \"" + jmsConsumerProperties.getConsumerTopic()
+ "\" failed for JMS consumer properties \"" + jmsConsumerProperties.getJmsConsumerProperties()
+ "\"";
- LOGGER.warn(errorMessage, e);
throw new ApexEventException(errorMessage, e);
}
@@ -124,7 +121,6 @@ public class ApexJmsConsumer extends ApexPluginsEventConsumer implements Message
} catch (final Exception e) {
final String errorMessage = "connection to the JMS server failed for JMS properties \""
+ jmsConsumerProperties.getJmsConsumerProperties() + "\"";
- LOGGER.warn(errorMessage, e);
throw new ApexEventException(errorMessage, e);
}
}
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsProducer.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsProducer.java
index 46b503e04..393ea7310 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsProducer.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsProducer.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2020 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -88,7 +88,6 @@ public class ApexJmsProducer implements ApexEventProducer {
if (!(producerParameters.getCarrierTechnologyParameters() instanceof JmsCarrierTechnologyParameters)) {
final String errorMessage = "specified producer properties are not applicable to a JMS producer ("
+ this.name + ")";
- LOGGER.warn(errorMessage);
throw new ApexEventException(errorMessage);
}
jmsProducerProperties = (JmsCarrierTechnologyParameters) producerParameters.getCarrierTechnologyParameters();
@@ -110,7 +109,6 @@ public class ApexJmsProducer implements ApexEventProducer {
final String errorMessage = "lookup of JMS connection factory \""
+ jmsProducerProperties.getConnectionFactory() + "\" failed for JMS producer properties \""
+ jmsProducerProperties.getJmsConsumerProperties() + FOR_PRODUCER_TAG + this.name + ")";
- LOGGER.warn(errorMessage, e);
throw new ApexEventException(errorMessage, e);
}
@@ -128,7 +126,6 @@ public class ApexJmsProducer implements ApexEventProducer {
final String errorMessage = "lookup of JMS topic \"" + jmsProducerProperties.getProducerTopic()
+ "\" failed for JMS producer properties \""
+ jmsProducerProperties.getJmsProducerProperties() + FOR_PRODUCER_TAG + this.name + ")";
- LOGGER.warn(errorMessage, e);
throw new ApexEventException(errorMessage, e);
}
@@ -140,7 +137,6 @@ public class ApexJmsProducer implements ApexEventProducer {
} catch (final Exception e) {
final String errorMessage = "connection to JMS server failed for JMS properties \""
+ jmsProducerProperties.getJmsConsumerProperties() + FOR_PRODUCER_TAG + this.name + ")";
- LOGGER.warn(errorMessage, e);
throw new ApexEventException(errorMessage, e);
}
@@ -150,7 +146,6 @@ public class ApexJmsProducer implements ApexEventProducer {
} catch (final Exception e) {
final String errorMessage = "creation of session to JMS server failed for JMS properties \""
+ jmsProducerProperties.getJmsConsumerProperties() + FOR_PRODUCER_TAG + this.name + ")";
- LOGGER.warn(errorMessage, e);
throw new ApexEventException(errorMessage, e);
}
@@ -161,7 +156,6 @@ public class ApexJmsProducer implements ApexEventProducer {
final String errorMessage = "creation of producer for sending events "
+ "to JMS server failed for JMS properties \""
+ jmsProducerProperties.getJmsConsumerProperties() + "\"";
- LOGGER.warn(errorMessage, e);
throw new ApexEventException(errorMessage, e);
}
}