nifi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ozhurakou...@apache.org
Subject [2/9] nifi git commit: NIFI-1684 fixed NPE in PutKafka when retrieving key attribute bytes
Date Mon, 04 Apr 2016 17:58:20 GMT
NIFI-1684 fixed NPE in PutKafka when retrieving key attribute bytes

Signed-off-by: joewitt <joewitt@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/f0546d04
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/f0546d04
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/f0546d04

Branch: refs/heads/support/nifi-0.6.x
Commit: f0546d04872d202043834ff398c31420347f95b7
Parents: be5c95e
Author: Oleg Zhurakousky <oleg@suitcase.io>
Authored: Thu Mar 24 14:35:40 2016 -0400
Committer: Oleg Zhurakousky <oleg@suitcase.io>
Committed: Mon Apr 4 13:52:23 2016 -0400

----------------------------------------------------------------------
 .../src/main/java/org/apache/nifi/processors/kafka/PutKafka.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/f0546d04/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-processors/src/main/java/org/apache/nifi/processors/kafka/PutKafka.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-processors/src/main/java/org/apache/nifi/processors/kafka/PutKafka.java
b/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-processors/src/main/java/org/apache/nifi/processors/kafka/PutKafka.java
index 4510038..513f4f3 100644
--- a/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-processors/src/main/java/org/apache/nifi/processors/kafka/PutKafka.java
+++ b/nifi-nar-bundles/nifi-kafka-bundle/nifi-kafka-processors/src/main/java/org/apache/nifi/processors/kafka/PutKafka.java
@@ -408,7 +408,7 @@ public class PutKafka extends AbstractProcessor {
         String failedSegmentsString = flowFile.getAttribute(ATTR_FAILED_SEGMENTS);
         if (flowFile.getAttribute(ATTR_PROC_ID) != null && flowFile.getAttribute(ATTR_PROC_ID).equals(this.getIdentifier())
&& failedSegmentsString != null) {
             topicName = flowFile.getAttribute(ATTR_TOPIC);
-            key = flowFile.getAttribute(ATTR_KEY).getBytes();
+            key = flowFile.getAttribute(ATTR_KEY) == null ? null : flowFile.getAttribute(ATTR_KEY).getBytes();
             delimiterPattern = flowFile.getAttribute(ATTR_DELIMITER);
         } else {
             failedSegmentsString = null;


Mime
View raw message