mirror of https://github.com/apache/nifi.git
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:
parent
43fb57e7bb
commit
e17db80514
|
@ -347,7 +347,8 @@ public abstract class AbstractComponentNode implements ComponentNode {
|
||||||
if (!propertyConfiguration.equals(oldConfiguration)) {
|
if (!propertyConfiguration.equals(oldConfiguration)) {
|
||||||
if (descriptor.getControllerServiceDefinition() != null) {
|
if (descriptor.getControllerServiceDefinition() != null) {
|
||||||
if (oldConfiguration != 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) {
|
if (oldNode != null) {
|
||||||
oldNode.removeReference(this, descriptor);
|
oldNode.removeReference(this, descriptor);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue