jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1570839 - /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHCAbstractImpl.java
Date Sat, 22 Feb 2014 13:33:05 GMT
Author: sebb
Date: Sat Feb 22 13:33:05 2014
New Revision: 1570839

URL: http://svn.apache.org/r1570839
Log:
ERROR - jmeter.util.JMeterUtils: Unable to get local host IP address
Reuse existing JMeterUtils code
Bugzilla Id: 56174

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHCAbstractImpl.java

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHCAbstractImpl.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHCAbstractImpl.java?rev=1570839&r1=1570838&r2=1570839&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHCAbstractImpl.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHCAbstractImpl.java
Sat Feb 22 13:33:05 2014
@@ -106,13 +106,8 @@ public abstract class HTTPHCAbstractImpl
                 log.warn(e.getLocalizedMessage());
             }
         } else {
-            try {
-                InetAddress addr = InetAddress.getLocalHost();
-                // Get hostname
-                localHostOrIP = addr.getHostName();
-            } catch (UnknownHostException e) {
-                log.warn("Cannot determine localhost name, and httpclient.localaddress was
not specified");
-            }
+            // Get hostname
+            localHostOrIP = JMeterUtils.getLocalHostName();
         }
         localAddress = inet;
         localHost = localHostOrIP;



Mime
View raw message