You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ex...@apache.org on 2023/08/23 19:10:53 UTC

[nifi] branch main updated: NIFI-11978 Fix: NPE when trying to disable Management Controller Service

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

exceptionfactory 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 1e12800912 NIFI-11978 Fix: NPE when trying to disable Management Controller Service
1e12800912 is described below

commit 1e12800912ce0cd368e7827e9b50470ff5c1db18
Author: Tamas Palfy <tp...@apache.org>
AuthorDate: Tue Aug 22 20:27:25 2023 +0200

    NIFI-11978 Fix: NPE when trying to disable Management Controller Service
    
    This closes #7637
    
    Signed-off-by: David Handermann <ex...@apache.org>
---
 .../org/apache/nifi/web/dao/impl/StandardControllerServiceDAO.java   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardControllerServiceDAO.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardControllerServiceDAO.java
index 14e678ee0f..32eff8ba60 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardControllerServiceDAO.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/dao/impl/StandardControllerServiceDAO.java
@@ -284,7 +284,10 @@ public class StandardControllerServiceDAO extends ComponentDAO implements Contro
     public void verifyUpdateReferencingComponents(final String controllerServiceId, final ScheduledState scheduledState, final ControllerServiceState controllerServiceState) {
         final ControllerServiceNode controllerService = locateControllerService(controllerServiceId);
 
-        controllerService.getProcessGroup().verifyCanScheduleComponentsIndividually();
+        final ProcessGroup processGroup = controllerService.getProcessGroup();
+        if (processGroup != null) {
+            processGroup.verifyCanScheduleComponentsIndividually();
+        }
 
         if (controllerServiceState != null) {
             if (ControllerServiceState.ENABLED.equals(controllerServiceState)) {