You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by zr...@apache.org on 2017/03/23 10:51:18 UTC
camel git commit: CAMEL-11053 camel-undertow - Compile error
Repository: camel
Updated Branches:
refs/heads/master 76659a972 -> 5250afa19
CAMEL-11053 camel-undertow - Compile error
This could be related to JDK-8051402[1], the change makes the types more
explicit.
[1] https://bugs.openjdk.java.net/browse/JDK-8051402
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/5250afa1
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/5250afa1
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/5250afa1
Branch: refs/heads/master
Commit: 5250afa19d0a55076c599ed7ac0f7f4c7bc25413
Parents: 76659a9
Author: Zoran Regvart <zr...@apache.org>
Authored: Thu Mar 23 11:50:56 2017 +0100
Committer: Zoran Regvart <zr...@apache.org>
Committed: Thu Mar 23 11:50:56 2017 +0100
----------------------------------------------------------------------
.../camel/component/undertow/UndertowClientCallback.java | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/5250afa1/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowClientCallback.java
----------------------------------------------------------------------
diff --git a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowClientCallback.java b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowClientCallback.java
index 02fcc4c..d9c6485 100644
--- a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowClientCallback.java
+++ b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowClientCallback.java
@@ -21,6 +21,7 @@ import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.ByteBuffer;
+import java.nio.channels.Channel;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
@@ -42,6 +43,7 @@ import org.apache.camel.Message;
import org.apache.camel.util.ExchangeHelper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.xnio.ChannelExceptionHandler;
import org.xnio.ChannelListener;
import org.xnio.ChannelListeners;
import org.xnio.IoUtils;
@@ -258,8 +260,12 @@ class UndertowClientCallback implements ClientCallback<ClientConnection> {
// the canonical way of flushing Xnio channels
channel.shutdownWrites();
if (!channel.flush()) {
- channel.getWriteSetter().set(ChannelListeners.flushingChannelListener(IoUtils::safeClose,
- ChannelListeners.closingChannelExceptionHandler()));
+ final ChannelListener<StreamSinkChannel> safeClose = IoUtils::safeClose;
+ final ChannelExceptionHandler<Channel> closingChannelExceptionHandler = ChannelListeners
+ .closingChannelExceptionHandler();
+ final ChannelListener<StreamSinkChannel> flushingChannelListener = ChannelListeners
+ .flushingChannelListener(safeClose, closingChannelExceptionHandler);
+ channel.getWriteSetter().set(flushingChannelListener);
channel.resumeWrites();
}
}