From 877207acc09a734017c6b745ac2d31635489eec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Nie=C3=9Fing?= <36885591+zUniQueX@users.noreply.github.com> Date: Fri, 8 Oct 2021 18:27:52 +0200 Subject: [PATCH 1/3] Deprecate excluded user agents (removed in Jetty 10) --- .../main/java/io/dropwizard/jetty/GzipHandlerFactory.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dropwizard-jetty/src/main/java/io/dropwizard/jetty/GzipHandlerFactory.java b/dropwizard-jetty/src/main/java/io/dropwizard/jetty/GzipHandlerFactory.java index f2bb0c3e4bd..828cad1f0cd 100644 --- a/dropwizard-jetty/src/main/java/io/dropwizard/jetty/GzipHandlerFactory.java +++ b/dropwizard-jetty/src/main/java/io/dropwizard/jetty/GzipHandlerFactory.java @@ -212,10 +212,18 @@ public void setGzipCompatibleInflation(boolean gzipCompatibleInflation) { this.gzipCompatibleInflation = gzipCompatibleInflation; } + /** + * @deprecated + */ + @Deprecated public Set getExcludedUserAgentPatterns() { return excludedUserAgentPatterns; } + /** + * @deprecated + */ + @Deprecated public void setExcludedUserAgentPatterns(Set excludedUserAgentPatterns) { this.excludedUserAgentPatterns = excludedUserAgentPatterns; } From 17999729ab59fc32c5044ad13a0576735c26cac1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Nie=C3=9Fing?= <36885591+zUniQueX@users.noreply.github.com> Date: Fri, 8 Oct 2021 18:32:30 +0200 Subject: [PATCH 2/3] Deprecate duplicate getter and setter for 'healthChecks' --- .../io/dropwizard/health/DefaultHealthFactory.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dropwizard-health/src/main/java/io/dropwizard/health/DefaultHealthFactory.java b/dropwizard-health/src/main/java/io/dropwizard/health/DefaultHealthFactory.java index d5a5b23de65..674bdf4422e 100644 --- a/dropwizard-health/src/main/java/io/dropwizard/health/DefaultHealthFactory.java +++ b/dropwizard-health/src/main/java/io/dropwizard/health/DefaultHealthFactory.java @@ -75,10 +75,12 @@ public void setEnabled(boolean enabled) { this.enabled = enabled; } + @JsonProperty("healthChecks") public List getHealthCheckConfigurations() { return healthChecks; } + @JsonProperty("healthChecks") public void setHealthCheckConfigurations(final List healthChecks) { this.healthChecks = healthChecks; } @@ -131,10 +133,18 @@ public void setHealthResponderFactory(HealthResponderFactory healthResponderFact this.healthResponderFactory = healthResponderFactory; } + /** + * @deprecated use {@link #getHealthCheckConfigurations()} instead + */ + @Deprecated public List getHealthChecks() { return healthChecks; } + /** + * @deprecated use {@link #setHealthCheckConfigurations(List)} instead + */ + @Deprecated public void setHealthChecks(List healthChecks) { this.healthChecks = healthChecks; } From ffd9538667334cebdda78df9f421fb8aedb69fe0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Nie=C3=9Fing?= <36885591+zUniQueX@users.noreply.github.com> Date: Fri, 8 Oct 2021 18:48:24 +0200 Subject: [PATCH 3/3] Deprecate methods with no replacement in httpclient5 --- .../src/main/java/io/dropwizard/client/HttpClientBuilder.java | 4 ++++ .../java/io/dropwizard/client/HttpClientConfiguration.java | 4 ++++ .../main/java/io/dropwizard/client/JerseyClientBuilder.java | 2 ++ 3 files changed, 10 insertions(+) diff --git a/dropwizard-client/src/main/java/io/dropwizard/client/HttpClientBuilder.java b/dropwizard-client/src/main/java/io/dropwizard/client/HttpClientBuilder.java index 6f6d24034f3..97ecb9fe1cb 100644 --- a/dropwizard-client/src/main/java/io/dropwizard/client/HttpClientBuilder.java +++ b/dropwizard-client/src/main/java/io/dropwizard/client/HttpClientBuilder.java @@ -241,7 +241,9 @@ public HttpClientBuilder using(List defaultHeaders) { * * @param httpProcessor a {@link HttpProcessor} instance * @return {@code} this + * @deprecated */ + @Deprecated public HttpClientBuilder using(HttpProcessor httpProcessor) { this.httpProcessor = httpProcessor; return this; @@ -252,7 +254,9 @@ public HttpClientBuilder using(HttpProcessor httpProcessor) { * * @param serviceUnavailableRetryStrategy a {@link ServiceUnavailableRetryStrategy} instance * @return {@code} this + * @deprecated will be combined with {@link #using(HttpRequestRetryHandler)} in {@code using(HttpRequestRetryStrategy)} */ + @Deprecated public HttpClientBuilder using(ServiceUnavailableRetryStrategy serviceUnavailableRetryStrategy) { this.serviceUnavailableRetryStrategy = serviceUnavailableRetryStrategy; return this; diff --git a/dropwizard-client/src/main/java/io/dropwizard/client/HttpClientConfiguration.java b/dropwizard-client/src/main/java/io/dropwizard/client/HttpClientConfiguration.java index 2132c4e9ebd..d0f18147b8e 100644 --- a/dropwizard-client/src/main/java/io/dropwizard/client/HttpClientConfiguration.java +++ b/dropwizard-client/src/main/java/io/dropwizard/client/HttpClientConfiguration.java @@ -134,7 +134,9 @@ public void setCookiesEnabled(boolean enabled) { /** * @since 2.0 + * @deprecated */ + @Deprecated @JsonProperty public boolean isNormalizeUriEnabled() { return normalizeUriEnabled; @@ -142,7 +144,9 @@ public boolean isNormalizeUriEnabled() { /** * @since 2.0 + * @deprecated */ + @Deprecated @JsonProperty public void setNormalizeUriEnabled(final boolean normalizeUriEnabled) { this.normalizeUriEnabled = normalizeUriEnabled; diff --git a/dropwizard-client/src/main/java/io/dropwizard/client/JerseyClientBuilder.java b/dropwizard-client/src/main/java/io/dropwizard/client/JerseyClientBuilder.java index 98c37ee8cf6..59f4739074d 100644 --- a/dropwizard-client/src/main/java/io/dropwizard/client/JerseyClientBuilder.java +++ b/dropwizard-client/src/main/java/io/dropwizard/client/JerseyClientBuilder.java @@ -310,7 +310,9 @@ public JerseyClientBuilder using(CredentialsProvider credentialsProvider) { * * @param serviceUnavailableRetryStrategy a {@link ServiceUnavailableRetryStrategy} instance * @return {@code this} + * @deprecated will be combined with {@link #using(HttpRequestRetryHandler)} in {@code using(HttpRequestRetryStrategy)} */ + @Deprecated public JerseyClientBuilder using(ServiceUnavailableRetryStrategy serviceUnavailableRetryStrategy) { apacheHttpClientBuilder.using(serviceUnavailableRetryStrategy); return this;