jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1854317 - in /jmeter/trunk: src/core/org/apache/jmeter/JMeter.java xdocs/changes.xml
Date Mon, 25 Feb 2019 15:47:07 GMT
Author: pmouawad
Date: Mon Feb 25 15:47:07 2019
New Revision: 1854317

URL: http://svn.apache.org/viewvc?rev=1854317&view=rev
Log:
Bug 63207 - java.lang.NullPointerException: null when run Jmeter 5.1 with proxy options
Bugzilla Id: 63207

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

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=1854317&r1=1854316&r2=1854317&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/JMeter.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/JMeter.java Mon Feb 25 15:47:07 2019
@@ -760,11 +760,16 @@ public class JMeter implements JMeterPlu
             System.setProperty("https.proxyHost", h);// $NON-NLS-1$
             System.setProperty("http.proxyPort",  p);// $NON-NLS-1$
             System.setProperty("https.proxyPort", p);// $NON-NLS-1$
-            String proxyScheme = parser.getArgumentById(PROXY_SCHEME).getArgument();
-            if(!StringUtils.isBlank(proxyScheme)){
-                System.setProperty("http.proxyScheme",  proxyScheme );// $NON-NLS-1$
+            String proxyScheme = null;
+            if (parser.getArgumentById(PROXY_SCHEME) != null) {
+                proxyScheme = parser.getArgumentById(PROXY_SCHEME).getArgument();
+                if(!StringUtils.isBlank(proxyScheme)){
+                    System.setProperty("http.proxyScheme",  proxyScheme );// $NON-NLS-1$
+                }
+            }
+            if(log.isInfoEnabled()) {
+                log.info("Set proxy Host: {}, Port: {}, Scheme: {}", h, p, proxyScheme !=
null ? proxyScheme : "Not set");
             }
-            log.info("Set scheme: {} proxyHost: {} Port: {}", proxyScheme, h, p);
         } else if (parser.getArgumentById(PROXY_HOST) != null || parser.getArgumentById(PROXY_PORT)
!= null) {
             throw new IllegalUserActionException(JMeterUtils.getResString("proxy_cl_error"));//
$NON-NLS-1$
         }

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1854317&r1=1854316&r2=1854317&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml [utf-8] (original)
+++ jmeter/trunk/xdocs/changes.xml [utf-8] Mon Feb 25 15:47:07 2019
@@ -163,6 +163,7 @@ Summary
 <h3>General</h3>
 <ul>
     <li><bug>63201</bug>SearchTreeDialog disappears behind master JFrame.
Contributed by Benoit Vatan (benoit.vatan at gmail.com)</li>
+    <li><bug>63207</bug>java.lang.NullPointerException: null when run Jmeter
5.1 with proxy options</li>
 </ul>
 
  <!--  =================== Thanks =================== -->



Mime
View raw message