jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1774967 - /jmeter/trunk/src/core/org/apache/jmeter/JMeter.java
Date Sun, 18 Dec 2016 21:43:18 GMT
Author: pmouawad
Date: Sun Dec 18 21:43:18 2016
New Revision: 1774967

URL: http://svn.apache.org/viewvc?rev=1774967&view=rev
Log:
Fix sonar warning

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/JMeter.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/JMeter.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/JMeter.java?rev=1774967&r1=1774966&r2=1774967&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/JMeter.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/JMeter.java Sun Dec 18 21:43:18 2016
@@ -633,16 +633,15 @@ public class JMeter implements JMeterPlu
         if (parser.getArgumentById(PROXY_USERNAME) != null) {
             Properties jmeterProps = JMeterUtils.getJMeterProperties();
             if (parser.getArgumentById(PROXY_PASSWORD) != null) {
-                String u, p;
-                Authenticator.setDefault(new ProxyAuthenticator(u = parser.getArgumentById(PROXY_USERNAME)
-                        .getArgument(), p = parser.getArgumentById(PROXY_PASSWORD).getArgument()));
+                String u = parser.getArgumentById(PROXY_USERNAME).getArgument();
+                String p = parser.getArgumentById(PROXY_PASSWORD).getArgument();
+                Authenticator.setDefault(new ProxyAuthenticator(u, p));
                 log.info("Set Proxy login: " + u + "/" + p);
                 jmeterProps.setProperty(HTTP_PROXY_USER, u);//for Httpclient
                 jmeterProps.setProperty(HTTP_PROXY_PASS, p);//for Httpclient
             } else {
-                String u;
-                Authenticator.setDefault(new ProxyAuthenticator(u = parser.getArgumentById(PROXY_USERNAME)
-                        .getArgument(), ""));
+                String u = parser.getArgumentById(PROXY_USERNAME).getArgument();
+                Authenticator.setDefault(new ProxyAuthenticator(u, ""));
                 log.info("Set Proxy login: " + u);
                 jmeterProps.setProperty(HTTP_PROXY_USER, u);
             }



Mime
View raw message