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

bbende 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 e17db80  NIFI-7607: Fixed bug that caused the wrong Controller Service 
to be de-referenced when a component that used to reference a Controller 
Service is changed to reference a different Controller Service (#4391)
e17db80 is described below

commit e17db80514870077ac379186b73762833dcacff1
Author: markap14 <[email protected]>
AuthorDate: Tue Jul 7 16:38:42 2020 -0400

    NIFI-7607: Fixed bug that caused the wrong Controller Service to be 
de-referenced when a component that used to reference a Controller Service is 
changed to reference a different Controller Service (#4391)
---
 .../main/java/org/apache/nifi/controller/AbstractComponentNode.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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 a1f5af1..a7db9ec 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
@@ -347,7 +347,8 @@ public abstract class AbstractComponentNode implements 
ComponentNode {
         if (!propertyConfiguration.equals(oldConfiguration)) {
             if (descriptor.getControllerServiceDefinition() != null) {
                 if (oldConfiguration != null) {
-                    final ControllerServiceNode oldNode = 
serviceProvider.getControllerServiceNode(effectiveValue);
+                    final String oldEffectiveValue = 
oldConfiguration.getEffectiveValue(getParameterContext());
+                    final ControllerServiceNode oldNode = 
serviceProvider.getControllerServiceNode(oldEffectiveValue);
                     if (oldNode != null) {
                         oldNode.removeReference(this, descriptor);
                     }

Reply via email to