Skip to content

Commit

Permalink
fix nits
Browse files Browse the repository at this point in the history
Signed-off-by: Antonio Pedro <[email protected]>
  • Loading branch information
antonio-pedro99 committed Jul 22, 2024
1 parent 1c5ef6e commit 6744a53
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public List<ProducerRecord<byte[], byte[]>> toKafkaRecords(String kafkaTopic, In
JsonNode json = JsonUtils.bytesToJson(messages);
ArrayNode jsonArray = (ArrayNode) json.get("records");

for (JsonNode jsonObj : jsonArray) {
for (JsonNode jsonObj: jsonArray) {
records.add(toKafkaRecord(kafkaTopic, partition, JsonUtils.jsonToBytes(jsonObj)));
}
return records;
Expand Down Expand Up @@ -106,7 +106,7 @@ public byte[] toMessages(ConsumerRecords<byte[], byte[]> records) {

ArrayNode headers = JsonUtils.createArrayNode();

for (Header kafkaHeader : record.headers()) {
for (Header kafkaHeader: record.headers()) {
ObjectNode header = JsonUtils.createObjectNode();

header.put("key", kafkaHeader.key());
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/io/strimzi/kafka/bridge/http/ProducerIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ void sendSimpleMessageToPartition(VertxTestContext context) throws InterruptedEx
KafkaFuture<Void> future = adminClientFacade.createTopic(topic, 2, 1);

String value = "message-value";

int partition = 1;

JsonArray records = new JsonArray();
Expand Down Expand Up @@ -208,7 +209,6 @@ void sendSimpleMessageWithKey(VertxTestContext context) throws InterruptedExcept
KafkaFuture<Void> future = adminClientFacade.createTopic(topic, 2, 1);

String value = "message-value";

String key = "my-key";

JsonArray records = new JsonArray();
Expand Down

0 comments on commit 6744a53

Please sign in to comment.