activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject What is this code trying to do???
Date Fri, 06 Feb 2009 18:36:04 GMT
I'd like to apply the patch for AMQ-2094

Index: src/main/java/org/apache/activemq/transport/tcp/ 
TcpTransportServer.java
===================================================================
--- src/main/java/org/apache/activemq/transport/tcp/ 
TcpTransportServer.java     (revision 740246)
+++ src/main/java/org/apache/activemq/transport/tcp/ 
TcpTransportServer.java     (working copy)
@@ -130,11 +130,8 @@
          InetAddress addr = InetAddress.getByName(host);

          try {
-            if (host.trim().equals("localhost") ||  
addr.equals(InetAddress.getLocalHost())) {
-                this.serverSocket =  
serverSocketFactory.createServerSocket(bind.getPort(), backlog);
-            } else {
-                this.serverSocket =  
serverSocketFactory.createServerSocket(bind.getPort(), backlog, addr);
-            }
+
+            this.serverSocket =  
serverSocketFactory.createServerSocket(bind.getPort(), backlog, addr);
              configureServerSocket(this.serverSocket);

because as noted in the comment to the issue if host is the actual ip  
address then addr.equals(InetAddress.getLocalHost()) is always true.

However I wonder if there is some purpose to the existing code that  
should be implemented properly?

If no one speaks up in a bit I'm going to go ahead and apply the patch.

thanks
david jencks


Mime
View raw message