aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/plugins-event/plugins-event-carrier
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@ericsson.com>2018-09-18 16:20:26 +0100
committerliamfallon <liam.fallon@ericsson.com>2018-09-18 16:20:39 +0100
commita46382dd12b981220243bf11ab3fb115acfabfa0 (patch)
tree94fbca8bf5669b9c252d3b8cc73ccc3ec3a25706 /plugins/plugins-event/plugins-event-carrier
parent565922bbe60fc0a9d015ce00ef8733e6ddfe905c (diff)
remove license issues
Change the versions of some second order dependencies to mitigate license issues. Change-Id: I39745ec1eb7c72fb481a4adafc2805e4bbbd8386 Issue-ID: POLICY-1059 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
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/ApexJmsProducer.java13
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka/src/main/java/org/onap/policy/apex/plugins/event/carrier/kafka/ApexKafkaConsumer.java2
2 files changed, 8 insertions, 7 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/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 83321e432..4dcbf80c8 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,8 +103,9 @@ public class ApexJmsProducer implements ApexEventProducer {
// Check if we actually got a connection factory
if (connectionFactory == null) {
- throw new IllegalArgumentException("JMS context lookup of \"" + jmsProducerProperties.getConnectionFactory()
- + "\" returned null for producer (" + this.name + ")");
+ throw new IllegalArgumentException(
+ "JMS context lookup of \"" + jmsProducerProperties.getConnectionFactory()
+ + "\" returned null for producer (" + this.name + ")");
}
} catch (final Exception e) {
final String errorMessage = "lookup of JMS connection factory \""
@@ -231,8 +232,8 @@ public class ApexJmsProducer implements ApexEventProducer {
try {
jmsMessage = jmsSession.createObjectMessage((Serializable) eventObject);
} catch (final Exception e) {
- final String errorMessage = COULD_NOT_SEND_PREFIX + eventname + JMS_MESSAGE_PRODUCER_TAG
- + this.name + ", could not create JMS Object Message for object \"" + eventObject;
+ final String errorMessage = COULD_NOT_SEND_PREFIX + eventname + JMS_MESSAGE_PRODUCER_TAG + this.name
+ + ", could not create JMS Object Message for object \"" + eventObject;
LOGGER.warn(errorMessage, e);
throw new ApexEventRuntimeException(errorMessage);
}
@@ -241,8 +242,8 @@ public class ApexJmsProducer implements ApexEventProducer {
try {
jmsMessage = jmsSession.createTextMessage(eventObject.toString());
} catch (final Exception e) {
- final String errorMessage = COULD_NOT_SEND_PREFIX + eventname + JMS_MESSAGE_PRODUCER_TAG
- + this.name + ", could not create JMS Text Message for object \"" + eventObject;
+ final String errorMessage = COULD_NOT_SEND_PREFIX + eventname + JMS_MESSAGE_PRODUCER_TAG + this.name
+ + ", could not create JMS Text Message for object \"" + eventObject;
LOGGER.warn(errorMessage, e);
throw new ApexEventRuntimeException(errorMessage);
}
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka/src/main/java/org/onap/policy/apex/plugins/event/carrier/kafka/ApexKafkaConsumer.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka/src/main/java/org/onap/policy/apex/plugins/event/carrier/kafka/ApexKafkaConsumer.java
index be1b943d4..94ac2bcca 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka/src/main/java/org/onap/policy/apex/plugins/event/carrier/kafka/ApexKafkaConsumer.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka/src/main/java/org/onap/policy/apex/plugins/event/carrier/kafka/ApexKafkaConsumer.java
@@ -164,7 +164,7 @@ public class ApexKafkaConsumer implements ApexEventConsumer, Runnable {
while (consumerThread.isAlive() && !stopOrderedFlag) {
try {
final ConsumerRecords<String, String> records =
- kafkaConsumer.poll(kafkaConsumerProperties.getConsumerPollDuration());
+ kafkaConsumer.poll(kafkaConsumerProperties.getConsumerPollDuration().toMillis());
for (final ConsumerRecord<String, String> record : records) {
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("event received for {} for forwarding to Apex engine : {} {}",