cshannon commented on code in PR #2133:
URL: https://github.com/apache/activemq/pull/2133#discussion_r3816067566


##########
activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpNioSslTransportFactory.java:
##########
@@ -73,13 +80,33 @@ public TcpTransport createTransport(WireFormat wireFormat, 
Socket socket,
 
     @Override
     public TransportServer doBind(URI location) throws IOException {
-        if (SslContext.getCurrentSslContext() != null) {
+        return doBind(location, null);
+    }
+
+    @Override
+    public TransportServer doBind(URI location, SslContext sslContext) throws 
IOException {
+        SSLContext context = null;
+        if (sslContext != null) {
             try {
-                context = SslContext.getCurrentSslContext().getSSLContext();
+                context = sslContext.getSSLContext();
             } catch (Exception e) {
                 throw new IOException(e);
             }
         }
-        return super.doBind(location);
+        try {
+            Map<String, String> options = new HashMap<String, 
String>(URISupport.parseParameters(location));
+
+            ServerSocketFactory serverSocketFactory = 
createServerSocketFactory();
+            TcpTransportServer server = createTcpTransportServer(location, 
serverSocketFactory, context);

Review Comment:
   It looks like you copied this entire block of code from super.doBind() for 
this one line, is it possible to refactor the parent so we don't have duplicate 
code?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to