Lambdas for Remaining Modules JPA -> ZK

Polishing - PR Comments and Closeable Warnings

Eclipse emits bogus warnings with exceptions in lambdas.
Even though the lambda might run on another thread, elipse thinks it could
cause the context to not be closed.

SPR-14854: MessageChannel is now a @FunctionalInterface

* Additional Lambda polishing and some code style fixes
This commit is contained in:
Gary Russell
2016-10-28 12:07:06 -04:00
committed by Artem Bilan
parent 16be9fc47d
commit 67d6cd0c89
83 changed files with 870 additions and 1324 deletions

View File

@@ -18,9 +18,6 @@ package org.springframework.integration.syslog.inbound;
import org.springframework.integration.channel.FixedSubscriberChannel;
import org.springframework.integration.ip.udp.UnicastReceivingChannelAdapter;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageHandler;
import org.springframework.messaging.MessagingException;
/**
* UDP implementation of a syslog inbound channel adapter.
@@ -58,14 +55,7 @@ public class UdpSyslogReceivingChannelAdapter extends SyslogReceivingChannelAdap
"of the provided 'UnicastReceivingChannelAdapter' to support Syslog conversion " +
"for the incoming UDP packets");
}
this.udpAdapter.setOutputChannel(new FixedSubscriberChannel(new MessageHandler() {
@Override
public void handleMessage(Message<?> message) throws MessagingException {
convertAndSend(message);
}
}));
this.udpAdapter.setOutputChannel(new FixedSubscriberChannel(message -> convertAndSend(message)));
if (!this.udpAdapterSet) {
this.udpAdapter.afterPropertiesSet();
}