NIFI-13608 - Handle NPE from Empty All Queues when there is no queue (#9527)

This commit is contained in:
Pierre Villard 2024-11-15 20:36:26 +01:00 committed by GitHub
parent 9708f05b9c
commit 461fdd9f6f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 0 deletions

View File

@ -1573,6 +1573,14 @@ public final class StandardProcessGroup implements ProcessGroup {
List<Connection> connections = findAllConnections(this);
DropFlowFileRequest aggregateDropFlowFileStatus = new DropFlowFileRequest(dropRequestId);
if (connections.isEmpty()) {
aggregateDropFlowFileStatus.setState(DropFlowFileState.COMPLETE);
aggregateDropFlowFileStatus.setCurrentSize(new QueueSize(0, 0L));
aggregateDropFlowFileStatus.setOriginalSize(new QueueSize(0, 0L));
return aggregateDropFlowFileStatus;
}
aggregateDropFlowFileStatus.setState(null);
AtomicBoolean processedAtLeastOne = new AtomicBoolean(false);