From 3a2b12d7c9919c8f3be2a01125ad60ca22fecc03 Mon Sep 17 00:00:00 2001 From: Mark Payne Date: Mon, 6 Apr 2015 17:59:07 -0400 Subject: [PATCH] NIFI-486: Fixed NPE that occurs if processor allows for controller service as optional property and no value set Signed-off-by: joewitt --- .../nifi/controller/scheduling/StandardProcessScheduler.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/scheduling/StandardProcessScheduler.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/scheduling/StandardProcessScheduler.java index 89850cc165..43e05dda1d 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/scheduling/StandardProcessScheduler.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/scheduling/StandardProcessScheduler.java @@ -297,7 +297,9 @@ public final class StandardProcessScheduler implements ProcessScheduler { final Class serviceDefinition = descriptor.getControllerServiceDefinition(); if ( serviceDefinition != null ) { final String serviceId = processContext.getProperty(descriptor).getValue(); - serviceIds.add(serviceId); + if ( serviceId != null ) { + serviceIds.add(serviceId); + } } }