Skip to content

Commit

Permalink
[Issue 3896] [pulsar-io] Fix NPE in ElasticSearchSink (apache#3899)
Browse files Browse the repository at this point in the history
* Fix NPE in ElasticSearchSink.

* Init by an empty string
  • Loading branch information
murong00 authored and merlimat committed Mar 26, 2019
1 parent fd8aa4f commit 52659ae
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public void write(Record<byte[]> record) {
}

public KeyValue<String, byte[]> extractKeyValue(Record<byte[]> record) {
String key = record.getKey().orElseGet(null);
String key = record.getKey().orElse("");
return new KeyValue<>(key, record.getValue());
}

Expand Down

0 comments on commit 52659ae

Please sign in to comment.