jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject [jmeter] branch master updated: Freestyle format for names in (Default)SamplerCreator
Date Tue, 01 Sep 2020 12:58:01 GMT
This is an automated email from the ASF dual-hosted git repository.

fschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git


The following commit(s) were added to refs/heads/master by this push:
     new c280cf3  Freestyle format for names in (Default)SamplerCreator
c280cf3 is described below

commit c280cf351938899cbe996ef6563dbeca0940f90f
Author: Felix Schumacher <felix.schumacher@internetallee.de>
AuthorDate: Tue Sep 1 14:56:47 2020 +0200

    Freestyle format for names in (Default)SamplerCreator
    
    Initialize format string correctly when script recorder is
    created by hand instead of with a template.
    
    Bugzilla Id: 64696
    Relates to #595
---
 .../org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java  | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
b/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
index dc0cd53..a01dd58 100644
--- a/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
+++ b/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
@@ -61,6 +61,7 @@ import javax.swing.JTextField;
 import javax.swing.SwingUtilities;
 import javax.swing.Timer;
 
+import org.apache.commons.lang3.StringUtils;
 import org.apache.jmeter.control.Controller;
 import org.apache.jmeter.control.gui.LogicControllerGui;
 import org.apache.jmeter.control.gui.TreeNodeWrapper;
@@ -332,7 +333,10 @@ public class ProxyControlGui extends LogicControllerGui implements JMeterGUIComp
             model.setRegexMatch(regexMatch.isSelected());
             model.setContentTypeInclude(contentTypeInclude.getText());
             model.setContentTypeExclude(contentTypeExclude.getText());
-            model.setHttpSampleNameFormat(httpSampleNameFormat.getText());
+            httpSampleNameFormat.setEnabled(httpSampleNamingMode.getSelectedIndex() == 3);
+            if (StringUtils.isNotBlank(httpSampleNameFormat.getText())) {
+                model.setHttpSampleNameFormat(httpSampleNameFormat.getText());
+            }
             TreeNodeWrapper nw = (TreeNodeWrapper) targetNodes.getSelectedItem();
             if (nw == null) {
                 model.setTarget(null);


Mime
View raw message