NIFI-1429: - Only attempting to verify disabling of a referenced controller service when it's active.

Signed-off-by: Mark Payne <markap14@hotmail.com>
This commit is contained in:
Matt Gilman 2016-01-22 15:59:27 -05:00 committed by Mark Payne
parent 8392b46597
commit 2f5f7b8302
1 changed files with 6 additions and 2 deletions

View File

@ -207,7 +207,9 @@ public class StandardControllerServiceProvider implements ControllerServiceProvi
final Set<ControllerServiceNode> serviceSet = new HashSet<>(toDisable);
for (final ControllerServiceNode nodeToDisable : toDisable) {
nodeToDisable.verifyCanDisable(serviceSet);
if (nodeToDisable.isActive()) {
nodeToDisable.verifyCanDisable(serviceSet);
}
}
Collections.reverse(toDisable);
@ -593,7 +595,9 @@ public class StandardControllerServiceProvider implements ControllerServiceProvi
final Set<ControllerServiceNode> serviceSet = new HashSet<>(toDisable);
for (final ControllerServiceNode nodeToDisable : toDisable) {
nodeToDisable.verifyCanDisable(serviceSet);
if (nodeToDisable.isActive()) {
nodeToDisable.verifyCanDisable(serviceSet);
}
}
}