From 2cf0f3f789d9580e4ad2300e95eb35b27f4ffa1c Mon Sep 17 00:00:00 2001 From: Adrian Sobolewski Date: Wed, 18 Oct 2023 14:58:36 +0200 Subject: [PATCH] #1569 | Import order fix. --- .../ReadMetricsTrackingRawSchemaClient.java | 7 ++++--- .../config/SchemaRepositoryConfiguration.java | 3 ++- .../tech/hermes/schema/RawSchemaClient.java | 5 +++-- .../SchemaRegistryRawSchemaAdminClient.java | 3 ++- .../confluent/SchemaRegistryRawSchemaClient.java | 15 ++++++++------- 5 files changed, 19 insertions(+), 14 deletions(-) diff --git a/hermes-common/src/main/java/pl/allegro/tech/hermes/common/schema/ReadMetricsTrackingRawSchemaClient.java b/hermes-common/src/main/java/pl/allegro/tech/hermes/common/schema/ReadMetricsTrackingRawSchemaClient.java index 16fa089de8..21c6f709be 100644 --- a/hermes-common/src/main/java/pl/allegro/tech/hermes/common/schema/ReadMetricsTrackingRawSchemaClient.java +++ b/hermes-common/src/main/java/pl/allegro/tech/hermes/common/schema/ReadMetricsTrackingRawSchemaClient.java @@ -1,8 +1,5 @@ package pl.allegro.tech.hermes.common.schema; -import java.util.List; -import java.util.Optional; -import java.util.function.Supplier; import pl.allegro.tech.hermes.api.RawSchemaWithMetadata; import pl.allegro.tech.hermes.api.TopicName; import pl.allegro.tech.hermes.common.metric.MetricsFacade; @@ -12,6 +9,10 @@ import pl.allegro.tech.hermes.schema.SchemaId; import pl.allegro.tech.hermes.schema.SchemaVersion; +import java.util.List; +import java.util.Optional; +import java.util.function.Supplier; + public class ReadMetricsTrackingRawSchemaClient implements RawSchemaClient { private final MetricsFacade metricsFacade; protected final RawSchemaClient rawSchemaClient; diff --git a/hermes-management/src/main/java/pl/allegro/tech/hermes/management/config/SchemaRepositoryConfiguration.java b/hermes-management/src/main/java/pl/allegro/tech/hermes/management/config/SchemaRepositoryConfiguration.java index 81d8c45929..220328356f 100644 --- a/hermes-management/src/main/java/pl/allegro/tech/hermes/management/config/SchemaRepositoryConfiguration.java +++ b/hermes-management/src/main/java/pl/allegro/tech/hermes/management/config/SchemaRepositoryConfiguration.java @@ -4,7 +4,6 @@ import com.fasterxml.jackson.jakarta.rs.json.JacksonJsonProvider; import jakarta.ws.rs.client.Client; import jakarta.ws.rs.client.ClientBuilder; -import java.net.URI; import org.apache.avro.Schema; import org.glassfish.jersey.client.ClientConfig; import org.glassfish.jersey.client.ClientProperties; @@ -30,6 +29,8 @@ import pl.allegro.tech.hermes.schema.resolver.DefaultSchemaRepositoryInstanceResolver; import pl.allegro.tech.hermes.schema.resolver.SchemaRepositoryInstanceResolver; +import java.net.URI; + import static pl.allegro.tech.hermes.schema.SubjectNamingStrategy.qualifiedName; @Configuration diff --git a/hermes-schema/src/main/java/pl/allegro/tech/hermes/schema/RawSchemaClient.java b/hermes-schema/src/main/java/pl/allegro/tech/hermes/schema/RawSchemaClient.java index 511b0a0015..fe86d3fd14 100644 --- a/hermes-schema/src/main/java/pl/allegro/tech/hermes/schema/RawSchemaClient.java +++ b/hermes-schema/src/main/java/pl/allegro/tech/hermes/schema/RawSchemaClient.java @@ -1,10 +1,11 @@ package pl.allegro.tech.hermes.schema; -import java.util.List; -import java.util.Optional; import pl.allegro.tech.hermes.api.RawSchemaWithMetadata; import pl.allegro.tech.hermes.api.TopicName; +import java.util.List; +import java.util.Optional; + public interface RawSchemaClient { Optional getRawSchemaWithMetadata(TopicName topic, SchemaVersion version); diff --git a/hermes-schema/src/main/java/pl/allegro/tech/hermes/schema/confluent/SchemaRegistryRawSchemaAdminClient.java b/hermes-schema/src/main/java/pl/allegro/tech/hermes/schema/confluent/SchemaRegistryRawSchemaAdminClient.java index 32f98c786b..d439e9f68f 100644 --- a/hermes-schema/src/main/java/pl/allegro/tech/hermes/schema/confluent/SchemaRegistryRawSchemaAdminClient.java +++ b/hermes-schema/src/main/java/pl/allegro/tech/hermes/schema/confluent/SchemaRegistryRawSchemaAdminClient.java @@ -4,7 +4,6 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; -import java.io.IOException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import pl.allegro.tech.hermes.api.RawSchema; @@ -15,6 +14,8 @@ import pl.allegro.tech.hermes.schema.SubjectNamingStrategy; import pl.allegro.tech.hermes.schema.resolver.SchemaRepositoryInstanceResolver; +import java.io.IOException; + import static jakarta.ws.rs.core.Response.Status.BAD_REQUEST; import static jakarta.ws.rs.core.Response.Status.Family.SUCCESSFUL; diff --git a/hermes-schema/src/main/java/pl/allegro/tech/hermes/schema/confluent/SchemaRegistryRawSchemaClient.java b/hermes-schema/src/main/java/pl/allegro/tech/hermes/schema/confluent/SchemaRegistryRawSchemaClient.java index 3b3fc7e01c..0e0d6ab074 100644 --- a/hermes-schema/src/main/java/pl/allegro/tech/hermes/schema/confluent/SchemaRegistryRawSchemaClient.java +++ b/hermes-schema/src/main/java/pl/allegro/tech/hermes/schema/confluent/SchemaRegistryRawSchemaClient.java @@ -3,12 +3,6 @@ import jakarta.ws.rs.client.Entity; import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; -import java.util.Arrays; -import java.util.Collections; -import java.util.Comparator; -import java.util.List; -import java.util.Optional; -import java.util.stream.Collectors; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import pl.allegro.tech.hermes.api.RawSchema; @@ -21,8 +15,15 @@ import pl.allegro.tech.hermes.schema.SubjectNamingStrategy; import pl.allegro.tech.hermes.schema.resolver.SchemaRepositoryInstanceResolver; +import java.util.Arrays; +import java.util.Collections; +import java.util.Comparator; +import java.util.List; +import java.util.Optional; +import java.util.stream.Collectors; + /** - * This implementation of RawSchemaClient is compatible with Confluent Schema Registry API + * This implementation of RawSchemaClient is compatible with Confluent Schema Registry API. */ public class SchemaRegistryRawSchemaClient implements RawSchemaClient {