You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by bb...@apache.org on 2020/10/27 13:02:00 UTC
[nifi] branch main updated: NIFI-7944: When checking if a Component
can reference a Controller Service,
NiFi would sometimes fail to find that Controller Service because it was
looking based on the wrong Process Group. Fixed that. (#4619)
This is an automated email from the ASF dual-hosted git repository.
bbende 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 67d1b73 NIFI-7944: When checking if a Component can reference a Controller Service, NiFi would sometimes fail to find that Controller Service because it was looking based on the wrong Process Group. Fixed that. (#4619)
67d1b73 is described below
commit 67d1b73a85946fda246d358a1cb7dec1ebd463a6
Author: markap14 <ma...@hotmail.com>
AuthorDate: Tue Oct 27 08:57:05 2020 -0400
NIFI-7944: When checking if a Component can reference a Controller Service, NiFi would sometimes fail to find that Controller Service because it was looking based on the wrong Process Group. Fixed that. (#4619)
---
.../src/main/java/org/apache/nifi/groups/StandardProcessGroup.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java
index 1345791..a0a9721 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java
@@ -959,7 +959,7 @@ public final class StandardProcessGroup implements ProcessGroup {
final Class<? extends ControllerService> serviceClass = propertyDescriptor.getControllerServiceDefinition();
if (serviceClass != null) {
- final boolean validReference = isValidServiceReference(serviceId, serviceClass);
+ final boolean validReference = isValidServiceReference(serviceId, serviceClass, component);
final ControllerServiceNode serviceNode = controllerServiceProvider.getControllerServiceNode(serviceId);
if (serviceNode != null) {
if (validReference) {
@@ -972,8 +972,8 @@ public final class StandardProcessGroup implements ProcessGroup {
}
}
- private boolean isValidServiceReference(final String serviceId, final Class<? extends ControllerService> serviceClass) {
- final Set<String> validServiceIds = controllerServiceProvider.getControllerServiceIdentifiers(serviceClass, getIdentifier());
+ private boolean isValidServiceReference(final String serviceId, final Class<? extends ControllerService> serviceClass, final ComponentNode component) {
+ final Set<String> validServiceIds = controllerServiceProvider.getControllerServiceIdentifiers(serviceClass, component.getProcessGroupIdentifier());
return validServiceIds.contains(serviceId);
}