You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by fs...@apache.org on 2026/03/20 09:48:42 UTC

(jmeter) branch master updated: Skip checking empty filenames for result collectors

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 471a9ff995 Skip checking empty filenames for result collectors
471a9ff995 is described below

commit 471a9ff99576bf1fe8288d1530513ba1e9cfd6a5
Author: Felix Schumacher <fe...@internetallee.de>
AuthorDate: Wed Mar 11 16:58:44 2026 +0100

    Skip checking empty filenames for result collectors
    
    On Java 25 the semantic of checking existance for empty filenames has been changed.
    See https://bugs.openjdk.org/browse/JDK-8024695
    The old behaviour was used in JMeter to skip empty filenames in result collectors.
    This patch should resolve the bug while maintaining backwards compatibility.
    
    This should fix #6611.
---
 .../src/main/java/org/apache/jmeter/gui/action/AbstractAction.java  | 4 ++++
 xdocs/changes.xml                                                   | 6 ++++++
 2 files changed, 10 insertions(+)

diff --git a/src/core/src/main/java/org/apache/jmeter/gui/action/AbstractAction.java b/src/core/src/main/java/org/apache/jmeter/gui/action/AbstractAction.java
index 898dc05456..eec6bd108b 100644
--- a/src/core/src/main/java/org/apache/jmeter/gui/action/AbstractAction.java
+++ b/src/core/src/main/java/org/apache/jmeter/gui/action/AbstractAction.java
@@ -89,6 +89,10 @@ public abstract class AbstractAction implements Command {
         SearchByClass<ResultCollector> resultListeners = new SearchByClass<>(ResultCollector.class);
         tree.traverse(resultListeners);
         for (ResultCollector rc : resultListeners.getSearchResults()) {
+            if ("".equals(rc.getFilename())) {
+                log.debug("Skip result collector ({}) as it has empty filename", rc.getName());
+                continue;
+            }
             File f = new File(rc.getFilename());
             if (f.exists()) {
                 switch (actionOnFile) {
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 17d8185c33..ae1bf09504 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -58,6 +58,7 @@ Summary
 </p>
 <ul>
 <li><a href="#Changes">Changes</a></li>
+<li><a href="#Bug fixes">Bug fixes</a></li>
 </ul>
 
   <ch_section>Changes</ch_section>
@@ -76,6 +77,11 @@ Summary
     <li><pr>5891</pr>Skip Internet Explorer 6-9 conditional comment processing when fetching resource links</li>
   </ul>
 
+  <ch_section>Bug fixes</ch_section>
+  <h3>General</h3>
+  <ul>
+    <li><pr>6654</pr><issue>6611</issue>Support JDK 25 and above for result collectors with empty file names</li>
+  </ul>
  <!--  =================== Thanks =================== -->
 
 <ch_section>Thanks</ch_section>