You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ta...@apache.org on 2019/10/17 15:52:12 UTC

[qpid-jms] branch master updated: NO-JIRA Remove unused call to get transport http headers

This is an automated email from the ASF dual-hosted git repository.

tabish pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-jms.git


The following commit(s) were added to refs/heads/master by this push:
     new e793da9  NO-JIRA Remove unused call to get transport http headers
e793da9 is described below

commit e793da9943fc6c2ccf6e01a6c60a8b97cfeeee8a
Author: Timothy Bish <ta...@gmail.com>
AuthorDate: Thu Oct 17 11:51:52 2019 -0400

    NO-JIRA Remove unused call to get transport http headers
    
    Unused call to transport getHttpHeaders left in code removed and cleaned
    up the headers apply loop when filling in the Netty Default headers.
---
 .../org/apache/qpid/jms/transports/netty/NettyWsTransport.java    | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/transports/netty/NettyWsTransport.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/transports/netty/NettyWsTransport.java
index 3da8784..52d4013 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/transports/netty/NettyWsTransport.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/transports/netty/NettyWsTransport.java
@@ -19,7 +19,6 @@ package org.apache.qpid.jms.transports.netty;
 import java.io.IOException;
 import java.net.URI;
 import java.nio.charset.StandardCharsets;
-import java.util.Map;
 
 import org.apache.qpid.jms.transports.TransportListener;
 import org.apache.qpid.jms.transports.TransportOptions;
@@ -135,10 +134,9 @@ public class NettyWsTransport extends NettyTcpTransport {
         public NettyWebSocketTransportHandler() {
             DefaultHttpHeaders headers = new DefaultHttpHeaders();
 
-            getTransportOptions().getHttpHeaders();
-            for (Map.Entry<String, String> entry : getTransportOptions().getHttpHeaders().entrySet()) {
-                headers.set(entry.getKey(), entry.getValue());
-            }
+            getTransportOptions().getHttpHeaders().forEach((key, value) -> {
+                headers.set(key, value);
+            });
 
             handshaker = WebSocketClientHandshakerFactory.newHandshaker(
                 getRemoteLocation(), WebSocketVersion.V13, AMQP_SUB_PROTOCOL,


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org