jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1807647 - in /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy: ProxyControl.java gui/ProxyControlGui.java
Date Thu, 07 Sep 2017 20:24:36 GMT
Author: pmouawad
Date: Thu Sep  7 20:24:35 2017
New Revision: 1807647

URL: http://svn.apache.org/viewvc?rev=1807647&view=rev
Log:
Space police

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java?rev=1807647&r1=1807646&r2=1807647&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
Thu Sep  7 20:24:35 2017
@@ -395,7 +395,7 @@ public class ProxyControl extends Generi
     }
     
     public void setProxyPauseHTTPSample(String proxyPauseHTTPSample) {
-    setProperty(PROXY_PAUSE_HTTP_SAMPLER, proxyPauseHTTPSample);
+        setProperty(PROXY_PAUSE_HTTP_SAMPLER, proxyPauseHTTPSample);
     }
 
     public void setNotifyChildSamplerListenerOfFilteredSamplers(boolean b) {
@@ -486,7 +486,7 @@ public class ProxyControl extends Generi
     
     public String getProxyPauseHTTPSample() {
         return getPropertyAsString(PROXY_PAUSE_HTTP_SAMPLER);
-        }
+    }
 
     public boolean getNotifyChildSamplerListenerOfFilteredSamplers() {
         return getPropertyAsBoolean(NOTIFY_CHILD_SAMPLER_LISTENERS_FILTERED, true);
@@ -530,9 +530,9 @@ public class ProxyControl extends Generi
             server = new Daemon(getPort(), this);
             if (getProxyPauseHTTPSample().isEmpty()) {
                 sampleGap = JMeterUtils.getPropDefault("proxy.pause", 5000);
-                } else {
-                    sampleGap = Long.parseLong(getProxyPauseHTTPSample().trim());
-                }
+            } else {
+                sampleGap = Long.parseLong(getProxyPauseHTTPSample().trim());
+            }
             server.start();
             if (GuiPackage.getInstance() != null) {
                 GuiPackage.getInstance().register(server);

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java?rev=1807647&r1=1807646&r2=1807647&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
Thu Sep  7 20:24:35 2017
@@ -161,7 +161,7 @@ public class ProxyControlGui extends Log
      */
     private JTextField prefixHTTPSampleName;
     
-    /*
+    /**
      * Delay between HTTP requests
      */
     private JTextField proxyPauseHTTPSample;
@@ -229,7 +229,7 @@ public class ProxyControlGui extends Log
     private static final String ADD_SUGGESTED_EXCLUDES = "exclude_suggested";
 
     private static final String PREFIX_HTTP_SAMPLER_NAME = "proxy_prefix_http_sampler_name";
// $NON-NLS-1$
-    
+
     private static final String PROXY_PAUSE_HTTP_SAMPLER = "proxy_pause_http_sampler"; //
$NON-NLS-1$
     //- action names
 
@@ -643,17 +643,16 @@ public class ProxyControlGui extends Log
         } else if(fieldName.equals(PROXY_PAUSE_HTTP_SAMPLER)) {
             try {
                 Long.parseLong(proxyPauseHTTPSample.getText());
-                } catch (NumberFormatException nfe) {
-                    int length = proxyPauseHTTPSample.getText().length();
-                    if (length > 0) {
-                        JOptionPane.showMessageDialog(this, 
-                                JMeterUtils.getResString("proxy_settings_pause_error_digits"),
// $NON-NLS-1$
-                                JMeterUtils.getResString("proxy_settings_pause_error_invalid_data"),
// $NON-NLS-1$
-                                JOptionPane.WARNING_MESSAGE);
-                        // Drop the last character:
-                        proxyPauseHTTPSample.setText(proxyPauseHTTPSample.getText().substring(0,
length-1));
-                        }
-                    }
+            } catch (NumberFormatException nfe) {
+                int length = proxyPauseHTTPSample.getText().length();
+                if (length > 0) {
+                    JOptionPane.showMessageDialog(this, JMeterUtils.getResString("proxy_settings_pause_error_digits"),
// $NON-NLS-1$
+                            JMeterUtils.getResString("proxy_settings_pause_error_invalid_data"),
// $NON-NLS-1$
+                            JOptionPane.WARNING_MESSAGE);
+                    // Drop the last character:
+                    proxyPauseHTTPSample.setText(proxyPauseHTTPSample.getText().substring(0,
length - 1));
+                }
+            }
             model.setProxyPauseHTTPSample(proxyPauseHTTPSample.getText());
             enableRestart();
         }
@@ -850,7 +849,7 @@ public class ProxyControlGui extends Log
         proxyPauseHTTPSample.addKeyListener(this);
         proxyPauseHTTPSample.setName(PROXY_PAUSE_HTTP_SAMPLER);
         proxyPauseHTTPSample.setActionCommand(ENABLE_RESTART);
-        JLabel labelProxyPause= new JLabel(JMeterUtils.getResString("proxy_pause_http_sampler"));
// $NON-NLS-1$
+        JLabel labelProxyPause = new JLabel(JMeterUtils.getResString("proxy_pause_http_sampler"));
// $NON-NLS-1$
         labelProxyPause.setLabelFor(proxyPauseHTTPSample);
 
         JLabel labelSamplerType = new JLabel(JMeterUtils.getResString("proxy_sampler_type"));
// $NON-NLS-1$
@@ -879,7 +878,7 @@ public class ProxyControlGui extends Log
         panel.add(labelProxyPause, gbc.clone());
         gbc.gridx++;
         gbc.weightx = 3;
-        gbc.fill=GridBagConstraints.HORIZONTAL;
+        gbc.fill = GridBagConstraints.HORIZONTAL;
         panel.add(proxyPauseHTTPSample, gbc.clone());
         gbc.weightx = 1;
         gbc.gridx = 0;



Mime
View raw message