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

mcgilman pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/main by this push:
     new d64574b565 NIFI-10682: When determining effective property values, 
ensure that we always use the up-to-date version of Property Descriptors (#6567)
d64574b565 is described below

commit d64574b56556b91905b91c781237343d50f083c9
Author: markap14 <[email protected]>
AuthorDate: Mon Oct 24 09:59:16 2022 -0400

    NIFI-10682: When determining effective property values, ensure that we 
always use the up-to-date version of Property Descriptors (#6567)
    
    This closes #6567
---
 .../java/org/apache/nifi/controller/AbstractComponentNode.java    | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/AbstractComponentNode.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/AbstractComponentNode.java
index 383bf0b3c2..6a930f4272 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/AbstractComponentNode.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/AbstractComponentNode.java
@@ -580,11 +580,15 @@ public abstract class AbstractComponentNode implements 
ComponentNode {
             final Map<PropertyDescriptor, String> props = new 
LinkedHashMap<>();
             for (final PropertyDescriptor descriptor : supported) {
                 if (descriptor != null) {
-                    props.put(descriptor, descriptor.getDefaultValue());
+                    final PropertyDescriptor upToDateDescriptor = 
getPropertyDescriptor(descriptor.getName());
+                    props.put(upToDateDescriptor, 
upToDateDescriptor.getDefaultValue());
                 }
             }
 
-            properties.forEach((descriptor, config) -> 
props.put(getPropertyDescriptor(descriptor.getName()), 
valueFunction.apply(descriptor, config)));
+            properties.forEach((descriptor, config) -> {
+                final PropertyDescriptor upToDateDescriptor = 
getPropertyDescriptor(descriptor.getName());
+                props.put(upToDateDescriptor, 
valueFunction.apply(upToDateDescriptor, config));
+            });
             return props;
         }
     }

Reply via email to