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 1f17592604 fix: pass default value for required TestBean properties 
when they are not initialized
1f17592604 is described below

commit 1f17592604e816b9fb7af0cd89e46d425efb31ca
Author: Vladimir Sitnikov <[email protected]>
AuthorDate: Wed Nov 26 03:31:14 2025 +0500

    fix: pass default value for required TestBean properties when they are not 
initialized
---
 .../main/java/org/apache/jmeter/testbeans/TestBeanHelper.java    | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git 
a/src/core/src/main/java/org/apache/jmeter/testbeans/TestBeanHelper.java 
b/src/core/src/main/java/org/apache/jmeter/testbeans/TestBeanHelper.java
index 0148e2a732..7abffe197d 100644
--- a/src/core/src/main/java/org/apache/jmeter/testbeans/TestBeanHelper.java
+++ b/src/core/src/main/java/org/apache/jmeter/testbeans/TestBeanHelper.java
@@ -186,12 +186,9 @@ public class TestBeanHelper {
         else if(jprop instanceof MultiProperty multiProperty)
         {
             value = 
unwrapCollection(multiProperty,(String)desc.getValue(TableEditor.CLASSNAME));
-        }
-        // value was not provided, and this is allowed
-        else if (jprop instanceof NullProperty &&
-                // use negative condition so missing (null) value is treated 
as FALSE
-                ! 
Boolean.TRUE.equals(desc.getValue(GenericTestBeanCustomizer.NOT_UNDEFINED))) {
-            value=null;
+        } else if (jprop instanceof NullProperty) {
+            value = 
Boolean.TRUE.equals(desc.getValue(GenericTestBeanCustomizer.NOT_UNDEFINED))
+                    ? desc.getValue(GenericTestBeanCustomizer.DEFAULT) : null;
         } else {
             value = Converter.convert(jprop.getStringValue(), type);
         }

Reply via email to