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)

This commit is contained in:
markap14 2020-07-07 16:38:42 -04:00 committed by GitHub
parent 43fb57e7bb
commit e17db80514
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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);
}