This is an automated email from the ASF dual-hosted git repository.

exceptionfactory pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git

commit b24973960fa734a0fec0f3791b94db316cb1dd61
Author: exceptionfactory <exceptionfact...@apache.org>
AuthorDate: Mon Jun 24 15:44:51 2024 -0500

    NIFI-11259 Used asAllowableValue() from Failure Strategy
---
 .../src/main/java/org/apache/nifi/kafka/processors/PublishKafka.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/nifi-extension-bundles/nifi-kafka-bundle/nifi-kafka-processors/src/main/java/org/apache/nifi/kafka/processors/PublishKafka.java
 
b/nifi-extension-bundles/nifi-kafka-bundle/nifi-kafka-processors/src/main/java/org/apache/nifi/kafka/processors/PublishKafka.java
index 4c41bcd246..e1ccd6c5c5 100644
--- 
a/nifi-extension-bundles/nifi-kafka-bundle/nifi-kafka-processors/src/main/java/org/apache/nifi/kafka/processors/PublishKafka.java
+++ 
b/nifi-extension-bundles/nifi-kafka-bundle/nifi-kafka-processors/src/main/java/org/apache/nifi/kafka/processors/PublishKafka.java
@@ -406,8 +406,8 @@ public class PublishKafka extends AbstractProcessor 
implements KafkaPublishCompo
     }
 
     private void routeFailureStrategy(final ProcessContext context, final 
ProcessSession session, final List<FlowFile> flowFiles) {
-        final String strategy = 
context.getProperty(FAILURE_STRATEGY).getValue();
-        if (FailureStrategy.ROLLBACK.getValue().equals(strategy)) {
+        final FailureStrategy strategy = 
context.getProperty(FAILURE_STRATEGY).asAllowableValue(FailureStrategy.class);
+        if (FailureStrategy.ROLLBACK == strategy) {
             session.rollback();
             context.yield();
         } else {

Reply via email to