[java-support] branch master updated: IDP-1397: Removal of deprecated features
Brent Putman
putmanb at georgetown.edu
Wed Feb 19 19:29:46 EST 2020
This is an automated email from the git hooks/post-receive script.
putmanb pushed a commit to branch master
in repository java-support.
View the commit online:
http://git.shibboleth.net/view/?p=java-support.git;a=commit;h=34d195f38d187a7a86aee3459bcf1d705e33b80e
The following commit(s) were added to refs/heads/master by this push:
new 34d195f IDP-1397: Removal of deprecated features
34d195f is described below
commit 34d195f38d187a7a86aee3459bcf1d705e33b80e
Author: Brent Putman <putmanb at georgetown.edu>
AuthorDate: Wed Feb 19 19:27:13 2020 -0500
IDP-1397: Removal of deprecated features
Mark an HttpClientBuilder property methods deprecated for removal.
This disappears in HC 5, so we'll remove in our v5 stack.
Suppress warnings for deprecation decorateApacheBuilder; note to
remove suppression when the deprecated Apache call is removed.
---
.../java/support/httpclient/HttpClientBuilder.java | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/main/java/net/shibboleth/utilities/java/support/httpclient/HttpClientBuilder.java b/src/main/java/net/shibboleth/utilities/java/support/httpclient/HttpClientBuilder.java
index 449d73c..c593078 100644
--- a/src/main/java/net/shibboleth/utilities/java/support/httpclient/HttpClientBuilder.java
+++ b/src/main/java/net/shibboleth/utilities/java/support/httpclient/HttpClientBuilder.java
@@ -513,7 +513,7 @@ public class HttpClientBuilder {
*
* @deprecated use {@link #isConnectionStaleCheck()}
*/
- @Deprecated
+ @Deprecated(forRemoval=true)
public boolean isConnectionStalecheck() {
return isConnectionStaleCheck();
}
@@ -528,7 +528,7 @@ public class HttpClientBuilder {
*
* @deprecated use {@link #setConnectionStaleCheck(boolean)}
*/
- @Deprecated
+ @Deprecated(forRemoval=true)
public void setConnectionStalecheck(final boolean check) {
setConnectionStaleCheck(check);
}
@@ -538,8 +538,11 @@ public class HttpClientBuilder {
*
* @return whether reused connections are checked if they are closed before being used by the client
*
+ * @deprecated use a custom-configured connection pool manger.
+ * See {@link org.apache.http.impl.conn.PoolingHttpClientConnectionManager#setValidateAfterInactivity(int)}
*
*/
+ @Deprecated(forRemoval=true)
public boolean isConnectionStaleCheck() {
return connectionStaleCheck;
}
@@ -551,7 +554,11 @@ public class HttpClientBuilder {
* appropriate.
*
* @param check whether reused connections are checked if they are closed before being used by the client
+ *
+ * @deprecated use a custom-configured connection pool manger.
+ * See {@link org.apache.http.impl.conn.PoolingHttpClientConnectionManager#setValidateAfterInactivity(int)}
*/
+ @Deprecated(forRemoval=true)
public void setConnectionStaleCheck(final boolean check) {
connectionStaleCheck = check;
}
@@ -984,6 +991,7 @@ public class HttpClientBuilder {
* @throws Exception if there is a problem decorating the Apache builder
*/
// Checkstyle: CyclomaticComplexity|MethodLength OFF
+ @SuppressWarnings("deprecation")
protected void decorateApacheBuilder() throws Exception {
final org.apache.http.impl.client.HttpClientBuilder builder = getApacheBuilder();
@@ -1073,6 +1081,8 @@ public class HttpClientBuilder {
requestConfigBuilder.setConnectionRequestTimeout((int) connectionRequestTimeout.toMillis());
}
+ // TODO: When we remove the deprecated 'connectionStaleCheck' when we move to HC 5,
+ // be sure to also remove the @SuppressWarnings("deprecation") on this method.
requestConfigBuilder.setStaleConnectionCheckEnabled(connectionStaleCheck);
requestConfigBuilder.setRedirectsEnabled(httpFollowRedirects);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list