From 9969bed104565991fd7a04e5e1fb45df740deffa Mon Sep 17 00:00:00 2001 From: Paolo Patierno Date: Sat, 11 Jan 2025 16:26:01 +0100 Subject: [PATCH] Removed unused method (#960) Signed-off-by: Paolo Patierno --- .../kafka/bridge/http/HttpAdminBridgeEndpoint.java | 2 +- .../io/strimzi/kafka/bridge/http/HttpBridge.java | 12 ------------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/main/java/io/strimzi/kafka/bridge/http/HttpAdminBridgeEndpoint.java b/src/main/java/io/strimzi/kafka/bridge/http/HttpAdminBridgeEndpoint.java index 8719c5c6..8b0763e3 100644 --- a/src/main/java/io/strimzi/kafka/bridge/http/HttpAdminBridgeEndpoint.java +++ b/src/main/java/io/strimzi/kafka/bridge/http/HttpAdminBridgeEndpoint.java @@ -150,7 +150,7 @@ public void doGetTopic(RoutingContext routingContext) { ArrayNode partitionsArray = JsonUtils.createArrayNode(); root.put("name", topicName); Collection configEntries = configDescriptions.values().iterator().next().entries(); - if (configEntries.size() > 0) { + if (!configEntries.isEmpty()) { ObjectNode configs = JsonUtils.createObjectNode(); configEntries.forEach(configEntry -> configs.put(configEntry.name(), configEntry.value())); root.set("configs", configs); diff --git a/src/main/java/io/strimzi/kafka/bridge/http/HttpBridge.java b/src/main/java/io/strimzi/kafka/bridge/http/HttpBridge.java index ac89c813..fbebb714 100644 --- a/src/main/java/io/strimzi/kafka/bridge/http/HttpBridge.java +++ b/src/main/java/io/strimzi/kafka/bridge/http/HttpBridge.java @@ -639,18 +639,6 @@ private void closeConnectionEndpoint(HttpConnection connection) { } } - private EmbeddedFormat contentTypeToFormat(String contentType) { - switch (contentType) { - case BridgeContentType.KAFKA_JSON_BINARY: - return EmbeddedFormat.BINARY; - case BridgeContentType.KAFKA_JSON_JSON: - return EmbeddedFormat.JSON; - case BridgeContentType.KAFKA_JSON_TEXT: - return EmbeddedFormat.TEXT; - } - throw new IllegalArgumentException(contentType); - } - private boolean isAlive() { return this.isReady; }