You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by vl...@apache.org on 2020/03/24 19:54:42 UTC

[jmeter] branch master updated: TestPlan UI: skip adding the entry to the classpath if the user clicks cancel

This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov 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 f243f4e  TestPlan UI: skip adding the entry to the classpath if the user clicks cancel
f243f4e is described below

commit f243f4e56b159103cf80946193371f6c4485e4e1
Author: Vladimir Sitnikov <si...@gmail.com>
AuthorDate: Tue Mar 24 22:51:32 2020 +0300

    TestPlan UI: skip adding the entry to the classpath if the user clicks cancel
---
 src/core/src/main/java/org/apache/jmeter/gui/util/FileListPanel.java | 5 ++++-
 xdocs/changes.xml                                                    | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/core/src/main/java/org/apache/jmeter/gui/util/FileListPanel.java b/src/core/src/main/java/org/apache/jmeter/gui/util/FileListPanel.java
index 004e1ce..919f0ff 100644
--- a/src/core/src/main/java/org/apache/jmeter/gui/util/FileListPanel.java
+++ b/src/core/src/main/java/org/apache/jmeter/gui/util/FileListPanel.java
@@ -205,7 +205,10 @@ public class FileListPanel extends JPanel implements ActionListener {
             chooser.setFileFilter(new JMeterFileFilter(new String[] { filetype }));
             chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
             chooser.setMultiSelectionEnabled(true);
-            chooser.showOpenDialog(GuiPackage.getInstance().getMainFrame());
+            if (chooser.showOpenDialog(GuiPackage.getInstance().getMainFrame()) !=
+                    JFileChooser.APPROVE_OPTION) {
+                return;
+            }
             File[] cfiles = chooser.getSelectedFiles();
             if (cfiles != null) {
                 for (File cfile : cfiles) {
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 40812b6..6975447 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -234,6 +234,7 @@ are gray. It is purely a UI change, and the behavior is not altered.
   <li><bug>64034</bug>Shell scripts fail if space in <code>JAVA_HOME</code> path. Contributed by ray7219 (ray7219 at hotmail.com)</li>
   <li><bug>63856</bug>Set <code>connectTime</code> on parent samples when using a transaction controller</li>
   <li><bug>64227</bug>Error when loading Templates on Windows</li>
+  <li>TestPlan UI: skip adding the entry to the classpath if the user clicks cance</li>
 </ul>
 
  <!--  =================== Thanks =================== -->