ferencerdei commented on code in PR #7998:
URL: https://github.com/apache/nifi/pull/7998#discussion_r1386754850
##########
minifi/minifi-commons/minifi-commons-framework/src/main/java/org/apache/nifi/minifi/commons/service/FlowEnrichService.java:
##########
@@ -103,10 +107,12 @@ public byte[] enrichFlow(byte[] flowCandidate) {
rootGroup.setInstanceIdentifier(randomUUID().toString());
}
+ rootGroup.getControllerServices().forEach(cs ->
cs.setScheduledState(ENABLED));
+
Optional<VersionedControllerService> commonSslControllerService =
createCommonSslControllerService();
commonSslControllerService
.ifPresent(sslControllerService -> {
- List<VersionedControllerService> currentControllerServices =
ofNullable(versionedDataflow.getControllerServices()).orElseGet(ArrayList::new);
+ List<VersionedControllerService> currentControllerServices =
new ArrayList<>(versionedDataflow.getControllerServices());
Review Comment:
I wanted to avoid passing the reference for the original list, but maybe you
are right. As this object doesn't exist outside of this class we can safely use
the value directly. I'm going to update this and the other as well.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]