From 5cdb582710244cc83784e9943c303e8facd5c38a Mon Sep 17 00:00:00 2001 From: maheshnikam <55378196+nikam14@users.noreply.github.com> Date: Thu, 26 Sep 2024 15:07:44 +0530 Subject: [PATCH] Update ContextImpl.java --- .../org/apache/pulsar/functions/instance/ContextImpl.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/ContextImpl.java b/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/ContextImpl.java index 2ea2cba5b5ea0..d68311d156e9b 100644 --- a/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/ContextImpl.java +++ b/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/ContextImpl.java @@ -721,7 +721,8 @@ public void setInputConsumers(List> inputConsumers) { topicConsumers.putIfAbsent(TopicName.get(consumer.getTopic()), consumer); if (consumer.getTopic().contains("-partition-")) { partionedTopicPresent = true; - }}); + } + }); } private void reloadConsumersFromMultiTopicsConsumers() { @@ -738,7 +739,8 @@ private void reloadConsumersFromMultiTopicsConsumers() { topicConsumers.putIfAbsent(TopicName.get(c.getTopic()), c); if (c.getTopic().contains("-partition-")) { partionedTopicPresent = true; - }}); + } + }); } // returns null if consumer not found @@ -761,7 +763,7 @@ Consumer getConsumer(String topic, int partition) throws PulsarClientExceptio throw new PulsarClientException("Getting consumer is not supported"); } - if (partition != 0 && partionedTopicPresent == false) { + if ((partition != 0) && (partionedTopicPresent == false)) { throw new PulsarClientException("No Partioned topic present"); }