From 064e15b7be0876a51f286b7a08c7023fc2d26cea Mon Sep 17 00:00:00 2001 From: Mark Payne Date: Thu, 22 Feb 2024 16:40:12 -0500 Subject: [PATCH] NIFI-12834 Fixed ConsumeSlack NPE for latestReply field This closes #8446 Signed-off-by: David Handermann --- .../apache/nifi/processors/slack/consume/ConsumeChannel.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nifi-nar-bundles/nifi-slack-bundle/nifi-slack-processors/src/main/java/org/apache/nifi/processors/slack/consume/ConsumeChannel.java b/nifi-nar-bundles/nifi-slack-bundle/nifi-slack-processors/src/main/java/org/apache/nifi/processors/slack/consume/ConsumeChannel.java index 5dac540888..6533634fbb 100644 --- a/nifi-nar-bundles/nifi-slack-bundle/nifi-slack-processors/src/main/java/org/apache/nifi/processors/slack/consume/ConsumeChannel.java +++ b/nifi-nar-bundles/nifi-slack-bundle/nifi-slack-processors/src/main/java/org/apache/nifi/processors/slack/consume/ConsumeChannel.java @@ -634,7 +634,8 @@ public class ConsumeChannel { // If the message's latest reply is before our cutoff, don't bother polling for replies if (oldestTs != null) { - if (new SlackTimestamp(message.getLatestReply()).before(oldestTs)) { + final String latestReply = message.getLatestReply(); + if (latestReply != null && new SlackTimestamp(latestReply).before(oldestTs)) { return Collections.emptyList(); } }