Skip to content

Commit

Permalink
fix(topicdata): produce empty header key lead to a header key with ""
Browse files Browse the repository at this point in the history
close #677
  • Loading branch information
tchiotludo committed Apr 20, 2021
1 parent b21bb8f commit add3228
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/org/akhq/repositories/RecordRepository.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.google.common.collect.ImmutableMap;
import io.micronaut.context.annotation.Value;
import io.micronaut.context.env.Environment;
import io.micronaut.core.util.StringUtils;
import io.micronaut.http.sse.Event;
import io.reactivex.Flowable;
import lombok.*;
Expand Down Expand Up @@ -456,6 +457,7 @@ private RecordMetadata produce(
(headers == null ? ImmutableMap.<String, String>of() : headers)
.entrySet()
.stream()
.filter(entry -> StringUtils.isNotEmpty(entry.getKey()))
.map(entry -> new RecordHeader(
entry.getKey(),
entry.getValue() == null ? null : entry.getValue().getBytes()
Expand Down

0 comments on commit add3228

Please sign in to comment.