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 2024/01/25 02:01:44 UTC
(nifi) branch support/nifi-1.x updated: NIFI-12387 Initialize Controller Service Comments with Empty String
This is an automated email from the ASF dual-hosted git repository.
exceptionfactory pushed a commit to branch support/nifi-1.x
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/support/nifi-1.x by this push:
new 7f0cedf6b6 NIFI-12387 Initialize Controller Service Comments with Empty String
7f0cedf6b6 is described below
commit 7f0cedf6b6ac4a5858fc6a3297f4bdbb9668901e
Author: Nissim Shiman <ns...@yahoo.com>
AuthorDate: Fri Jan 19 15:40:06 2024 +0000
NIFI-12387 Initialize Controller Service Comments with Empty String
The empty string allows controller service configuration to be saved without flow
configuration history recording a configuration change for comments.
This closes #8275
Signed-off-by: David Handermann <ex...@apache.org>
(cherry picked from commit 2e3f83eb54cbc040b5a1da5bce9a74a558f08ea4)
---
.../apache/nifi/controller/service/StandardControllerServiceNode.java | 1 +
.../src/test/java/org/apache/nifi/controller/TestFlowController.java | 2 ++
2 files changed, 3 insertions(+)
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceNode.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceNode.java
index 2349c8a343..62cd739141 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceNode.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceNode.java
@@ -133,6 +133,7 @@ public class StandardControllerServiceNode extends AbstractComponentNode impleme
this.active = new AtomicBoolean();
setControllerServiceAndProxy(implementation, proxiedControllerService, invocationHandler);
stateTransition = new ServiceStateTransition(this);
+ this.comment = "";
}
@Override
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/controller/TestFlowController.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/controller/TestFlowController.java
index db281d5b7f..da12f075b8 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/controller/TestFlowController.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/java/org/apache/nifi/controller/TestFlowController.java
@@ -928,6 +928,7 @@ public class TestFlowController {
assertEquals(ServiceA.class.getSimpleName(), controllerServiceNode.getComponentType());
assertEquals(ServiceA.class.getCanonicalName(), controllerServiceNode.getComponent().getClass().getCanonicalName());
assertEquals(LogLevel.WARN, controllerServiceNode.getBulletinLevel());
+ assertEquals("", controllerServiceNode.getComments());
controller.getReloadComponent().reload(controllerServiceNode, ServiceB.class.getName(), coordinate, Collections.emptySet());
@@ -936,6 +937,7 @@ public class TestFlowController {
assertEquals(id, controllerServiceNode.getComponent().getIdentifier());
assertEquals(coordinate.getCoordinate(), controllerServiceNode.getBundleCoordinate().getCoordinate());
assertEquals(LogLevel.WARN, controllerServiceNode.getBulletinLevel());
+ assertEquals("", controllerServiceNode.getComments());
// in this test we happened to change between two services that have different canonical class names
// but in the running application the DAO layer would call verifyCanUpdateBundle and would prevent this so