aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms')
-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.java4
2 files changed, 4 insertions, 4 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 de324512b..303165558 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
@@ -101,7 +101,7 @@ public class ApexJmsConsumer implements MessageListener, ApexEventConsumer, Runn
// Check if we actually got a connection factory
if (connectionFactory == null) {
- throw new NullPointerException(
+ throw new IllegalArgumentException(
"JMS context lookup of \"" + jmsConsumerProperties.getConnectionFactory() + "\" returned null");
}
} catch (final Exception e) {
@@ -118,7 +118,7 @@ public class ApexJmsConsumer implements MessageListener, ApexEventConsumer, Runn
// Check if we actually got a topic
if (jmsIncomingTopic == null) {
- throw new NullPointerException(
+ throw new IllegalArgumentException(
"JMS context lookup of \"" + jmsConsumerProperties.getConsumerTopic() + "\" returned null");
}
} catch (final Exception 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 0580d7159..83321e432 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
@@ -103,7 +103,7 @@ public class ApexJmsProducer implements ApexEventProducer {
// Check if we actually got a connection factory
if (connectionFactory == null) {
- throw new NullPointerException("JMS context lookup of \"" + jmsProducerProperties.getConnectionFactory()
+ throw new IllegalArgumentException("JMS context lookup of \"" + jmsProducerProperties.getConnectionFactory()
+ "\" returned null for producer (" + this.name + ")");
}
} catch (final Exception e) {
@@ -121,7 +121,7 @@ public class ApexJmsProducer implements ApexEventProducer {
// Check if we actually got a topic
if (jmsOutgoingTopic == null) {
- throw new NullPointerException("JMS context lookup of \"" + jmsProducerProperties.getProducerTopic()
+ throw new IllegalArgumentException("JMS context lookup of \"" + jmsProducerProperties.getProducerTopic()
+ "\" returned null for producer (" + this.name + ")");
}
} catch (final Exception e) {