summaryrefslogtreecommitdiffstats
path: root/services/services-engine/src/main/java
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2020-03-11 21:29:17 +0000
committerliamfallon <liam.fallon@est.tech>2020-03-11 21:29:21 +0000
commit690495d32c6033741d7a7c2413476f7ba88e2825 (patch)
tree554cc03ef1c832bf8e488d19cd5ffb3021a35a6e /services/services-engine/src/main/java
parent4e6bd1d02227591d1517245f5bda690ec4eb770e (diff)
Fix minor checkstyle/eclipse warnings
Some minor checkstyle and eclipse warnings have crept into the code in the last few weeks. This review cleams them up. Issue-ID: POLICY-1913 Change-Id: Ib5f103bc28c71a6c4db05ea05719eff41bb38914 Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'services/services-engine/src/main/java')
-rw-r--r--services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/ApexPluginsEventProducer.java10
-rw-r--r--services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/producer/ApexFileEventProducer.java16
2 files changed, 10 insertions, 16 deletions
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/ApexPluginsEventProducer.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/ApexPluginsEventProducer.java
index 06c3d4163..e12633555 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/ApexPluginsEventProducer.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/ApexPluginsEventProducer.java
@@ -20,18 +20,18 @@
package org.onap.policy.apex.service.engine.event;
-import org.onap.policy.apex.core.infrastructure.threading.ApplicationThreadFactory;
-import org.onap.policy.apex.service.parameters.eventhandler.EventHandlerPeeredMode;
-
import java.util.EnumMap;
import java.util.Map;
import java.util.Properties;
+import org.onap.policy.apex.service.parameters.eventhandler.EventHandlerPeeredMode;
+
public abstract class ApexPluginsEventProducer implements ApexEventProducer {
// The name for this producer
protected String name = null;
// The peer references for this event handler
- protected Map<EventHandlerPeeredMode, PeeredReference> peerReferenceMap = new EnumMap<>(EventHandlerPeeredMode.class);
+ protected Map<EventHandlerPeeredMode, PeeredReference> peerReferenceMap =
+ new EnumMap<>(EventHandlerPeeredMode.class);
/**
* {@inheritDoc}.
@@ -62,7 +62,7 @@ public abstract class ApexPluginsEventProducer implements ApexEventProducer {
*/
@Override
public void sendEvent(final long executionId, final Properties executionProperties, final String eventName,
- final Object event) {
+ final Object event) {
// Check if this is a synchronized event, if so we have received a reply
final SynchronousEventCache synchronousEventCache =
(SynchronousEventCache) peerReferenceMap.get(EventHandlerPeeredMode.SYNCHRONOUS);
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/producer/ApexFileEventProducer.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/producer/ApexFileEventProducer.java
index 8f21a4fb9..b0dac3372 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/producer/ApexFileEventProducer.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/producer/ApexFileEventProducer.java
@@ -24,19 +24,14 @@ package org.onap.policy.apex.service.engine.event.impl.filecarrierplugin.produce
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
-import java.util.EnumMap;
-import java.util.Map;
import java.util.Properties;
import org.onap.policy.apex.core.infrastructure.threading.ThreadUtilities;
import org.onap.policy.apex.service.engine.event.ApexEventException;
-import org.onap.policy.apex.service.engine.event.ApexPluginsEventProducer;
import org.onap.policy.apex.service.engine.event.ApexEventRuntimeException;
-import org.onap.policy.apex.service.engine.event.PeeredReference;
-import org.onap.policy.apex.service.engine.event.SynchronousEventCache;
+import org.onap.policy.apex.service.engine.event.ApexPluginsEventProducer;
import org.onap.policy.apex.service.engine.event.impl.filecarrierplugin.FileCarrierTechnologyParameters;
import org.onap.policy.apex.service.parameters.eventhandler.EventHandlerParameters;
-import org.onap.policy.apex.service.parameters.eventhandler.EventHandlerPeeredMode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -56,7 +51,8 @@ public class ApexFileEventProducer extends ApexPluginsEventProducer {
* {@inheritDoc}.
*/
@Override
- public void init(final String producerName, final EventHandlerParameters producerParameters) throws ApexEventException {
+ public void init(final String producerName, final EventHandlerParameters producerParameters)
+ throws ApexEventException {
this.name = producerName;
// Get and check the Apex parameters from the parameter service
@@ -89,7 +85,6 @@ public class ApexFileEventProducer extends ApexPluginsEventProducer {
} catch (final IOException e) {
final String errorMessage = "ApexFileProducer \"" + producerName + "\" failed to open file for writing: \""
+ fileCarrierTechnologyParameters.getFileName() + "\"";
- LOGGER.warn(errorMessage, e);
throw new ApexEventException(errorMessage, e);
}
@@ -112,9 +107,8 @@ public class ApexFileEventProducer extends ApexPluginsEventProducer {
try {
stringEvent = (String) event;
} catch (final Exception e) {
- final String errorMessage = "error in ApexFileProducer \"" + name + "\" while transferring event \""
- + event + "\" to the output stream";
- LOGGER.debug(errorMessage, e);
+ final String errorMessage = "error in ApexFileProducer \"" + name + "\" while transferring event \"" + event
+ + "\" to the output stream";
throw new ApexEventRuntimeException(errorMessage, e);
}