jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1570838 - /jmeter/trunk/src/core/org/apache/jmeter/engine/RemoteJMeterEngineImpl.java
Date Sat, 22 Feb 2014 13:29:13 GMT
Author: sebb
Date: Sat Feb 22 13:29:12 2014
New Revision: 1570838

URL: http://svn.apache.org/r1570838
Log:
Rearrange code:
Only fetch value if it is needed; check cheapest condition first

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/engine/RemoteJMeterEngineImpl.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/engine/RemoteJMeterEngineImpl.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/engine/RemoteJMeterEngineImpl.java?rev=1570838&r1=1570837&r2=1570838&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/engine/RemoteJMeterEngineImpl.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/engine/RemoteJMeterEngineImpl.java Sat Feb 22
13:29:12 2014
@@ -97,9 +97,9 @@ public final class RemoteJMeterEngineImp
             throw new RemoteException("Cannot start. Unable to get local host IP address.",
e1);
         }
         log.info("Local IP address="+localHost.getHostAddress());
-        String hostName = localHost.getHostName();
         // BUG 52469 : Allow loopback address for SSH Tunneling of RMI traffic
-        if (localHost.isLoopbackAddress() && host == null){
+        if (host == null && localHost.isLoopbackAddress()){
+            String hostName = localHost.getHostName();
             throw new RemoteException("Cannot start. "+hostName+" is a loopback address.");
         }
         if (localHost.isSiteLocalAddress()){



Mime
View raw message