Skip to content

Commit

Permalink
spotbugs happy
Browse files Browse the repository at this point in the history
  • Loading branch information
hussainkarafallah committed Aug 6, 2024
1 parent 3684259 commit e4dc338
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void messagesAreDecorateWithJambi() {
private void checkForHeader(SentMessage sentMessage, String key, String value) {
assertTrue(
StreamSupport.stream(sentMessage.getProducerRecord().headers().spliterator(), false)
.anyMatch(h -> h.key().equals(key) && value.equals(new String(h.value())))
.anyMatch(h -> h.key().equals(key) && value.equals(new String(h.value(), StandardCharsets.UTF_8)))
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.transferwise.kafka.tkms.api.ITkmsMessageDecorator;
import com.transferwise.kafka.tkms.api.TkmsMessage;
import com.transferwise.kafka.tkms.api.TkmsMessage.Header;
import java.nio.charset.StandardCharsets;
import java.util.List;
import org.springframework.stereotype.Component;

Expand All @@ -11,7 +12,7 @@ public class TestMessageDecorator implements ITkmsMessageDecorator {

@Override
public List<Header> getHeaders(TkmsMessage message) {
var h1 = new Header().setKey("tool").setValue("jambi".getBytes());
var h1 = new Header().setKey("tool").setValue("jambi".getBytes(StandardCharsets.UTF_8));
if (message.getKey() == null) {
return List.of();
}
Expand Down

0 comments on commit e4dc338

Please sign in to comment.