From 5b5564b9336ee0ae806f4383879cf7af33dda73b Mon Sep 17 00:00:00 2001 From: Istvan Toth Date: Mon, 30 Sep 2024 10:44:57 +0200 Subject: [PATCH] fix some deprecation warnings --- .../apache/hc/client5/http/impl/auth/GGSSchemeBase.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/GGSSchemeBase.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/GGSSchemeBase.java index d5a714e94..245fbb733 100644 --- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/GGSSchemeBase.java +++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/GGSSchemeBase.java @@ -149,7 +149,7 @@ public void processChallenge( } if (LOG.isDebugEnabled()) { - final HttpClientContext clientContext = HttpClientContext.adapt(context); + final HttpClientContext clientContext = HttpClientContext.cast(context); final String exchangeId = clientContext.getExchangeId(); LOG.debug("{} GSS init {}", exchangeId, gssHostname); } @@ -159,7 +159,7 @@ public void processChallenge( case UNINITIATED: if (challenge != NO_TOKEN) { if (LOG.isDebugEnabled()) { - final HttpClientContext clientContext = HttpClientContext.adapt(context); + final HttpClientContext clientContext = HttpClientContext.cast(context); final String exchangeId = clientContext.getExchangeId(); LOG.debug("{} Internal GSS error: token received when none was sent yet: {}", exchangeId, challengeToken); } @@ -176,7 +176,7 @@ public void processChallenge( if (!gssContext.isEstablished()) { if (LOG.isDebugEnabled()) { final HttpClientContext clientContext = - HttpClientContext.adapt(context); + HttpClientContext.cast(context); final String exchangeId = clientContext.getExchangeId(); LOG.debug("{} GSSContext is not established ", exchangeId); } @@ -187,7 +187,7 @@ public void processChallenge( } else if (!gssContext.getMutualAuthState()) { if (LOG.isDebugEnabled()) { final HttpClientContext clientContext = - HttpClientContext.adapt(context); + HttpClientContext.cast(context); final String exchangeId = clientContext.getExchangeId(); LOG.debug("{} requireMutualAuth is set but GSSAUthContext does not have" + " mutualAuthState set", exchangeId);