nifi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bbe...@apache.org
Subject [nifi] branch master updated: NIFI-6798: When checking that referenced Controller Services are valid, use ValidationContext.getProperties() rather than ComponentNode.getSupportedPropertyDescriptors() because the latter does not include dynamic properties
Date Fri, 25 Oct 2019 13:53:04 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new 81fc276  NIFI-6798: When checking that referenced Controller Services are valid,
use ValidationContext.getProperties() rather than ComponentNode.getSupportedPropertyDescriptors()
because the latter does not include dynamic properties
81fc276 is described below

commit 81fc2768c9d6cb61be10ba5adc805517c29816c7
Author: Mark Payne <markap14@hotmail.com>
AuthorDate: Tue Oct 22 15:34:06 2019 -0400

    NIFI-6798: When checking that referenced Controller Services are valid, use ValidationContext.getProperties()
rather than ComponentNode.getSupportedPropertyDescriptors() because the latter does not include
dynamic properties
    
    This closes #3836.
    
    Signed-off-by: Bryan Bende <bbende@apache.org>
---
 .../main/java/org/apache/nifi/controller/AbstractComponentNode.java | 6 +++---
 1 file changed, 3 insertions(+), 3 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 ea29d9e..974c5ad 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
@@ -676,13 +676,13 @@ public abstract class AbstractComponentNode implements ComponentNode
{
     }
 
     protected final Collection<ValidationResult> validateReferencedControllerServices(final
ValidationContext validationContext) {
-        final List<PropertyDescriptor> supportedDescriptors = getComponent().getPropertyDescriptors();
-        if (supportedDescriptors == null) {
+        final Set<PropertyDescriptor> propertyDescriptors = validationContext.getProperties().keySet();
+        if (propertyDescriptors == null) {
             return Collections.emptyList();
         }
 
         final Collection<ValidationResult> validationResults = new ArrayList<>();
-        for (final PropertyDescriptor descriptor : supportedDescriptors) {
+        for (final PropertyDescriptor descriptor : propertyDescriptors) {
             if (descriptor.getControllerServiceDefinition() == null) {
                 // skip properties that aren't for a controller service
                 continue;


Mime
View raw message