From 6ab4f8f95c38804d623b12599260cb13927e4770 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Apr 2024 07:59:44 +0000 Subject: [PATCH 1/2] 1.x: bump io.smallrye:smallrye-parent from 38 to 43 Bumps [io.smallrye:smallrye-parent](https://github.com/smallrye/smallrye-parent) from 38 to 43. - [Release notes](https://github.com/smallrye/smallrye-parent/releases) - [Commits](https://github.com/smallrye/smallrye-parent/commits) --- updated-dependencies: - dependency-name: io.smallrye:smallrye-parent dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 55c99c4e..30e61074 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ io.smallrye smallrye-parent - 38 + 43 io.smallrye.stork From 956a7dec20f3cf6250791e464184eff9766e4e88 Mon Sep 17 00:00:00 2001 From: Auri Munoz Date: Wed, 10 Apr 2024 11:21:46 +0200 Subject: [PATCH 2/2] Format files --- api/src/main/java/io/smallrye/stork/api/LoadBalancer.java | 2 +- .../smallrye/stork/api/NoServiceInstanceFoundException.java | 2 +- .../java/io/smallrye/stork/api/config/ConfigWithType.java | 2 +- .../io/smallrye/stork/api/config/LoadBalancerAttribute.java | 6 +++--- .../java/io/smallrye/stork/api/config/ServiceConfig.java | 4 ++-- .../stork/api/config/ServiceDiscoveryAttribute.java | 6 +++--- .../stork/api/config/ServiceRegistrarAttribute.java | 6 +++--- .../main/java/io/smallrye/stork/spi/ElementWithType.java | 2 +- .../java/io/smallrye/stork/spi/StorkInfrastructure.java | 6 +++--- .../io/smallrye/stork/impl/CachingServiceDiscovery.java | 2 +- .../java/io/smallrye/stork/test/ProgrammaticApiTest.java | 2 +- .../stork/loadbalancer/random/StickyLoadBalancer.java | 2 +- .../composite/CompositeServiceDiscovery.java | 2 +- .../composite/CompositeServiceDiscoveryTest.java | 2 +- .../stork/servicediscovery/consul/ConsulMetadataKey.java | 2 +- .../smallrye/stork/servicediscovery/dns/DnsMetadataKey.java | 2 +- .../stork/servicediscovery/eureka/EurekaMetadataKey.java | 2 +- .../StaticListServiceDiscoveryProgrammaticApiTest.java | 5 +++-- 18 files changed, 29 insertions(+), 28 deletions(-) diff --git a/api/src/main/java/io/smallrye/stork/api/LoadBalancer.java b/api/src/main/java/io/smallrye/stork/api/LoadBalancer.java index 60573c82..cb0c8cbc 100644 --- a/api/src/main/java/io/smallrye/stork/api/LoadBalancer.java +++ b/api/src/main/java/io/smallrye/stork/api/LoadBalancer.java @@ -14,7 +14,7 @@ public interface LoadBalancer { * Select a single {@link ServiceInstance} from the given list. * * @param serviceInstances instances to choose from - * + * * @return a ServiceInstance * * @throws NoServiceInstanceFoundException if the incoming collection is empty or all the service instances in the diff --git a/api/src/main/java/io/smallrye/stork/api/NoServiceInstanceFoundException.java b/api/src/main/java/io/smallrye/stork/api/NoServiceInstanceFoundException.java index 0a650782..fcc20a00 100644 --- a/api/src/main/java/io/smallrye/stork/api/NoServiceInstanceFoundException.java +++ b/api/src/main/java/io/smallrye/stork/api/NoServiceInstanceFoundException.java @@ -8,7 +8,7 @@ public class NoServiceInstanceFoundException extends RuntimeException { /** * Creates a new NoServiceInstanceFoundException. - * + * * @param message the error message */ public NoServiceInstanceFoundException(String message) { diff --git a/api/src/main/java/io/smallrye/stork/api/config/ConfigWithType.java b/api/src/main/java/io/smallrye/stork/api/config/ConfigWithType.java index 1bdd8479..9bb6a259 100644 --- a/api/src/main/java/io/smallrye/stork/api/config/ConfigWithType.java +++ b/api/src/main/java/io/smallrye/stork/api/config/ConfigWithType.java @@ -18,7 +18,7 @@ public interface ConfigWithType { /** * Load Balancer parameters. - * + * * @return map of parameters of the load balancer */ Map parameters(); diff --git a/api/src/main/java/io/smallrye/stork/api/config/LoadBalancerAttribute.java b/api/src/main/java/io/smallrye/stork/api/config/LoadBalancerAttribute.java index d871676d..d853b080 100644 --- a/api/src/main/java/io/smallrye/stork/api/config/LoadBalancerAttribute.java +++ b/api/src/main/java/io/smallrye/stork/api/config/LoadBalancerAttribute.java @@ -30,21 +30,21 @@ /** * Default value for the attribute. If not provided and user didn't set the value - null will be passed - * + * * @return the default value */ String defaultValue() default Constants.DEFAULT_VALUE; /** * Description of the attribute. Works best in the documentation if it starts with a capital letter and ends with period. - * + * * @return the description */ String description(); /** * Whether the attribute is mandatory or optional - * + * * @return true if the attribute is required, false otherwise */ boolean required() default false; diff --git a/api/src/main/java/io/smallrye/stork/api/config/ServiceConfig.java b/api/src/main/java/io/smallrye/stork/api/config/ServiceConfig.java index 7b012184..a4b53c4e 100644 --- a/api/src/main/java/io/smallrye/stork/api/config/ServiceConfig.java +++ b/api/src/main/java/io/smallrye/stork/api/config/ServiceConfig.java @@ -20,14 +20,14 @@ public interface ServiceConfig { /** * ServiceDiscovery configuration for the service - * + * * @return (required) service discovery configuration */ ConfigWithType serviceDiscovery(); /** * Whether the communication should use a secure connection (e.g. HTTPS) - * + * * @return true if SSL, TLS, etc. should be used for the communication * @deprecated Use the service discovery 'secure' attribute instead */ diff --git a/api/src/main/java/io/smallrye/stork/api/config/ServiceDiscoveryAttribute.java b/api/src/main/java/io/smallrye/stork/api/config/ServiceDiscoveryAttribute.java index 1c92df1e..fc26b455 100644 --- a/api/src/main/java/io/smallrye/stork/api/config/ServiceDiscoveryAttribute.java +++ b/api/src/main/java/io/smallrye/stork/api/config/ServiceDiscoveryAttribute.java @@ -31,21 +31,21 @@ /** * Default value for the attribute. If not provided and user didn't set the value - null will be passed - * + * * @return the default value */ String defaultValue() default Constants.DEFAULT_VALUE; /** * Description of the attribute. Works best in the documentation if it starts with a capital letter and ends with period. - * + * * @return the description */ String description(); /** * Whether the attribute is mandatory or optional - * + * * @return true if the attribute is required, false otherwise */ boolean required() default false; diff --git a/api/src/main/java/io/smallrye/stork/api/config/ServiceRegistrarAttribute.java b/api/src/main/java/io/smallrye/stork/api/config/ServiceRegistrarAttribute.java index 8a6e14bf..1333d2a8 100644 --- a/api/src/main/java/io/smallrye/stork/api/config/ServiceRegistrarAttribute.java +++ b/api/src/main/java/io/smallrye/stork/api/config/ServiceRegistrarAttribute.java @@ -31,21 +31,21 @@ /** * Default value for the attribute. If not provided and user didn't set the value - null will be passed - * + * * @return the default value */ String defaultValue() default Constants.DEFAULT_VALUE; /** * Description of the attribute. Works best in the documentation if it starts with a capital letter and ends with period. - * + * * @return the description */ String description(); /** * Whether the attribute is mandatory or optional - * + * * @return true if the attribute is required, false otherwise */ boolean required() default false; diff --git a/api/src/main/java/io/smallrye/stork/spi/ElementWithType.java b/api/src/main/java/io/smallrye/stork/spi/ElementWithType.java index 9058baf5..f4eb12ee 100644 --- a/api/src/main/java/io/smallrye/stork/spi/ElementWithType.java +++ b/api/src/main/java/io/smallrye/stork/spi/ElementWithType.java @@ -6,7 +6,7 @@ public interface ElementWithType { /** * Gets the type. - * + * * @return the type, must not be {@code null}, must not be blank */ String type(); diff --git a/api/src/main/java/io/smallrye/stork/spi/StorkInfrastructure.java b/api/src/main/java/io/smallrye/stork/spi/StorkInfrastructure.java index 9f67773a..b7c36c2b 100644 --- a/api/src/main/java/io/smallrye/stork/spi/StorkInfrastructure.java +++ b/api/src/main/java/io/smallrye/stork/spi/StorkInfrastructure.java @@ -4,16 +4,16 @@ /** * A provider for "utility" objects used by service discovery and load balancer implementations. - * + * * The default implementation, {@code DefaultStorkInfrastructure} provides objects created by the passed supplier. * Vendors can implement their own version of this class to provide custom objects. - * + * * E.g. Quarkus uses a single Vert.x instance throughout the project and overrides this to return this Vert.x instance */ public interface StorkInfrastructure { /** * Get an instance of a "utility" class - * + * * @param utilityClass class of the requested object * @param defaultSupplier should be used by the implementation to create an object if the environment doesn't provide one, * the result value can be cached. diff --git a/core/src/main/java/io/smallrye/stork/impl/CachingServiceDiscovery.java b/core/src/main/java/io/smallrye/stork/impl/CachingServiceDiscovery.java index d63216ac..3d3bc92b 100644 --- a/core/src/main/java/io/smallrye/stork/impl/CachingServiceDiscovery.java +++ b/core/src/main/java/io/smallrye/stork/impl/CachingServiceDiscovery.java @@ -52,7 +52,7 @@ public CachingServiceDiscovery(String refreshPeriod) { /*** * Configures the period to keep service instances in the cache. Elements will be refetched after the given period. * This method can be extended by the provider in order to change the logic for caching service instances. - * + * * @param uni service instances retrieved from backing discovery source * @return cached list of service instances in form of Uni */ diff --git a/core/src/test/java/io/smallrye/stork/test/ProgrammaticApiTest.java b/core/src/test/java/io/smallrye/stork/test/ProgrammaticApiTest.java index 7f4b0397..3a4467d8 100644 --- a/core/src/test/java/io/smallrye/stork/test/ProgrammaticApiTest.java +++ b/core/src/test/java/io/smallrye/stork/test/ProgrammaticApiTest.java @@ -84,7 +84,7 @@ void testInvalidConfig() { Stork.initialize(); assertThatThrownBy(() -> Stork.getInstance().defineIfAbsent(null, ServiceDefinition.of(new FakeConfiguration().withSecure("true"), new SingleConfiguration()))) - .isInstanceOf(IllegalArgumentException.class); + .isInstanceOf(IllegalArgumentException.class); assertThatThrownBy(() -> Stork.getInstance().defineIfAbsent("acme", ServiceDefinition.of(null, new SingleConfiguration()))).isInstanceOf(IllegalArgumentException.class); diff --git a/load-balancer/sticky/src/main/java/io/smallrye/stork/loadbalancer/random/StickyLoadBalancer.java b/load-balancer/sticky/src/main/java/io/smallrye/stork/loadbalancer/random/StickyLoadBalancer.java index c40097a0..f4c1bb29 100644 --- a/load-balancer/sticky/src/main/java/io/smallrye/stork/loadbalancer/random/StickyLoadBalancer.java +++ b/load-balancer/sticky/src/main/java/io/smallrye/stork/loadbalancer/random/StickyLoadBalancer.java @@ -50,7 +50,7 @@ public StickyLoadBalancer(Duration failureBackOff) { /** * Selects the service instance - * + * * @param serviceInstances instances to choose from * * @return the selected instance diff --git a/service-discovery/composite/src/main/java/io/smallrye/stork/servicediscovery/composite/CompositeServiceDiscovery.java b/service-discovery/composite/src/main/java/io/smallrye/stork/servicediscovery/composite/CompositeServiceDiscovery.java index d2827927..8bdc9778 100644 --- a/service-discovery/composite/src/main/java/io/smallrye/stork/servicediscovery/composite/CompositeServiceDiscovery.java +++ b/service-discovery/composite/src/main/java/io/smallrye/stork/servicediscovery/composite/CompositeServiceDiscovery.java @@ -27,7 +27,7 @@ public class CompositeServiceDiscovery implements ServiceDiscovery { /** * Creates a new CompositeServiceDiscovery - * + * * @param serviceName the service name * @param serviceNames the composed service names */ diff --git a/service-discovery/composite/src/test/java/io/smallrye/stork/servicediscovery/composite/CompositeServiceDiscoveryTest.java b/service-discovery/composite/src/test/java/io/smallrye/stork/servicediscovery/composite/CompositeServiceDiscoveryTest.java index 49435908..3e469dfa 100644 --- a/service-discovery/composite/src/test/java/io/smallrye/stork/servicediscovery/composite/CompositeServiceDiscoveryTest.java +++ b/service-discovery/composite/src/test/java/io/smallrye/stork/servicediscovery/composite/CompositeServiceDiscoveryTest.java @@ -115,7 +115,7 @@ void shouldFailOnUnknownServiceDuringFirstLookup() { assertThatThrownBy(() -> stork.getService("third-service") .getInstances() .await().atMost(Duration.ofSeconds(5))).isInstanceOf(NoSuchServiceDefinitionException.class) - .hasMessageContaining("second-service"); + .hasMessageContaining("second-service"); stork.defineIfAbsent("second-service", ServiceDefinition.of(new StaticConfiguration().withAddressList("localhost:8082"))); diff --git a/service-discovery/consul/src/main/java/io/smallrye/stork/servicediscovery/consul/ConsulMetadataKey.java b/service-discovery/consul/src/main/java/io/smallrye/stork/servicediscovery/consul/ConsulMetadataKey.java index 95314cb4..b003d63a 100644 --- a/service-discovery/consul/src/main/java/io/smallrye/stork/servicediscovery/consul/ConsulMetadataKey.java +++ b/service-discovery/consul/src/main/java/io/smallrye/stork/servicediscovery/consul/ConsulMetadataKey.java @@ -24,7 +24,7 @@ public enum ConsulMetadataKey implements MetadataKey { /** * Creates a new ConsulMetadataKey - * + * * @param name the name */ ConsulMetadataKey(String name) { diff --git a/service-discovery/dns/src/main/java/io/smallrye/stork/servicediscovery/dns/DnsMetadataKey.java b/service-discovery/dns/src/main/java/io/smallrye/stork/servicediscovery/dns/DnsMetadataKey.java index be955a45..690e7019 100644 --- a/service-discovery/dns/src/main/java/io/smallrye/stork/servicediscovery/dns/DnsMetadataKey.java +++ b/service-discovery/dns/src/main/java/io/smallrye/stork/servicediscovery/dns/DnsMetadataKey.java @@ -21,7 +21,7 @@ public enum DnsMetadataKey implements MetadataKey { /** * Creates a new DnsMetadataKey - * + * * @param name the name */ DnsMetadataKey(String name) { diff --git a/service-discovery/eureka/src/main/java/io/smallrye/stork/servicediscovery/eureka/EurekaMetadataKey.java b/service-discovery/eureka/src/main/java/io/smallrye/stork/servicediscovery/eureka/EurekaMetadataKey.java index 5cc089a4..9912208f 100644 --- a/service-discovery/eureka/src/main/java/io/smallrye/stork/servicediscovery/eureka/EurekaMetadataKey.java +++ b/service-discovery/eureka/src/main/java/io/smallrye/stork/servicediscovery/eureka/EurekaMetadataKey.java @@ -16,7 +16,7 @@ public enum EurekaMetadataKey implements MetadataKey { /** * Creates a new ConsulMetadataKey - * + * * @param name the name */ EurekaMetadataKey(String name) { diff --git a/service-discovery/static-list/src/test/java/io/smallrye/stork/servicediscovery/staticlist/StaticListServiceDiscoveryProgrammaticApiTest.java b/service-discovery/static-list/src/test/java/io/smallrye/stork/servicediscovery/staticlist/StaticListServiceDiscoveryProgrammaticApiTest.java index 99543ee5..64b6ace9 100644 --- a/service-discovery/static-list/src/test/java/io/smallrye/stork/servicediscovery/staticlist/StaticListServiceDiscoveryProgrammaticApiTest.java +++ b/service-discovery/static-list/src/test/java/io/smallrye/stork/servicediscovery/staticlist/StaticListServiceDiscoveryProgrammaticApiTest.java @@ -100,8 +100,9 @@ void shouldFailOnMissingService() { void shouldFailOnInvalidFormat() { assertThatThrownBy(() -> stork.defineIfAbsent("broken-service", ServiceDefinition.of( new StaticConfiguration() - .withAddressList("localhost:8080, localhost:8081, , ")))).isInstanceOf(IllegalArgumentException.class) - .hasMessageContaining("Address not parseable"); + .withAddressList("localhost:8080, localhost:8081, , ")))) + .isInstanceOf(IllegalArgumentException.class) + .hasMessageContaining("Address not parseable"); } }