From 7048c269770cefc509605b3ce511d63292851efb Mon Sep 17 00:00:00 2001 From: Aayush Atharva Date: Mon, 24 Apr 2023 22:48:52 +0530 Subject: [PATCH 001/167] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 58bcb7313..67699870c 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Add a dependency on the main AsyncHttpClient artifact: org.asynchttpclient async-http-client - 3.0.0.Beta1 + 3.0.0.Beta2 ``` From 975241f6996d82a9f981412bb2bc4b7eb1f93702 Mon Sep 17 00:00:00 2001 From: Gerd Riesselmann Date: Sat, 29 Apr 2023 07:16:04 +0200 Subject: [PATCH 002/167] Allow disabling automatic decompression (#1871) Adds new config option "isEnableAutomaticDecompression()" to config and builders. If set to true (default), behavior is as prior: Automatic decompression of compressed content by Netty HTTP client. If set to false, the content will not get decompressed automatically, but is passed to AsyncHandler as retrieved from the server. This is independent of config option isCompressionEnforced(). Added comments, to make this clear. We needed this feature to implement an efficient asynchronous proxy, which avoids overhead of decompressing content and compressing it again afterwards. --------- Co-authored-by: Gerd Riesselmann --- .../AsyncHttpClientConfig.java | 7 ++ .../DefaultAsyncHttpClientConfig.java | 89 +++++++------------ .../config/AsyncHttpClientConfigDefaults.java | 6 ++ .../netty/channel/ChannelManager.java | 10 ++- .../netty/request/NettyRequestFactory.java | 9 +- .../config/ahc-default.properties | 1 + 6 files changed, 61 insertions(+), 61 deletions(-) diff --git a/client/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java b/client/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java index ee2775cc6..1c5ab1b5a 100644 --- a/client/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java +++ b/client/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java @@ -146,6 +146,13 @@ public interface AsyncHttpClientConfig { */ boolean isCompressionEnforced(); + /** + * If automatic content decompression is enabled. + * + * @return true if content decompression is enabled + */ + boolean isEnableAutomaticDecompression(); + /** * Return the {@link ThreadFactory} an {@link AsyncHttpClient} use for handling asynchronous response. * diff --git a/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClientConfig.java b/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClientConfig.java index 20ecb89b3..9dfaa89f4 100644 --- a/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClientConfig.java +++ b/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClientConfig.java @@ -44,62 +44,7 @@ import java.util.concurrent.ThreadFactory; import java.util.function.Consumer; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultAcquireFreeChannelTimeout; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultAggregateWebSocketFrameFragments; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultChunkedFileChunkSize; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultCompressionEnforced; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultConnectTimeout; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultConnectionPoolCleanerPeriod; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultConnectionTtl; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultDisableHttpsEndpointIdentificationAlgorithm; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultDisableUrlEncodingForBoundRequests; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultDisableZeroCopy; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultEnableWebSocketCompression; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultEnabledCipherSuites; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultEnabledProtocols; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultExpiredCookieEvictionDelay; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultFilterInsecureCipherSuites; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultFollowRedirect; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultHandshakeTimeout; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultHashedWheelTimerSize; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultHashedWheelTimerTickDuration; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultHttpClientCodecInitialBufferSize; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultHttpClientCodecMaxChunkSize; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultHttpClientCodecMaxHeaderSize; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultHttpClientCodecMaxInitialLineLength; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultIoThreadsCount; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultKeepAlive; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultKeepEncodingHeader; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultMaxConnections; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultMaxConnectionsPerHost; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultMaxRedirects; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultMaxRequestRetry; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultPooledConnectionIdleTimeout; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultReadTimeout; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultRequestTimeout; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultShutdownQuietPeriod; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultShutdownTimeout; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultSoKeepAlive; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultSoLinger; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultSoRcvBuf; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultSoReuseAddress; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultSoSndBuf; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultSslSessionCacheSize; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultSslSessionTimeout; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultStrict302Handling; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultTcpNoDelay; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultThreadPoolName; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultUseInsecureTrustManager; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultUseLaxCookieEncoder; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultUseNativeTransport; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultUseOnlyEpollNativeTransport; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultUseOpenSsl; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultUseProxyProperties; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultUseProxySelector; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultUserAgent; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultValidateResponseHeaders; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultWebSocketMaxBufferSize; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultWebSocketMaxFrameSize; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.*; /** * Configuration class to use with a {@link AsyncHttpClient}. System property can be also used to configure this object default behavior by doing:
@@ -114,6 +59,8 @@ public class DefaultAsyncHttpClientConfig implements AsyncHttpClientConfig { private final int maxRedirects; private final boolean strict302Handling; private final boolean compressionEnforced; + + private final boolean enableAutomaticDecompression; private final String userAgent; private final Realm realm; private final int maxRequestRetry; @@ -203,6 +150,7 @@ private DefaultAsyncHttpClientConfig(// http int maxRedirects, boolean strict302Handling, boolean compressionEnforced, + boolean enableAutomaticDecompression, String userAgent, Realm realm, int maxRequestRetry, @@ -292,6 +240,7 @@ private DefaultAsyncHttpClientConfig(// http this.maxRedirects = maxRedirects; this.strict302Handling = strict302Handling; this.compressionEnforced = compressionEnforced; + this.enableAutomaticDecompression = enableAutomaticDecompression; this.userAgent = userAgent; this.realm = realm; this.maxRequestRetry = maxRequestRetry; @@ -410,6 +359,11 @@ public boolean isCompressionEnforced() { return compressionEnforced; } + @Override + public boolean isEnableAutomaticDecompression() { + return enableAutomaticDecompression; + } + @Override public String getUserAgent() { return userAgent; @@ -777,6 +731,7 @@ public static class Builder { private int maxRedirects = defaultMaxRedirects(); private boolean strict302Handling = defaultStrict302Handling(); private boolean compressionEnforced = defaultCompressionEnforced(); + private boolean enableAutomaticDecompression = defaultEnableAutomaticDecompression(); private String userAgent = defaultUserAgent(); private Realm realm; private int maxRequestRetry = defaultMaxRequestRetry(); @@ -869,6 +824,7 @@ public Builder(AsyncHttpClientConfig config) { maxRedirects = config.getMaxRedirects(); strict302Handling = config.isStrict302Handling(); compressionEnforced = config.isCompressionEnforced(); + enableAutomaticDecompression = config.isEnableAutomaticDecompression(); userAgent = config.getUserAgent(); realm = config.getRealm(); maxRequestRetry = config.getMaxRequestRetry(); @@ -963,11 +919,31 @@ public Builder setStrict302Handling(final boolean strict302Handling) { return this; } + /** + * If true, AHC will add Accept-Encoding HTTP header to each request + * + * If false (default), AHC will either leave AcceptEncoding header as is + * (if enableAutomaticDecompression is false) or will remove unsupported + * algorithms (if enableAutomaticDecompression is true) + */ public Builder setCompressionEnforced(boolean compressionEnforced) { this.compressionEnforced = compressionEnforced; return this; } + + /* + * If true (default), AHC will add a Netty HttpContentDecompressor, so compressed + * content will automatically get decompressed. + * + * If set to false, response will be delivered as is received. Decompression must + * be done by calling code. + */ + public Builder setEnableAutomaticDecompression(boolean enable) { + this.enableAutomaticDecompression = enable; + return this; + } + public Builder setUserAgent(String userAgent) { this.userAgent = userAgent; return this; @@ -1390,6 +1366,7 @@ public DefaultAsyncHttpClientConfig build() { maxRedirects, strict302Handling, compressionEnforced, + enableAutomaticDecompression, userAgent, realm, maxRequestRetry, diff --git a/client/src/main/java/org/asynchttpclient/config/AsyncHttpClientConfigDefaults.java b/client/src/main/java/org/asynchttpclient/config/AsyncHttpClientConfigDefaults.java index e71dd9cf1..3d7b5df9d 100644 --- a/client/src/main/java/org/asynchttpclient/config/AsyncHttpClientConfigDefaults.java +++ b/client/src/main/java/org/asynchttpclient/config/AsyncHttpClientConfigDefaults.java @@ -36,6 +36,8 @@ public final class AsyncHttpClientConfigDefaults { public static final String FOLLOW_REDIRECT_CONFIG = "followRedirect"; public static final String MAX_REDIRECTS_CONFIG = "maxRedirects"; public static final String COMPRESSION_ENFORCED_CONFIG = "compressionEnforced"; + + public static final String ENABLE_AUTOMATIC_DECOMPRESSION_CONFIG = "enableAutomaticDecompression"; public static final String USER_AGENT_CONFIG = "userAgent"; public static final String ENABLED_PROTOCOLS_CONFIG = "enabledProtocols"; public static final String ENABLED_CIPHER_SUITES_CONFIG = "enabledCipherSuites"; @@ -147,6 +149,10 @@ public static boolean defaultCompressionEnforced() { return AsyncHttpClientConfigHelper.getAsyncHttpClientConfig().getBoolean(ASYNC_CLIENT_CONFIG_ROOT + COMPRESSION_ENFORCED_CONFIG); } + public static boolean defaultEnableAutomaticDecompression() { + return AsyncHttpClientConfigHelper.getAsyncHttpClientConfig().getBoolean(ASYNC_CLIENT_CONFIG_ROOT + ENABLE_AUTOMATIC_DECOMPRESSION_CONFIG); + } + public static String defaultUserAgent() { return AsyncHttpClientConfigHelper.getAsyncHttpClientConfig().getString(ASYNC_CLIENT_CONFIG_ROOT + USER_AGENT_CONFIG); } diff --git a/client/src/main/java/org/asynchttpclient/netty/channel/ChannelManager.java b/client/src/main/java/org/asynchttpclient/netty/channel/ChannelManager.java index a98ca5ed1..45ff3adc1 100755 --- a/client/src/main/java/org/asynchttpclient/netty/channel/ChannelManager.java +++ b/client/src/main/java/org/asynchttpclient/netty/channel/ChannelManager.java @@ -244,8 +244,14 @@ public void configureBootstraps(NettyRequestSender requestSender) { @Override protected void initChannel(Channel ch) { ChannelPipeline pipeline = ch.pipeline() - .addLast(HTTP_CLIENT_CODEC, newHttpClientCodec()) - .addLast(INFLATER_HANDLER, newHttpContentDecompressor()) + .addLast(HTTP_CLIENT_CODEC, newHttpClientCodec()); + + if (config.isEnableAutomaticDecompression()) { + // Add automatic decompression if desired + pipeline = pipeline.addLast(INFLATER_HANDLER, newHttpContentDecompressor()); + } + + pipeline = pipeline .addLast(CHUNKED_WRITER_HANDLER, new ChunkedWriteHandler()) .addLast(AHC_HTTP_HANDLER, httpHandler); diff --git a/client/src/main/java/org/asynchttpclient/netty/request/NettyRequestFactory.java b/client/src/main/java/org/asynchttpclient/netty/request/NettyRequestFactory.java index 2446cd3cd..317c4522f 100755 --- a/client/src/main/java/org/asynchttpclient/netty/request/NettyRequestFactory.java +++ b/client/src/main/java/org/asynchttpclient/netty/request/NettyRequestFactory.java @@ -172,10 +172,13 @@ public NettyRequest newNettyRequest(Request request, boolean performConnectReque String userDefinedAcceptEncoding = headers.get(ACCEPT_ENCODING); if (userDefinedAcceptEncoding != null) { - // we don't support Brotly ATM - headers.set(ACCEPT_ENCODING, filterOutBrotliFromAcceptEncoding(userDefinedAcceptEncoding)); - + if (config.isEnableAutomaticDecompression()) { + // we don't support Brotli ATM, for automatic decompression. + // For manual decompression by user, any encoding may suite, so leave untouched + headers.set(ACCEPT_ENCODING, filterOutBrotliFromAcceptEncoding(userDefinedAcceptEncoding)); + } } else if (config.isCompressionEnforced()) { + // Add Accept Encoding header if compression is enforced headers.set(ACCEPT_ENCODING, GZIP_DEFLATE); } } diff --git a/client/src/main/resources/org/asynchttpclient/config/ahc-default.properties b/client/src/main/resources/org/asynchttpclient/config/ahc-default.properties index f9254d542..6450221b0 100644 --- a/client/src/main/resources/org/asynchttpclient/config/ahc-default.properties +++ b/client/src/main/resources/org/asynchttpclient/config/ahc-default.properties @@ -11,6 +11,7 @@ org.asynchttpclient.connectionTtl=-PT0.001S org.asynchttpclient.followRedirect=false org.asynchttpclient.maxRedirects=5 org.asynchttpclient.compressionEnforced=false +org.asynchttpclient.enableAutomaticDecompression=true org.asynchttpclient.userAgent=AHC/2.1 org.asynchttpclient.enabledProtocols=TLSv1.2, TLSv1.1, TLSv1 org.asynchttpclient.enabledCipherSuites= From 8046826d1c79da296de98f7eb2f3ebae8e563d8e Mon Sep 17 00:00:00 2001 From: Asapin <1559761+Asapin@users.noreply.github.com> Date: Sun, 30 Apr 2023 16:38:57 +0900 Subject: [PATCH 003/167] Check source code using ErrorProne static analyzer (#1872) * Added support for ErrorProne --------- --- .mvn/jvm.config | 10 ++++++++ .../util/AuthenticatorUtils.java | 3 ++- pom.xml | 25 +++++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 .mvn/jvm.config diff --git a/.mvn/jvm.config b/.mvn/jvm.config new file mode 100644 index 000000000..32599cefe --- /dev/null +++ b/.mvn/jvm.config @@ -0,0 +1,10 @@ +--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED +--add-opens jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED +--add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED diff --git a/client/src/main/java/org/asynchttpclient/util/AuthenticatorUtils.java b/client/src/main/java/org/asynchttpclient/util/AuthenticatorUtils.java index dc1bff488..89be54be8 100644 --- a/client/src/main/java/org/asynchttpclient/util/AuthenticatorUtils.java +++ b/client/src/main/java/org/asynchttpclient/util/AuthenticatorUtils.java @@ -21,6 +21,7 @@ import org.asynchttpclient.uri.Uri; import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; import java.util.Base64; import java.util.List; @@ -95,7 +96,7 @@ private static String computeDigestAuthentication(Realm realm) { builder.setLength(builder.length() - 2); // remove tailing ", " // FIXME isn't there a more efficient way? - return new String(StringUtils.charSequence2Bytes(builder, ISO_8859_1)); + return new String(StringUtils.charSequence2Bytes(builder, ISO_8859_1), StandardCharsets.UTF_8); } private static void append(StringBuilder builder, String name, String value, boolean quoted) { diff --git a/pom.xml b/pom.xml index bb9fb5ad0..7c600133f 100644 --- a/pom.xml +++ b/pom.xml @@ -211,6 +211,31 @@ 11 11 + UTF-8 + + -XDcompilePolicy=simple + -Xplugin:ErrorProne + -Xep:JavaTimeDefaultTimeZone:ERROR + -Xep:JavaUtilDate:ERROR + -Xep:DateChecker:ERROR + -Xep:DateFormatConstant:ERROR + -Xep:EmptyBlockTag:ERROR + -Xep:VariableNameSameAsType:ERROR + -Xep:DoubleCheckedLocking:ERROR + -Xep:DefaultCharset:ERROR + -Xep:NullablePrimitive:ERROR + -Xep:NullOptional:ERROR + -XepExcludedPaths:.*/src/test/java/.* + + + + + com.google.errorprone + error_prone_core + 2.18.0 + + + From f25d32b26663f786ddd25e1ca367fc3a10c38e29 Mon Sep 17 00:00:00 2001 From: Asapin <1559761+Asapin@users.noreply.github.com> Date: Sun, 30 Apr 2023 20:50:45 +0900 Subject: [PATCH 004/167] Add nullness annotations to org.asynchttpclient.channel (#1873) --- .../org/asynchttpclient/channel/ChannelPool.java | 3 ++- .../channel/ChannelPoolPartitioning.java | 12 +++++++----- .../asynchttpclient/channel/NoopChannelPool.java | 3 ++- pom.xml | 13 +++++++++++++ 4 files changed, 24 insertions(+), 7 deletions(-) diff --git a/client/src/main/java/org/asynchttpclient/channel/ChannelPool.java b/client/src/main/java/org/asynchttpclient/channel/ChannelPool.java index fa13ee9a2..d4469360d 100755 --- a/client/src/main/java/org/asynchttpclient/channel/ChannelPool.java +++ b/client/src/main/java/org/asynchttpclient/channel/ChannelPool.java @@ -16,6 +16,7 @@ package org.asynchttpclient.channel; import io.netty.channel.Channel; +import org.jetbrains.annotations.Nullable; import java.util.Map; import java.util.function.Predicate; @@ -37,7 +38,7 @@ public interface ChannelPool { * @param partitionKey the partition used when invoking offer * @return the channel associated with the uri */ - Channel poll(Object partitionKey); + @Nullable Channel poll(Object partitionKey); /** * Remove all channels from the cache. A channel might have been associated diff --git a/client/src/main/java/org/asynchttpclient/channel/ChannelPoolPartitioning.java b/client/src/main/java/org/asynchttpclient/channel/ChannelPoolPartitioning.java index 772a5b2aa..1e910df03 100644 --- a/client/src/main/java/org/asynchttpclient/channel/ChannelPoolPartitioning.java +++ b/client/src/main/java/org/asynchttpclient/channel/ChannelPoolPartitioning.java @@ -18,6 +18,7 @@ import org.asynchttpclient.proxy.ProxyServer; import org.asynchttpclient.proxy.ProxyType; import org.asynchttpclient.uri.Uri; +import org.jetbrains.annotations.Nullable; import java.util.Objects; @@ -31,7 +32,7 @@ enum PerHostChannelPoolPartitioning implements ChannelPoolPartitioning { INSTANCE; @Override - public Object getPartitionKey(Uri uri, String virtualHost, ProxyServer proxyServer) { + public Object getPartitionKey(Uri uri, @Nullable String virtualHost, @Nullable ProxyServer proxyServer) { String targetHostBaseUrl = uri.getBaseUrl(); if (proxyServer == null) { if (virtualHost == null) { @@ -59,12 +60,13 @@ public Object getPartitionKey(Uri uri, String virtualHost, ProxyServer proxyServ class CompositePartitionKey { private final String targetHostBaseUrl; - private final String virtualHost; - private final String proxyHost; + private final @Nullable String virtualHost; + private final @Nullable String proxyHost; private final int proxyPort; - private final ProxyType proxyType; + private final @Nullable ProxyType proxyType; - CompositePartitionKey(String targetHostBaseUrl, String virtualHost, String proxyHost, int proxyPort, ProxyType proxyType) { + CompositePartitionKey(String targetHostBaseUrl, @Nullable String virtualHost, + @Nullable String proxyHost, int proxyPort, @Nullable ProxyType proxyType) { this.targetHostBaseUrl = targetHostBaseUrl; this.virtualHost = virtualHost; this.proxyHost = proxyHost; diff --git a/client/src/main/java/org/asynchttpclient/channel/NoopChannelPool.java b/client/src/main/java/org/asynchttpclient/channel/NoopChannelPool.java index 74fb6d604..8ea39e6bd 100644 --- a/client/src/main/java/org/asynchttpclient/channel/NoopChannelPool.java +++ b/client/src/main/java/org/asynchttpclient/channel/NoopChannelPool.java @@ -16,6 +16,7 @@ package org.asynchttpclient.channel; import io.netty.channel.Channel; +import org.jetbrains.annotations.Nullable; import java.util.Collections; import java.util.Map; @@ -31,7 +32,7 @@ public boolean offer(Channel channel, Object partitionKey) { } @Override - public Channel poll(Object partitionKey) { + public @Nullable Channel poll(Object partitionKey) { return null; } diff --git a/pom.xml b/pom.xml index 7c600133f..60d806500 100644 --- a/pom.xml +++ b/pom.xml @@ -200,6 +200,11 @@ jakarta.activation ${activation.version} + + org.jetbrains + annotations + 24.0.1 + @@ -226,6 +231,9 @@ -Xep:NullablePrimitive:ERROR -Xep:NullOptional:ERROR -XepExcludedPaths:.*/src/test/java/.* + -XepOpt:NullAway:AnnotatedPackages=org.asynchttpclient.channel + -XepOpt:NullAway:AcknowledgeRestrictiveAnnotations=true + -Xep:NullAway:ERROR @@ -234,6 +242,11 @@ error_prone_core 2.18.0 + + com.uber.nullaway + nullaway + 0.10.10 + From 8da2b18c298eaf336d6863fe7e1f8cb12271d46d Mon Sep 17 00:00:00 2001 From: Asapin <1559761+Asapin@users.noreply.github.com> Date: Sun, 30 Apr 2023 23:49:30 +0900 Subject: [PATCH 005/167] Added nullable annotations to org.asynchttpclient.config, org.asynchttpclient.cookie and org.asynchttpclient.exception packages (#1874) --- .../config/AsyncHttpClientConfigDefaults.java | 6 ++++-- .../config/AsyncHttpClientConfigHelper.java | 11 ++++++---- .../cookie/ThreadSafeCookieStore.java | 10 +++++---- .../org/asynchttpclient/util/MiscUtils.java | 21 ++++++++++++------- pom.xml | 2 +- 5 files changed, 31 insertions(+), 19 deletions(-) diff --git a/client/src/main/java/org/asynchttpclient/config/AsyncHttpClientConfigDefaults.java b/client/src/main/java/org/asynchttpclient/config/AsyncHttpClientConfigDefaults.java index 3d7b5df9d..3d4cb6106 100644 --- a/client/src/main/java/org/asynchttpclient/config/AsyncHttpClientConfigDefaults.java +++ b/client/src/main/java/org/asynchttpclient/config/AsyncHttpClientConfigDefaults.java @@ -15,6 +15,8 @@ */ package org.asynchttpclient.config; +import org.jetbrains.annotations.Nullable; + import java.io.IOException; import java.io.InputStream; import java.time.Duration; @@ -157,11 +159,11 @@ public static String defaultUserAgent() { return AsyncHttpClientConfigHelper.getAsyncHttpClientConfig().getString(ASYNC_CLIENT_CONFIG_ROOT + USER_AGENT_CONFIG); } - public static String[] defaultEnabledProtocols() { + public static @Nullable String[] defaultEnabledProtocols() { return AsyncHttpClientConfigHelper.getAsyncHttpClientConfig().getStringArray(ASYNC_CLIENT_CONFIG_ROOT + ENABLED_PROTOCOLS_CONFIG); } - public static String[] defaultEnabledCipherSuites() { + public static @Nullable String[] defaultEnabledCipherSuites() { return AsyncHttpClientConfigHelper.getAsyncHttpClientConfig().getStringArray(ASYNC_CLIENT_CONFIG_ROOT + ENABLED_CIPHER_SUITES_CONFIG); } diff --git a/client/src/main/java/org/asynchttpclient/config/AsyncHttpClientConfigHelper.java b/client/src/main/java/org/asynchttpclient/config/AsyncHttpClientConfigHelper.java index 02b25d681..9d5800227 100644 --- a/client/src/main/java/org/asynchttpclient/config/AsyncHttpClientConfigHelper.java +++ b/client/src/main/java/org/asynchttpclient/config/AsyncHttpClientConfigHelper.java @@ -15,6 +15,8 @@ */ package org.asynchttpclient.config; +import org.jetbrains.annotations.Nullable; + import java.io.IOException; import java.io.InputStream; import java.time.Duration; @@ -23,7 +25,7 @@ public final class AsyncHttpClientConfigHelper { - private static volatile Config config; + private static volatile @Nullable Config config; private AsyncHttpClientConfigHelper() { } @@ -41,8 +43,9 @@ public static Config getAsyncHttpClientConfig() { * getAsyncHttpClientConfig() to get the new property values. */ public static void reloadProperties() { - if (config != null) { - config.reload(); + final Config localInstance = config; + if (localInstance != null) { + localInstance.reload(); } } @@ -90,7 +93,7 @@ public String getString(String key) { }); } - public String[] getStringArray(String key) { + public @Nullable String[] getStringArray(String key) { String s = getString(key); s = s.trim(); if (s.isEmpty()) { diff --git a/client/src/main/java/org/asynchttpclient/cookie/ThreadSafeCookieStore.java b/client/src/main/java/org/asynchttpclient/cookie/ThreadSafeCookieStore.java index b3d7935e1..d14392fb4 100644 --- a/client/src/main/java/org/asynchttpclient/cookie/ThreadSafeCookieStore.java +++ b/client/src/main/java/org/asynchttpclient/cookie/ThreadSafeCookieStore.java @@ -19,6 +19,8 @@ import org.asynchttpclient.uri.Uri; import org.asynchttpclient.util.Assertions; import org.asynchttpclient.util.MiscUtils; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import java.util.AbstractMap; import java.util.ArrayList; @@ -119,7 +121,7 @@ private static String requestPath(Uri requestUri) { // rfc6265#section-5.2.3 // Let cookie-domain be the attribute-value without the leading %x2E (".") character. - private static AbstractMap.SimpleEntry cookieDomain(String cookieDomain, String requestDomain) { + private static AbstractMap.SimpleEntry cookieDomain(@Nullable String cookieDomain, String requestDomain) { if (cookieDomain != null) { String normalizedCookieDomain = cookieDomain.toLowerCase(); return new AbstractMap.SimpleEntry<>( @@ -132,7 +134,7 @@ private static AbstractMap.SimpleEntry cookieDomain(String cook } // rfc6265#section-5.2.4 - private static String cookiePath(String rawCookiePath, String requestPath) { + private static String cookiePath(@Nullable String rawCookiePath, String requestPath) { if (MiscUtils.isNonEmpty(rawCookiePath) && rawCookiePath.charAt(0) == '/') { return rawCookiePath; } else { @@ -242,7 +244,7 @@ private static class CookieKey implements Comparable { } @Override - public int compareTo(CookieKey o) { + public int compareTo(@NotNull CookieKey o) { Assertions.assertNotNull(o, "Parameter can't be null"); int result; if ((result = name.compareTo(o.name)) == 0) { @@ -291,7 +293,7 @@ public String toString() { public static final class DomainUtils { private static final char DOT = '.'; - public static String getSubDomain(String domain) { + public static @Nullable String getSubDomain(@Nullable String domain) { if (domain == null || domain.isEmpty()) { return null; } diff --git a/client/src/main/java/org/asynchttpclient/util/MiscUtils.java b/client/src/main/java/org/asynchttpclient/util/MiscUtils.java index f72c8d81a..6e7f184e6 100644 --- a/client/src/main/java/org/asynchttpclient/util/MiscUtils.java +++ b/client/src/main/java/org/asynchttpclient/util/MiscUtils.java @@ -12,6 +12,9 @@ */ package org.asynchttpclient.util; +import org.jetbrains.annotations.Contract; +import org.jetbrains.annotations.Nullable; + import java.io.Closeable; import java.io.IOException; import java.util.Collection; @@ -23,35 +26,37 @@ private MiscUtils() { // Prevent outside initialization } - public static boolean isNonEmpty(String string) { + // NullAway is not powerful enough to recognise that if the values has passed the check, it's not null + @Contract(value = "null -> false", pure = true) + public static boolean isNonEmpty(@Nullable String string) { return !isEmpty(string); } - public static boolean isEmpty(String string) { + public static boolean isEmpty(@Nullable String string) { return string == null || string.isEmpty(); } - public static boolean isNonEmpty(Object[] array) { + public static boolean isNonEmpty(@Nullable Object[] array) { return array != null && array.length != 0; } - public static boolean isNonEmpty(byte[] array) { + public static boolean isNonEmpty(byte @Nullable [] array) { return array != null && array.length != 0; } - public static boolean isNonEmpty(Collection collection) { + public static boolean isNonEmpty(@Nullable Collection collection) { return collection != null && !collection.isEmpty(); } - public static boolean isNonEmpty(Map map) { + public static boolean isNonEmpty(@Nullable Map map) { return map != null && !map.isEmpty(); } - public static T withDefault(T value, T def) { + public static T withDefault(@Nullable T value, T def) { return value == null ? def : value; } - public static void closeSilently(Closeable closeable) { + public static void closeSilently(@Nullable Closeable closeable) { if (closeable != null) { try { closeable.close(); diff --git a/pom.xml b/pom.xml index 60d806500..a85c114a4 100644 --- a/pom.xml +++ b/pom.xml @@ -231,7 +231,7 @@ -Xep:NullablePrimitive:ERROR -Xep:NullOptional:ERROR -XepExcludedPaths:.*/src/test/java/.* - -XepOpt:NullAway:AnnotatedPackages=org.asynchttpclient.channel + -XepOpt:NullAway:AnnotatedPackages=org.asynchttpclient.channel,org.asynchttpclient.config,org.asynchttpclient.cookie,org.asynchttpclient.exception -XepOpt:NullAway:AcknowledgeRestrictiveAnnotations=true -Xep:NullAway:ERROR From 07500550eac20bc54b1c92d5e65ccf3c57b563f4 Mon Sep 17 00:00:00 2001 From: Asapin <1559761+Asapin@users.noreply.github.com> Date: Thu, 4 May 2023 18:53:10 +0900 Subject: [PATCH 006/167] Added nullable annotations to org.asynchttpclient.filter package (#1875) --- .../asynchttpclient/DefaultAsyncHttpClient.java | 2 +- .../asynchttpclient/filter/FilterContext.java | 17 ++++++++++------- .../intercept/ResponseFiltersInterceptor.java | 2 +- .../netty/request/NettyRequestSender.java | 4 ++-- .../org/asynchttpclient/filter/FilterTest.java | 6 +++--- pom.xml | 2 +- 6 files changed, 18 insertions(+), 15 deletions(-) diff --git a/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClient.java b/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClient.java index 41f5b7a64..efcab12a9 100644 --- a/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClient.java +++ b/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClient.java @@ -241,7 +241,7 @@ public ListenableFuture executeRequest(Request request, AsyncHandler h if (noRequestFilters) { return execute(request, handler); } else { - FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(handler).request(request).build(); + FilterContext fc = new FilterContext.FilterContextBuilder<>(handler, request).build(); try { fc = preProcessRequest(fc); } catch (Exception e) { diff --git a/client/src/main/java/org/asynchttpclient/filter/FilterContext.java b/client/src/main/java/org/asynchttpclient/filter/FilterContext.java index e12677f8b..733455389 100644 --- a/client/src/main/java/org/asynchttpclient/filter/FilterContext.java +++ b/client/src/main/java/org/asynchttpclient/filter/FilterContext.java @@ -17,6 +17,7 @@ import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.HttpResponseStatus; import org.asynchttpclient.Request; +import org.jetbrains.annotations.Nullable; import java.io.IOException; @@ -64,14 +65,14 @@ public Request getRequest() { /** * @return the unprocessed response's {@link HttpResponseStatus} */ - public HttpResponseStatus getResponseStatus() { + public @Nullable HttpResponseStatus getResponseStatus() { return builder.responseStatus; } /** * @return the response {@link HttpHeaders} */ - public HttpHeaders getResponseHeaders() { + public @Nullable HttpHeaders getResponseHeaders() { return builder.headers; } @@ -85,19 +86,21 @@ public boolean replayRequest() { /** * @return the {@link IOException} */ - public IOException getIOException() { + public @Nullable IOException getIOException() { return builder.ioException; } public static class FilterContextBuilder { private AsyncHandler asyncHandler; private Request request; - private HttpResponseStatus responseStatus; + private @Nullable HttpResponseStatus responseStatus; private boolean replayRequest; - private IOException ioException; - private HttpHeaders headers; + private @Nullable IOException ioException; + private @Nullable HttpHeaders headers; - public FilterContextBuilder() { + public FilterContextBuilder(AsyncHandler asyncHandler, Request request) { + this.asyncHandler = asyncHandler; + this.request = request; } public FilterContextBuilder(FilterContext clone) { diff --git a/client/src/main/java/org/asynchttpclient/netty/handler/intercept/ResponseFiltersInterceptor.java b/client/src/main/java/org/asynchttpclient/netty/handler/intercept/ResponseFiltersInterceptor.java index a9c59a52a..89f70f50a 100644 --- a/client/src/main/java/org/asynchttpclient/netty/handler/intercept/ResponseFiltersInterceptor.java +++ b/client/src/main/java/org/asynchttpclient/netty/handler/intercept/ResponseFiltersInterceptor.java @@ -43,7 +43,7 @@ public boolean exitAfterProcessingFilters(Channel channel, HttpResponseStatus status, HttpHeaders responseHeaders) { - FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(handler).request(future.getCurrentRequest()).responseStatus(status) + FilterContext fc = new FilterContext.FilterContextBuilder(handler, future.getCurrentRequest()).responseStatus(status) .responseHeaders(responseHeaders).build(); for (ResponseFilter asyncFilter : config.getResponseFilters()) { diff --git a/client/src/main/java/org/asynchttpclient/netty/request/NettyRequestSender.java b/client/src/main/java/org/asynchttpclient/netty/request/NettyRequestSender.java index 7d45b7a12..fd4a0e19b 100755 --- a/client/src/main/java/org/asynchttpclient/netty/request/NettyRequestSender.java +++ b/client/src/main/java/org/asynchttpclient/netty/request/NettyRequestSender.java @@ -501,8 +501,8 @@ public boolean applyIoExceptionFiltersAndReplayRequest(NettyResponseFuture fu boolean replayed = false; @SuppressWarnings({"unchecked", "rawtypes"}) - FilterContext fc = new FilterContext.FilterContextBuilder().asyncHandler(future.getAsyncHandler()) - .request(future.getCurrentRequest()).ioException(e).build(); + FilterContext fc = new FilterContext.FilterContextBuilder(future.getAsyncHandler(), future.getCurrentRequest()) + .ioException(e).build(); for (IOExceptionFilter asyncFilter : config.getIoExceptionFilters()) { try { fc = asyncFilter.filter(fc); diff --git a/client/src/test/java/org/asynchttpclient/filter/FilterTest.java b/client/src/test/java/org/asynchttpclient/filter/FilterTest.java index 42dfd953e..fba6c4ec0 100644 --- a/client/src/test/java/org/asynchttpclient/filter/FilterTest.java +++ b/client/src/test/java/org/asynchttpclient/filter/FilterTest.java @@ -105,7 +105,7 @@ public void replayResponseFilterTest() throws Exception { public FilterContext filter(FilterContext ctx) { if (replay.getAndSet(false)) { org.asynchttpclient.Request request = ctx.getRequest().toBuilder().addHeader("X-Replay", "true").build(); - return new FilterContext.FilterContextBuilder().asyncHandler(ctx.getAsyncHandler()).request(request).replayRequest(true).build(); + return new FilterContext.FilterContextBuilder(ctx.getAsyncHandler(), request).replayRequest(true).build(); } return ctx; } @@ -128,7 +128,7 @@ public void replayStatusCodeResponseFilterTest() throws Exception { public FilterContext filter(FilterContext ctx) { if (ctx.getResponseStatus() != null && ctx.getResponseStatus().getStatusCode() == 200 && replay.getAndSet(false)) { org.asynchttpclient.Request request = ctx.getRequest().toBuilder().addHeader("X-Replay", "true").build(); - return new FilterContext.FilterContextBuilder().asyncHandler(ctx.getAsyncHandler()).request(request).replayRequest(true).build(); + return new FilterContext.FilterContextBuilder(ctx.getAsyncHandler(), request).replayRequest(true).build(); } return ctx; } @@ -150,7 +150,7 @@ public void replayHeaderResponseFilterTest() throws Exception { public FilterContext filter(FilterContext ctx) { if (ctx.getResponseHeaders() != null && "Pong".equals(ctx.getResponseHeaders().get("Ping")) && replay.getAndSet(false)) { org.asynchttpclient.Request request = ctx.getRequest().toBuilder().addHeader("Ping", "Pong").build(); - return new FilterContext.FilterContextBuilder().asyncHandler(ctx.getAsyncHandler()).request(request).replayRequest(true).build(); + return new FilterContext.FilterContextBuilder(ctx.getAsyncHandler(), request).replayRequest(true).build(); } return ctx; } diff --git a/pom.xml b/pom.xml index a85c114a4..591e5468d 100644 --- a/pom.xml +++ b/pom.xml @@ -231,7 +231,7 @@ -Xep:NullablePrimitive:ERROR -Xep:NullOptional:ERROR -XepExcludedPaths:.*/src/test/java/.* - -XepOpt:NullAway:AnnotatedPackages=org.asynchttpclient.channel,org.asynchttpclient.config,org.asynchttpclient.cookie,org.asynchttpclient.exception + -XepOpt:NullAway:AnnotatedPackages=org.asynchttpclient.channel,org.asynchttpclient.config,org.asynchttpclient.cookie,org.asynchttpclient.exception,org.asynchttpclient.filter -XepOpt:NullAway:AcknowledgeRestrictiveAnnotations=true -Xep:NullAway:ERROR From b7328f9fff58bc16a94eccc0f3d68210b770a773 Mon Sep 17 00:00:00 2001 From: Asapin <1559761+Asapin@users.noreply.github.com> Date: Sat, 6 May 2023 18:53:55 +0900 Subject: [PATCH 007/167] Enabled NullAway for oauth, proxy and resolver packages (#1876) --- .../asynchttpclient/proxy/ProxyServer.java | 20 ++++++++++--------- .../proxy/ProxyServerSelector.java | 3 ++- pom.xml | 2 +- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/client/src/main/java/org/asynchttpclient/proxy/ProxyServer.java b/client/src/main/java/org/asynchttpclient/proxy/ProxyServer.java index b8368da98..a87b04b34 100644 --- a/client/src/main/java/org/asynchttpclient/proxy/ProxyServer.java +++ b/client/src/main/java/org/asynchttpclient/proxy/ProxyServer.java @@ -19,6 +19,7 @@ import io.netty.handler.codec.http.HttpHeaders; import org.asynchttpclient.Realm; import org.asynchttpclient.Request; +import org.jetbrains.annotations.Nullable; import java.util.ArrayList; import java.util.Collections; @@ -36,12 +37,13 @@ public class ProxyServer { private final String host; private final int port; private final int securedPort; - private final Realm realm; + private final @Nullable Realm realm; private final List nonProxyHosts; private final ProxyType proxyType; - private final Function customHeaders; + private final @Nullable Function customHeaders; - public ProxyServer(String host, int port, int securedPort, Realm realm, List nonProxyHosts, ProxyType proxyType, Function customHeaders) { + public ProxyServer(String host, int port, int securedPort, @Nullable Realm realm, List nonProxyHosts, ProxyType proxyType, + @Nullable Function customHeaders) { this.host = host; this.port = port; this.securedPort = securedPort; @@ -71,7 +73,7 @@ public List getNonProxyHosts() { return nonProxyHosts; } - public Realm getRealm() { + public @Nullable Realm getRealm() { return realm; } @@ -79,7 +81,7 @@ public ProxyType getProxyType() { return proxyType; } - public Function getCustomHeaders() { + public @Nullable Function getCustomHeaders() { return customHeaders; } @@ -129,10 +131,10 @@ public static class Builder { private final String host; private final int port; private int securedPort; - private Realm realm; - private List nonProxyHosts; - private ProxyType proxyType; - private Function customHeaders; + private @Nullable Realm realm; + private @Nullable List nonProxyHosts; + private @Nullable ProxyType proxyType; + private @Nullable Function customHeaders; public Builder(String host, int port) { this.host = host; diff --git a/client/src/main/java/org/asynchttpclient/proxy/ProxyServerSelector.java b/client/src/main/java/org/asynchttpclient/proxy/ProxyServerSelector.java index 3a6b31495..46391c804 100644 --- a/client/src/main/java/org/asynchttpclient/proxy/ProxyServerSelector.java +++ b/client/src/main/java/org/asynchttpclient/proxy/ProxyServerSelector.java @@ -16,6 +16,7 @@ package org.asynchttpclient.proxy; import org.asynchttpclient.uri.Uri; +import org.jetbrains.annotations.Nullable; /** * Selector for a proxy server @@ -34,5 +35,5 @@ public interface ProxyServerSelector { * @param uri The URI to select a proxy server for. * @return The proxy server to use, if any. May return null. */ - ProxyServer select(Uri uri); + @Nullable ProxyServer select(Uri uri); } diff --git a/pom.xml b/pom.xml index 591e5468d..0e6809729 100644 --- a/pom.xml +++ b/pom.xml @@ -231,7 +231,7 @@ -Xep:NullablePrimitive:ERROR -Xep:NullOptional:ERROR -XepExcludedPaths:.*/src/test/java/.* - -XepOpt:NullAway:AnnotatedPackages=org.asynchttpclient.channel,org.asynchttpclient.config,org.asynchttpclient.cookie,org.asynchttpclient.exception,org.asynchttpclient.filter + -XepOpt:NullAway:AnnotatedPackages=org.asynchttpclient.channel,org.asynchttpclient.config,org.asynchttpclient.cookie,org.asynchttpclient.exception,org.asynchttpclient.filter,org.asynchttpclient.oauth,org.asynchttpclient.proxy,org.asynchttpclient.resolver -XepOpt:NullAway:AcknowledgeRestrictiveAnnotations=true -Xep:NullAway:ERROR From b36e82f3da6593e4a8625649913c19d4a6b77d64 Mon Sep 17 00:00:00 2001 From: Asapin <1559761+Asapin@users.noreply.github.com> Date: Sat, 6 May 2023 18:54:08 +0900 Subject: [PATCH 008/167] Fixed NPE in OAuth1 implementation when one of the parameters has no value (#1877) --- .../oauth/OAuthSignatureCalculatorInstance.java | 3 +++ .../oauth/OAuthSignatureCalculatorTest.java | 15 +++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/client/src/main/java/org/asynchttpclient/oauth/OAuthSignatureCalculatorInstance.java b/client/src/main/java/org/asynchttpclient/oauth/OAuthSignatureCalculatorInstance.java index bcb3249cb..9363917a2 100644 --- a/client/src/main/java/org/asynchttpclient/oauth/OAuthSignatureCalculatorInstance.java +++ b/client/src/main/java/org/asynchttpclient/oauth/OAuthSignatureCalculatorInstance.java @@ -156,6 +156,9 @@ private String encodedParams(ConsumerKey consumerAuth, RequestToken userAuth, lo } private static String percentEncodeAlreadyFormUrlEncoded(String s) { + if (s == null) { + return ""; + } s = STAR_CHAR_PATTERN.matcher(s).replaceAll("%2A"); s = PLUS_CHAR_PATTERN.matcher(s).replaceAll("%20"); s = ENCODED_TILDE_PATTERN.matcher(s).replaceAll("~"); diff --git a/client/src/test/java/org/asynchttpclient/oauth/OAuthSignatureCalculatorTest.java b/client/src/test/java/org/asynchttpclient/oauth/OAuthSignatureCalculatorTest.java index 2381cc0ae..b8e2091e6 100644 --- a/client/src/test/java/org/asynchttpclient/oauth/OAuthSignatureCalculatorTest.java +++ b/client/src/test/java/org/asynchttpclient/oauth/OAuthSignatureCalculatorTest.java @@ -20,6 +20,7 @@ import org.asynchttpclient.Request; import org.asynchttpclient.RequestBuilder; import org.asynchttpclient.util.Utf8UrlEncoder; +import org.junit.jupiter.api.Test; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; @@ -132,6 +133,20 @@ public void testSignatureBaseStringWithRawUri() throws NoSuchAlgorithmException testSignatureBaseStringWithEncodableOAuthToken(request); } + @Test + public void testSignatureBaseStringWithNoValueQueryParameter() throws NoSuchAlgorithmException { + // Query parameter with no value in OAuth1 should be treated the same as query parameter with an empty value. + // i.e."http://example.com/request?b5" == "http://example.com/request?b5=" + // Tested with http://lti.tools/oauth/ + Request request = post("http://example.com/request?b5=%3D%253D&a3=a&c%40&a2=r%20b") + .addFormParam("c2", "") + .addFormParam("a3", "2 q") + .build(); + + testSignatureBaseString(request); + testSignatureBaseStringWithEncodableOAuthToken(request); + } + // based on the reference test case from // http://oauth.pbwiki.com/TestCases @RepeatedIfExceptionsTest(repeats = 5) From 10700938cd48d362e11a863af516cb1655aa2869 Mon Sep 17 00:00:00 2001 From: Asapin <1559761+Asapin@users.noreply.github.com> Date: Sat, 6 May 2023 20:28:27 +0900 Subject: [PATCH 009/167] Enabled NullAway for the root package (#1878) * Enabled NullAway for the root package --- .../AsyncCompletionHandler.java | 5 +- .../AsyncCompletionHandlerBase.java | 4 +- .../org/asynchttpclient/AsyncHandler.java | 3 +- .../AsyncHttpClientConfig.java | 27 +-- .../DefaultAsyncHttpClient.java | 13 +- .../DefaultAsyncHttpClientConfig.java | 165 ++++++++++++------ .../org/asynchttpclient/DefaultRequest.java | 91 +++++----- .../main/java/org/asynchttpclient/Param.java | 10 +- .../main/java/org/asynchttpclient/Realm.java | 135 +++++++------- .../java/org/asynchttpclient/Request.java | 29 +-- .../asynchttpclient/RequestBuilderBase.java | 59 ++++--- .../java/org/asynchttpclient/Response.java | 7 +- .../OAuthSignatureCalculatorInstance.java | 3 +- .../asynchttpclient/util/EnsuresNonNull.java | 17 ++ pom.xml | 6 +- 15 files changed, 339 insertions(+), 235 deletions(-) create mode 100644 client/src/main/java/org/asynchttpclient/util/EnsuresNonNull.java diff --git a/client/src/main/java/org/asynchttpclient/AsyncCompletionHandler.java b/client/src/main/java/org/asynchttpclient/AsyncCompletionHandler.java index fe193d37f..e5cb67207 100644 --- a/client/src/main/java/org/asynchttpclient/AsyncCompletionHandler.java +++ b/client/src/main/java/org/asynchttpclient/AsyncCompletionHandler.java @@ -18,6 +18,7 @@ import io.netty.handler.codec.http.HttpHeaders; import org.asynchttpclient.handler.ProgressAsyncHandler; +import org.jetbrains.annotations.Nullable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -66,7 +67,7 @@ public State onTrailingHeadersReceived(HttpHeaders headers) throws Exception { } @Override - public final T onCompleted() throws Exception { + public final @Nullable T onCompleted() throws Exception { return onCompleted(builder.build()); } @@ -83,7 +84,7 @@ public void onThrowable(Throwable t) { * {@link Future} * @throws Exception if something wrong happens */ - public abstract T onCompleted(Response response) throws Exception; + public abstract @Nullable T onCompleted(@Nullable Response response) throws Exception; /** * Invoked when the HTTP headers have been fully written on the I/O socket. diff --git a/client/src/main/java/org/asynchttpclient/AsyncCompletionHandlerBase.java b/client/src/main/java/org/asynchttpclient/AsyncCompletionHandlerBase.java index 3498bd643..8ad58eff6 100644 --- a/client/src/main/java/org/asynchttpclient/AsyncCompletionHandlerBase.java +++ b/client/src/main/java/org/asynchttpclient/AsyncCompletionHandlerBase.java @@ -17,12 +17,14 @@ package org.asynchttpclient; +import org.jetbrains.annotations.Nullable; + /** * Simple {@link AsyncHandler} of type {@link Response} */ public class AsyncCompletionHandlerBase extends AsyncCompletionHandler { @Override - public Response onCompleted(Response response) throws Exception { + public @Nullable Response onCompleted(@Nullable Response response) throws Exception { return response; } } diff --git a/client/src/main/java/org/asynchttpclient/AsyncHandler.java b/client/src/main/java/org/asynchttpclient/AsyncHandler.java index 80a1fc191..74099cc4d 100644 --- a/client/src/main/java/org/asynchttpclient/AsyncHandler.java +++ b/client/src/main/java/org/asynchttpclient/AsyncHandler.java @@ -18,6 +18,7 @@ import io.netty.channel.Channel; import io.netty.handler.codec.http.HttpHeaders; import org.asynchttpclient.netty.request.NettyRequest; +import org.jetbrains.annotations.Nullable; import javax.net.ssl.SSLSession; import java.net.InetSocketAddress; @@ -115,7 +116,7 @@ default State onTrailingHeadersReceived(HttpHeaders headers) throws Exception { * @return T Value that will be returned by the associated {@link Future} * @throws Exception if something wrong happens */ - T onCompleted() throws Exception; + @Nullable T onCompleted() throws Exception; /** * Notify the callback before hostname resolution diff --git a/client/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java b/client/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java index 1c5ab1b5a..972fa0b3a 100644 --- a/client/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java +++ b/client/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java @@ -34,6 +34,7 @@ import org.asynchttpclient.netty.channel.ConnectionSemaphoreFactory; import org.asynchttpclient.proxy.ProxyServer; import org.asynchttpclient.proxy.ProxyServerSelector; +import org.jetbrains.annotations.Nullable; import java.io.IOException; import java.time.Duration; @@ -159,7 +160,7 @@ public interface AsyncHttpClientConfig { * @return the {@link ThreadFactory} an {@link AsyncHttpClient} use for handling asynchronous response. If no {@link ThreadFactory} has been explicitly * provided, this method will return {@code null} */ - ThreadFactory getThreadFactory(); + @Nullable ThreadFactory getThreadFactory(); /** * An instance of {@link ProxyServer} used by an {@link AsyncHttpClient} @@ -173,14 +174,14 @@ public interface AsyncHttpClientConfig { * * @return an instance of {@link SslContext} used for SSL connection. */ - SslContext getSslContext(); + @Nullable SslContext getSslContext(); /** * Return the current {@link Realm} * * @return the current {@link Realm} */ - Realm getRealm(); + @Nullable Realm getRealm(); /** * Return the list of {@link RequestFilter} @@ -259,12 +260,12 @@ public interface AsyncHttpClientConfig { /** * @return the array of enabled protocols */ - String[] getEnabledProtocols(); + @Nullable String[] getEnabledProtocols(); /** * @return the array of enabled cipher suites */ - String[] getEnabledCipherSuites(); + @Nullable String[] getEnabledCipherSuites(); /** * @return if insecure cipher suites must be filtered out (only used when not explicitly passing enabled cipher suites) @@ -293,7 +294,7 @@ public interface AsyncHttpClientConfig { int getHandshakeTimeout(); - SslEngineFactory getSslEngineFactory(); + @Nullable SslEngineFactory getSslEngineFactory(); int getChunkedFileChunkSize(); @@ -309,23 +310,23 @@ public interface AsyncHttpClientConfig { Map, Object> getChannelOptions(); - EventLoopGroup getEventLoopGroup(); + @Nullable EventLoopGroup getEventLoopGroup(); boolean isUseNativeTransport(); boolean isUseOnlyEpollNativeTransport(); - Consumer getHttpAdditionalChannelInitializer(); + @Nullable Consumer getHttpAdditionalChannelInitializer(); - Consumer getWsAdditionalChannelInitializer(); + @Nullable Consumer getWsAdditionalChannelInitializer(); ResponseBodyPartFactory getResponseBodyPartFactory(); - ChannelPool getChannelPool(); + @Nullable ChannelPool getChannelPool(); - ConnectionSemaphoreFactory getConnectionSemaphoreFactory(); + @Nullable ConnectionSemaphoreFactory getConnectionSemaphoreFactory(); - Timer getNettyTimer(); + @Nullable Timer getNettyTimer(); /** * @return the duration between tick of {@link HashedWheelTimer} @@ -357,7 +358,7 @@ public interface AsyncHttpClientConfig { int getSoRcvBuf(); - ByteBufAllocator getAllocator(); + @Nullable ByteBufAllocator getAllocator(); int getIoThreadsCount(); diff --git a/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClient.java b/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClient.java index efcab12a9..ab841fa28 100644 --- a/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClient.java +++ b/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClient.java @@ -30,6 +30,7 @@ import org.asynchttpclient.handler.resumable.ResumableAsyncHandler; import org.asynchttpclient.netty.channel.ChannelManager; import org.asynchttpclient.netty.request.NettyRequestSender; +import org.jetbrains.annotations.Nullable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -68,7 +69,7 @@ public class DefaultAsyncHttpClient implements AsyncHttpClient { * Default signature calculator to use for all requests constructed by this * client instance. */ - private SignatureCalculator signatureCalculator; + private @Nullable SignatureCalculator signatureCalculator; /** * Create a new HTTP Asynchronous Client using the default @@ -95,8 +96,14 @@ public DefaultAsyncHttpClient(AsyncHttpClientConfig config) { this.config = config; noRequestFilters = config.getRequestFilters().isEmpty(); - allowStopNettyTimer = config.getNettyTimer() == null; - nettyTimer = allowStopNettyTimer ? newNettyTimer(config) : config.getNettyTimer(); + final Timer configTimer = config.getNettyTimer(); + if (configTimer == null) { + allowStopNettyTimer = true; + nettyTimer = newNettyTimer(config); + } else { + allowStopNettyTimer = false; + nettyTimer = configTimer; + } channelManager = new ChannelManager(config, nettyTimer); requestSender = new NettyRequestSender(config, channelManager, nettyTimer, new AsyncHttpClientState(closed)); diff --git a/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClientConfig.java b/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClientConfig.java index 9dfaa89f4..059cc3e78 100644 --- a/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClientConfig.java +++ b/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClientConfig.java @@ -34,6 +34,7 @@ import org.asynchttpclient.proxy.ProxyServer; import org.asynchttpclient.proxy.ProxyServerSelector; import org.asynchttpclient.util.ProxyUtils; +import org.jetbrains.annotations.Nullable; import java.time.Duration; import java.util.Collections; @@ -44,7 +45,63 @@ import java.util.concurrent.ThreadFactory; import java.util.function.Consumer; -import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.*; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultAcquireFreeChannelTimeout; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultAggregateWebSocketFrameFragments; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultChunkedFileChunkSize; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultCompressionEnforced; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultConnectTimeout; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultConnectionPoolCleanerPeriod; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultConnectionTtl; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultDisableHttpsEndpointIdentificationAlgorithm; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultDisableUrlEncodingForBoundRequests; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultDisableZeroCopy; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultEnableAutomaticDecompression; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultEnableWebSocketCompression; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultEnabledCipherSuites; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultEnabledProtocols; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultExpiredCookieEvictionDelay; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultFilterInsecureCipherSuites; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultFollowRedirect; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultHandshakeTimeout; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultHashedWheelTimerSize; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultHashedWheelTimerTickDuration; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultHttpClientCodecInitialBufferSize; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultHttpClientCodecMaxChunkSize; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultHttpClientCodecMaxHeaderSize; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultHttpClientCodecMaxInitialLineLength; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultIoThreadsCount; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultKeepAlive; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultKeepEncodingHeader; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultMaxConnections; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultMaxConnectionsPerHost; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultMaxRedirects; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultMaxRequestRetry; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultPooledConnectionIdleTimeout; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultReadTimeout; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultRequestTimeout; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultShutdownQuietPeriod; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultShutdownTimeout; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultSoKeepAlive; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultSoLinger; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultSoRcvBuf; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultSoReuseAddress; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultSoSndBuf; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultSslSessionCacheSize; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultSslSessionTimeout; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultStrict302Handling; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultTcpNoDelay; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultThreadPoolName; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultUseInsecureTrustManager; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultUseLaxCookieEncoder; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultUseNativeTransport; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultUseOnlyEpollNativeTransport; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultUseOpenSsl; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultUseProxyProperties; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultUseProxySelector; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultUserAgent; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultValidateResponseHeaders; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultWebSocketMaxBufferSize; +import static org.asynchttpclient.config.AsyncHttpClientConfigDefaults.defaultWebSocketMaxFrameSize; /** * Configuration class to use with a {@link AsyncHttpClient}. System property can be also used to configure this object default behavior by doing:
@@ -62,7 +119,7 @@ public class DefaultAsyncHttpClientConfig implements AsyncHttpClientConfig { private final boolean enableAutomaticDecompression; private final String userAgent; - private final Realm realm; + private final @Nullable Realm realm; private final int maxRequestRetry; private final boolean disableUrlEncodingForBoundRequests; private final boolean useLaxCookieEncoder; @@ -92,8 +149,8 @@ public class DefaultAsyncHttpClientConfig implements AsyncHttpClientConfig { private final int maxConnections; private final int maxConnectionsPerHost; private final int acquireFreeChannelTimeout; - private final ChannelPool channelPool; - private final ConnectionSemaphoreFactory connectionSemaphoreFactory; + private final @Nullable ChannelPool channelPool; + private final @Nullable ConnectionSemaphoreFactory connectionSemaphoreFactory; private final KeepAliveStrategy keepAliveStrategy; // ssl @@ -101,13 +158,13 @@ public class DefaultAsyncHttpClientConfig implements AsyncHttpClientConfig { private final boolean useInsecureTrustManager; private final boolean disableHttpsEndpointIdentificationAlgorithm; private final int handshakeTimeout; - private final String[] enabledProtocols; - private final String[] enabledCipherSuites; + private final @Nullable String[] enabledProtocols; + private final @Nullable String[] enabledCipherSuites; private final boolean filterInsecureCipherSuites; private final int sslSessionCacheSize; private final int sslSessionTimeout; - private final SslContext sslContext; - private final SslEngineFactory sslEngineFactory; + private final @Nullable SslContext sslContext; + private final @Nullable SslEngineFactory sslEngineFactory; // filters private final List requestFilters; @@ -126,20 +183,20 @@ public class DefaultAsyncHttpClientConfig implements AsyncHttpClientConfig { private final int httpClientCodecInitialBufferSize; private final int chunkedFileChunkSize; private final Map, Object> channelOptions; - private final EventLoopGroup eventLoopGroup; + private final @Nullable EventLoopGroup eventLoopGroup; private final boolean useNativeTransport; private final boolean useOnlyEpollNativeTransport; - private final ByteBufAllocator allocator; + private final @Nullable ByteBufAllocator allocator; private final boolean tcpNoDelay; private final boolean soReuseAddress; private final boolean soKeepAlive; private final int soLinger; private final int soSndBuf; private final int soRcvBuf; - private final Timer nettyTimer; - private final ThreadFactory threadFactory; - private final Consumer httpAdditionalChannelInitializer; - private final Consumer wsAdditionalChannelInitializer; + private final @Nullable Timer nettyTimer; + private final @Nullable ThreadFactory threadFactory; + private final @Nullable Consumer httpAdditionalChannelInitializer; + private final @Nullable Consumer wsAdditionalChannelInitializer; private final ResponseBodyPartFactory responseBodyPartFactory; private final int ioThreadsCount; private final long hashedWheelTimerTickDuration; @@ -152,7 +209,7 @@ private DefaultAsyncHttpClientConfig(// http boolean compressionEnforced, boolean enableAutomaticDecompression, String userAgent, - Realm realm, + @Nullable Realm realm, int maxRequestRetry, boolean disableUrlEncodingForBoundRequests, boolean useLaxCookieEncoder, @@ -178,8 +235,8 @@ private DefaultAsyncHttpClientConfig(// http int maxConnections, int maxConnectionsPerHost, int acquireFreeChannelTimeout, - ChannelPool channelPool, - ConnectionSemaphoreFactory connectionSemaphoreFactory, + @Nullable ChannelPool channelPool, + @Nullable ConnectionSemaphoreFactory connectionSemaphoreFactory, KeepAliveStrategy keepAliveStrategy, // ssl @@ -187,13 +244,13 @@ private DefaultAsyncHttpClientConfig(// http boolean useInsecureTrustManager, boolean disableHttpsEndpointIdentificationAlgorithm, int handshakeTimeout, - String[] enabledProtocols, - String[] enabledCipherSuites, + @Nullable String[] enabledProtocols, + @Nullable String[] enabledCipherSuites, boolean filterInsecureCipherSuites, int sslSessionCacheSize, int sslSessionTimeout, - SslContext sslContext, - SslEngineFactory sslEngineFactory, + @Nullable SslContext sslContext, + @Nullable SslEngineFactory sslEngineFactory, // filters List requestFilters, @@ -222,14 +279,14 @@ private DefaultAsyncHttpClientConfig(// http int webSocketMaxBufferSize, int webSocketMaxFrameSize, Map, Object> channelOptions, - EventLoopGroup eventLoopGroup, + @Nullable EventLoopGroup eventLoopGroup, boolean useNativeTransport, boolean useOnlyEpollNativeTransport, - ByteBufAllocator allocator, - Timer nettyTimer, - ThreadFactory threadFactory, - Consumer httpAdditionalChannelInitializer, - Consumer wsAdditionalChannelInitializer, + @Nullable ByteBufAllocator allocator, + @Nullable Timer nettyTimer, + @Nullable ThreadFactory threadFactory, + @Nullable Consumer httpAdditionalChannelInitializer, + @Nullable Consumer wsAdditionalChannelInitializer, ResponseBodyPartFactory responseBodyPartFactory, int ioThreadsCount, long hashedWheelTimerTickDuration, @@ -370,7 +427,7 @@ public String getUserAgent() { } @Override - public Realm getRealm() { + public @Nullable Realm getRealm() { return realm; } @@ -488,12 +545,12 @@ public int getAcquireFreeChannelTimeout() { } @Override - public ChannelPool getChannelPool() { + public @Nullable ChannelPool getChannelPool() { return channelPool; } @Override - public ConnectionSemaphoreFactory getConnectionSemaphoreFactory() { + public @Nullable ConnectionSemaphoreFactory getConnectionSemaphoreFactory() { return connectionSemaphoreFactory; } @@ -529,12 +586,12 @@ public int getHandshakeTimeout() { } @Override - public String[] getEnabledProtocols() { + public @Nullable String[] getEnabledProtocols() { return enabledProtocols; } @Override - public String[] getEnabledCipherSuites() { + public @Nullable String[] getEnabledCipherSuites() { return enabledCipherSuites; } @@ -554,12 +611,12 @@ public int getSslSessionTimeout() { } @Override - public SslContext getSslContext() { + public @Nullable SslContext getSslContext() { return sslContext; } @Override - public SslEngineFactory getSslEngineFactory() { + public @Nullable SslEngineFactory getSslEngineFactory() { return sslEngineFactory; } @@ -658,7 +715,7 @@ public Map, Object> getChannelOptions() { } @Override - public EventLoopGroup getEventLoopGroup() { + public @Nullable EventLoopGroup getEventLoopGroup() { return eventLoopGroup; } @@ -673,12 +730,12 @@ public boolean isUseOnlyEpollNativeTransport() { } @Override - public ByteBufAllocator getAllocator() { + public @Nullable ByteBufAllocator getAllocator() { return allocator; } @Override - public Timer getNettyTimer() { + public @Nullable Timer getNettyTimer() { return nettyTimer; } @@ -693,17 +750,17 @@ public int getHashedWheelTimerSize() { } @Override - public ThreadFactory getThreadFactory() { + public @Nullable ThreadFactory getThreadFactory() { return threadFactory; } @Override - public Consumer getHttpAdditionalChannelInitializer() { + public @Nullable Consumer getHttpAdditionalChannelInitializer() { return httpAdditionalChannelInitializer; } @Override - public Consumer getWsAdditionalChannelInitializer() { + public @Nullable Consumer getWsAdditionalChannelInitializer() { return wsAdditionalChannelInitializer; } @@ -733,13 +790,13 @@ public static class Builder { private boolean compressionEnforced = defaultCompressionEnforced(); private boolean enableAutomaticDecompression = defaultEnableAutomaticDecompression(); private String userAgent = defaultUserAgent(); - private Realm realm; + private @Nullable Realm realm; private int maxRequestRetry = defaultMaxRequestRetry(); private boolean disableUrlEncodingForBoundRequests = defaultDisableUrlEncodingForBoundRequests(); private boolean useLaxCookieEncoder = defaultUseLaxCookieEncoder(); private boolean disableZeroCopy = defaultDisableZeroCopy(); private boolean keepEncodingHeader = defaultKeepEncodingHeader(); - private ProxyServerSelector proxyServerSelector; + private @Nullable ProxyServerSelector proxyServerSelector; private boolean useProxySelector = defaultUseProxySelector(); private boolean useProxyProperties = defaultUseProxyProperties(); private boolean validateResponseHeaders = defaultValidateResponseHeaders(); @@ -765,8 +822,8 @@ public static class Builder { private int maxConnections = defaultMaxConnections(); private int maxConnectionsPerHost = defaultMaxConnectionsPerHost(); private int acquireFreeChannelTimeout = defaultAcquireFreeChannelTimeout(); - private ChannelPool channelPool; - private ConnectionSemaphoreFactory connectionSemaphoreFactory; + private @Nullable ChannelPool channelPool; + private @Nullable ConnectionSemaphoreFactory connectionSemaphoreFactory; private KeepAliveStrategy keepAliveStrategy = new DefaultKeepAliveStrategy(); // ssl @@ -774,13 +831,13 @@ public static class Builder { private boolean useInsecureTrustManager = defaultUseInsecureTrustManager(); private boolean disableHttpsEndpointIdentificationAlgorithm = defaultDisableHttpsEndpointIdentificationAlgorithm(); private int handshakeTimeout = defaultHandshakeTimeout(); - private String[] enabledProtocols = defaultEnabledProtocols(); - private String[] enabledCipherSuites = defaultEnabledCipherSuites(); + private @Nullable String[] enabledProtocols = defaultEnabledProtocols(); + private @Nullable String[] enabledCipherSuites = defaultEnabledCipherSuites(); private boolean filterInsecureCipherSuites = defaultFilterInsecureCipherSuites(); private int sslSessionCacheSize = defaultSslSessionCacheSize(); private int sslSessionTimeout = defaultSslSessionTimeout(); - private SslContext sslContext; - private SslEngineFactory sslEngineFactory; + private @Nullable SslContext sslContext; + private @Nullable SslEngineFactory sslEngineFactory; // cookie store private CookieStore cookieStore = new ThreadSafeCookieStore(); @@ -803,13 +860,13 @@ public static class Builder { private int chunkedFileChunkSize = defaultChunkedFileChunkSize(); private boolean useNativeTransport = defaultUseNativeTransport(); private boolean useOnlyEpollNativeTransport = defaultUseOnlyEpollNativeTransport(); - private ByteBufAllocator allocator; + private @Nullable ByteBufAllocator allocator; private final Map, Object> channelOptions = new HashMap<>(); - private EventLoopGroup eventLoopGroup; - private Timer nettyTimer; - private ThreadFactory threadFactory; - private Consumer httpAdditionalChannelInitializer; - private Consumer wsAdditionalChannelInitializer; + private @Nullable EventLoopGroup eventLoopGroup; + private @Nullable Timer nettyTimer; + private @Nullable ThreadFactory threadFactory; + private @Nullable Consumer httpAdditionalChannelInitializer; + private @Nullable Consumer wsAdditionalChannelInitializer; private ResponseBodyPartFactory responseBodyPartFactory = ResponseBodyPartFactory.EAGER; private int ioThreadsCount = defaultIoThreadsCount(); private long hashedWheelTickDuration = defaultHashedWheelTimerTickDuration(); diff --git a/client/src/main/java/org/asynchttpclient/DefaultRequest.java b/client/src/main/java/org/asynchttpclient/DefaultRequest.java index a885e67a9..4170c33e2 100644 --- a/client/src/main/java/org/asynchttpclient/DefaultRequest.java +++ b/client/src/main/java/org/asynchttpclient/DefaultRequest.java @@ -23,6 +23,7 @@ import org.asynchttpclient.request.body.generator.BodyGenerator; import org.asynchttpclient.request.body.multipart.Part; import org.asynchttpclient.uri.Uri; +import org.jetbrains.annotations.Nullable; import java.io.File; import java.io.InputStream; @@ -39,58 +40,58 @@ public class DefaultRequest implements Request { - public final ProxyServer proxyServer; + public final @Nullable ProxyServer proxyServer; private final String method; private final Uri uri; - private final InetAddress address; - private final InetAddress localAddress; + private final @Nullable InetAddress address; + private final @Nullable InetAddress localAddress; private final HttpHeaders headers; private final List cookies; - private final byte[] byteData; - private final List compositeByteData; - private final String stringData; - private final ByteBuffer byteBufferData; - private final InputStream streamData; - private final BodyGenerator bodyGenerator; + private final byte @Nullable [] byteData; + private final @Nullable List compositeByteData; + private final @Nullable String stringData; + private final @Nullable ByteBuffer byteBufferData; + private final @Nullable InputStream streamData; + private final @Nullable BodyGenerator bodyGenerator; private final List formParams; private final List bodyParts; - private final String virtualHost; - private final Realm realm; - private final File file; - private final Boolean followRedirect; + private final @Nullable String virtualHost; + private final @Nullable Realm realm; + private final @Nullable File file; + private final @Nullable Boolean followRedirect; private final Duration requestTimeout; private final Duration readTimeout; private final long rangeOffset; - private final Charset charset; + private final @Nullable Charset charset; private final ChannelPoolPartitioning channelPoolPartitioning; private final NameResolver nameResolver; // lazily loaded - private List queryParams; + private @Nullable List queryParams; public DefaultRequest(String method, Uri uri, - InetAddress address, - InetAddress localAddress, + @Nullable InetAddress address, + @Nullable InetAddress localAddress, HttpHeaders headers, List cookies, - byte[] byteData, - List compositeByteData, - String stringData, - ByteBuffer byteBufferData, - InputStream streamData, - BodyGenerator bodyGenerator, + byte @Nullable [] byteData, + @Nullable List compositeByteData, + @Nullable String stringData, + @Nullable ByteBuffer byteBufferData, + @Nullable InputStream streamData, + @Nullable BodyGenerator bodyGenerator, List formParams, List bodyParts, - String virtualHost, - ProxyServer proxyServer, - Realm realm, - File file, - Boolean followRedirect, - Duration requestTimeout, - Duration readTimeout, + @Nullable String virtualHost, + @Nullable ProxyServer proxyServer, + @Nullable Realm realm, + @Nullable File file, + @Nullable Boolean followRedirect, + @Nullable Duration requestTimeout, + @Nullable Duration readTimeout, long rangeOffset, - Charset charset, + @Nullable Charset charset, ChannelPoolPartitioning channelPoolPartitioning, NameResolver nameResolver) { this.method = method; @@ -136,12 +137,12 @@ public Uri getUri() { } @Override - public InetAddress getAddress() { + public @Nullable InetAddress getAddress() { return address; } @Override - public InetAddress getLocalAddress() { + public @Nullable InetAddress getLocalAddress() { return localAddress; } @@ -156,32 +157,32 @@ public List getCookies() { } @Override - public byte[] getByteData() { + public byte @Nullable [] getByteData() { return byteData; } @Override - public List getCompositeByteData() { + public @Nullable List getCompositeByteData() { return compositeByteData; } @Override - public String getStringData() { + public @Nullable String getStringData() { return stringData; } @Override - public ByteBuffer getByteBufferData() { + public @Nullable ByteBuffer getByteBufferData() { return byteBufferData; } @Override - public InputStream getStreamData() { + public @Nullable InputStream getStreamData() { return streamData; } @Override - public BodyGenerator getBodyGenerator() { + public @Nullable BodyGenerator getBodyGenerator() { return bodyGenerator; } @@ -196,27 +197,27 @@ public List getBodyParts() { } @Override - public String getVirtualHost() { + public @Nullable String getVirtualHost() { return virtualHost; } @Override - public ProxyServer getProxyServer() { + public @Nullable ProxyServer getProxyServer() { return proxyServer; } @Override - public Realm getRealm() { + public @Nullable Realm getRealm() { return realm; } @Override - public File getFile() { + public @Nullable File getFile() { return file; } @Override - public Boolean getFollowRedirect() { + public @Nullable Boolean getFollowRedirect() { return followRedirect; } @@ -236,7 +237,7 @@ public long getRangeOffset() { } @Override - public Charset getCharset() { + public @Nullable Charset getCharset() { return charset; } diff --git a/client/src/main/java/org/asynchttpclient/Param.java b/client/src/main/java/org/asynchttpclient/Param.java index 397d5b5fa..cbc35e196 100644 --- a/client/src/main/java/org/asynchttpclient/Param.java +++ b/client/src/main/java/org/asynchttpclient/Param.java @@ -15,6 +15,8 @@ */ package org.asynchttpclient; +import org.jetbrains.annotations.Nullable; + import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -27,14 +29,14 @@ public class Param { private final String name; - private final String value; + private final @Nullable String value; - public Param(String name, String value) { + public Param(String name, @Nullable String value) { this.name = name; this.value = value; } - public static List map2ParamList(Map> map) { + public static @Nullable List map2ParamList(Map> map) { if (map == null) { return null; } @@ -53,7 +55,7 @@ public String getName() { return name; } - public String getValue() { + public @Nullable String getValue() { return value; } diff --git a/client/src/main/java/org/asynchttpclient/Realm.java b/client/src/main/java/org/asynchttpclient/Realm.java index 271590da8..2006bd8b8 100644 --- a/client/src/main/java/org/asynchttpclient/Realm.java +++ b/client/src/main/java/org/asynchttpclient/Realm.java @@ -20,6 +20,7 @@ import org.asynchttpclient.util.AuthenticatorUtils; import org.asynchttpclient.util.StringBuilderPool; import org.asynchttpclient.util.StringUtils; +import org.jetbrains.annotations.Nullable; import java.nio.charset.Charset; import java.security.MessageDigest; @@ -45,51 +46,51 @@ public class Realm { // MD5("") private static final String EMPTY_ENTITY_MD5 = "d41d8cd98f00b204e9800998ecf8427e"; - private final String principal; - private final String password; + private final @Nullable String principal; + private final @Nullable String password; private final AuthScheme scheme; - private final String realmName; - private final String nonce; - private final String algorithm; - private final String response; - private final String opaque; - private final String qop; + private final @Nullable String realmName; + private final @Nullable String nonce; + private final @Nullable String algorithm; + private final @Nullable String response; + private final @Nullable String opaque; + private final @Nullable String qop; private final String nc; - private final String cnonce; - private final Uri uri; + private final @Nullable String cnonce; + private final @Nullable Uri uri; private final boolean usePreemptiveAuth; private final Charset charset; private final String ntlmHost; private final String ntlmDomain; private final boolean useAbsoluteURI; private final boolean omitQuery; - private final Map customLoginConfig; - private final String servicePrincipalName; + private final @Nullable Map customLoginConfig; + private final @Nullable String servicePrincipalName; private final boolean useCanonicalHostname; - private final String loginContextName; - - private Realm(AuthScheme scheme, - String principal, - String password, - String realmName, - String nonce, - String algorithm, - String response, - String opaque, - String qop, + private final @Nullable String loginContextName; + + private Realm(@Nullable AuthScheme scheme, + @Nullable String principal, + @Nullable String password, + @Nullable String realmName, + @Nullable String nonce, + @Nullable String algorithm, + @Nullable String response, + @Nullable String opaque, + @Nullable String qop, String nc, - String cnonce, - Uri uri, + @Nullable String cnonce, + @Nullable Uri uri, boolean usePreemptiveAuth, Charset charset, String ntlmDomain, String ntlmHost, boolean useAbsoluteURI, boolean omitQuery, - String servicePrincipalName, + @Nullable String servicePrincipalName, boolean useCanonicalHostname, - Map customLoginConfig, - String loginContextName) { + @Nullable Map customLoginConfig, + @Nullable String loginContextName) { this.scheme = assertNotNull(scheme, "scheme"); this.principal = principal; @@ -115,11 +116,11 @@ private Realm(AuthScheme scheme, this.loginContextName = loginContextName; } - public String getPrincipal() { + public @Nullable String getPrincipal() { return principal; } - public String getPassword() { + public @Nullable String getPassword() { return password; } @@ -127,27 +128,27 @@ public AuthScheme getScheme() { return scheme; } - public String getRealmName() { + public @Nullable String getRealmName() { return realmName; } - public String getNonce() { + public @Nullable String getNonce() { return nonce; } - public String getAlgorithm() { + public @Nullable String getAlgorithm() { return algorithm; } - public String getResponse() { + public @Nullable String getResponse() { return response; } - public String getOpaque() { + public @Nullable String getOpaque() { return opaque; } - public String getQop() { + public @Nullable String getQop() { return qop; } @@ -155,11 +156,11 @@ public String getNc() { return nc; } - public String getCnonce() { + public @Nullable String getCnonce() { return cnonce; } - public Uri getUri() { + public @Nullable Uri getUri() { return uri; } @@ -202,11 +203,11 @@ public boolean isOmitQuery() { return omitQuery; } - public Map getCustomLoginConfig() { + public @Nullable Map getCustomLoginConfig() { return customLoginConfig; } - public String getServicePrincipalName() { + public @Nullable String getServicePrincipalName() { return servicePrincipalName; } @@ -214,7 +215,7 @@ public boolean isUseCanonicalHostname() { return useCanonicalHostname; } - public String getLoginContextName() { + public @Nullable String getLoginContextName() { return loginContextName; } @@ -255,18 +256,18 @@ public enum AuthScheme { */ public static class Builder { - private final String principal; - private final String password; - private AuthScheme scheme; - private String realmName; - private String nonce; - private String algorithm; - private String response; - private String opaque; - private String qop; + private final @Nullable String principal; + private final @Nullable String password; + private @Nullable AuthScheme scheme; + private @Nullable String realmName; + private @Nullable String nonce; + private @Nullable String algorithm; + private @Nullable String response; + private @Nullable String opaque; + private @Nullable String qop; private String nc = DEFAULT_NC; - private String cnonce; - private Uri uri; + private @Nullable String cnonce; + private @Nullable Uri uri; private String methodName = GET; private boolean usePreemptive; private String ntlmDomain = System.getProperty("http.auth.ntlm.domain"); @@ -277,17 +278,17 @@ public static class Builder { /** * Kerberos/Spnego properties */ - private Map customLoginConfig; - private String servicePrincipalName; + private @Nullable Map customLoginConfig; + private @Nullable String servicePrincipalName; private boolean useCanonicalHostname; - private String loginContextName; + private @Nullable String loginContextName; public Builder() { principal = null; password = null; } - public Builder(String principal, String password) { + public Builder(@Nullable String principal, @Nullable String password) { this.principal = principal; this.password = password; } @@ -307,17 +308,17 @@ public Builder setScheme(AuthScheme scheme) { return this; } - public Builder setRealmName(String realmName) { + public Builder setRealmName(@Nullable String realmName) { this.realmName = realmName; return this; } - public Builder setNonce(String nonce) { + public Builder setNonce(@Nullable String nonce) { this.nonce = nonce; return this; } - public Builder setAlgorithm(String algorithm) { + public Builder setAlgorithm(@Nullable String algorithm) { this.algorithm = algorithm; return this; } @@ -327,12 +328,12 @@ public Builder setResponse(String response) { return this; } - public Builder setOpaque(String opaque) { + public Builder setOpaque(@Nullable String opaque) { this.opaque = opaque; return this; } - public Builder setQop(String qop) { + public Builder setQop(@Nullable String qop) { if (isNonEmpty(qop)) { this.qop = qop; } @@ -344,7 +345,7 @@ public Builder setNc(String nc) { return this; } - public Builder setUri(Uri uri) { + public Builder setUri(@Nullable Uri uri) { this.uri = uri; return this; } @@ -374,12 +375,12 @@ public Builder setCharset(Charset charset) { return this; } - public Builder setCustomLoginConfig(Map customLoginConfig) { + public Builder setCustomLoginConfig(@Nullable Map customLoginConfig) { this.customLoginConfig = customLoginConfig; return this; } - public Builder setServicePrincipalName(String servicePrincipalName) { + public Builder setServicePrincipalName(@Nullable String servicePrincipalName) { this.servicePrincipalName = servicePrincipalName; return this; } @@ -389,12 +390,12 @@ public Builder setUseCanonicalHostname(boolean useCanonicalHostname) { return this; } - public Builder setLoginContextName(String loginContextName) { + public Builder setLoginContextName(@Nullable String loginContextName) { this.loginContextName = loginContextName; return this; } - private static String parseRawQop(String rawQop) { + private static @Nullable String parseRawQop(String rawQop) { String[] rawServerSupportedQops = rawQop.split(","); String[] serverSupportedQops = new String[rawServerSupportedQops.length]; for (int i = 0; i < rawServerSupportedQops.length; i++) { @@ -461,7 +462,7 @@ private void newCnonce(MessageDigest md) { /** * TODO: A Pattern/Matcher may be better. */ - private static String match(String headerLine, String token) { + private static @Nullable String match(String headerLine, String token) { if (headerLine == null) { return null; } diff --git a/client/src/main/java/org/asynchttpclient/Request.java b/client/src/main/java/org/asynchttpclient/Request.java index 42d53cb8e..0f8cdaa06 100644 --- a/client/src/main/java/org/asynchttpclient/Request.java +++ b/client/src/main/java/org/asynchttpclient/Request.java @@ -24,6 +24,7 @@ import org.asynchttpclient.request.body.generator.BodyGenerator; import org.asynchttpclient.request.body.multipart.Part; import org.asynchttpclient.uri.Uri; +import org.jetbrains.annotations.Nullable; import java.io.File; import java.io.InputStream; @@ -65,12 +66,12 @@ public interface Request { /** * @return the InetAddress to be used to bypass uri's hostname resolution */ - InetAddress getAddress(); + @Nullable InetAddress getAddress(); /** * @return the local address to bind from */ - InetAddress getLocalAddress(); + @Nullable InetAddress getLocalAddress(); /** * @return the HTTP headers @@ -85,32 +86,32 @@ public interface Request { /** * @return the request's body byte array (only non null if it was set this way) */ - byte[] getByteData(); + byte @Nullable [] getByteData(); /** * @return the request's body array of byte arrays (only non null if it was set this way) */ - List getCompositeByteData(); + @Nullable List getCompositeByteData(); /** * @return the request's body string (only non null if it was set this way) */ - String getStringData(); + @Nullable String getStringData(); /** * @return the request's body ByteBuffer (only non null if it was set this way) */ - ByteBuffer getByteBufferData(); + @Nullable ByteBuffer getByteBufferData(); /** * @return the request's body InputStream (only non null if it was set this way) */ - InputStream getStreamData(); + @Nullable InputStream getStreamData(); /** * @return the request's body BodyGenerator (only non null if it was set this way) */ - BodyGenerator getBodyGenerator(); + @Nullable BodyGenerator getBodyGenerator(); /** * @return the request's form parameters @@ -125,7 +126,7 @@ public interface Request { /** * @return the virtual host to connect to */ - String getVirtualHost(); + @Nullable String getVirtualHost(); /** * @return the query params resolved from the url/uri @@ -135,22 +136,22 @@ public interface Request { /** * @return the proxy server to be used to perform this request (overrides the one defined in config) */ - ProxyServer getProxyServer(); + @Nullable ProxyServer getProxyServer(); /** * @return the realm to be used to perform this request (overrides the one defined in config) */ - Realm getRealm(); + @Nullable Realm getRealm(); /** * @return the file to be uploaded */ - File getFile(); + @Nullable File getFile(); /** * @return if this request is to follow redirects. Non null values means "override config value". */ - Boolean getFollowRedirect(); + @Nullable Boolean getFollowRedirect(); /** * @return the request timeout. Non zero values means "override config value". @@ -170,7 +171,7 @@ public interface Request { /** * @return the charset value used when decoding the request's body. */ - Charset getCharset(); + @Nullable Charset getCharset(); /** * @return the strategy to compute ChannelPool's keys diff --git a/client/src/main/java/org/asynchttpclient/RequestBuilderBase.java b/client/src/main/java/org/asynchttpclient/RequestBuilderBase.java index 059d9fe8b..0be0a8f44 100644 --- a/client/src/main/java/org/asynchttpclient/RequestBuilderBase.java +++ b/client/src/main/java/org/asynchttpclient/RequestBuilderBase.java @@ -26,7 +26,9 @@ import org.asynchttpclient.request.body.generator.BodyGenerator; import org.asynchttpclient.request.body.multipart.Part; import org.asynchttpclient.uri.Uri; +import org.asynchttpclient.util.EnsuresNonNull; import org.asynchttpclient.util.UriEncoder; +import org.jetbrains.annotations.Nullable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -60,33 +62,33 @@ public abstract class RequestBuilderBase> { public static final NameResolver DEFAULT_NAME_RESOLVER = new DefaultNameResolver(ImmediateEventExecutor.INSTANCE); // builder only fields protected UriEncoder uriEncoder; - protected List queryParams; - protected SignatureCalculator signatureCalculator; + protected @Nullable List queryParams; + protected @Nullable SignatureCalculator signatureCalculator; // request fields protected String method; - protected Uri uri; - protected InetAddress address; - protected InetAddress localAddress; + protected @Nullable Uri uri; + protected @Nullable InetAddress address; + protected @Nullable InetAddress localAddress; protected HttpHeaders headers; - protected ArrayList cookies; - protected byte[] byteData; - protected List compositeByteData; - protected String stringData; - protected ByteBuffer byteBufferData; - protected InputStream streamData; - protected BodyGenerator bodyGenerator; - protected List formParams; - protected List bodyParts; - protected String virtualHost; - protected ProxyServer proxyServer; - protected Realm realm; - protected File file; - protected Boolean followRedirect; - protected Duration requestTimeout; - protected Duration readTimeout; + protected @Nullable ArrayList cookies; + protected byte @Nullable [] byteData; + protected @Nullable List compositeByteData; + protected @Nullable String stringData; + protected @Nullable ByteBuffer byteBufferData; + protected @Nullable InputStream streamData; + protected @Nullable BodyGenerator bodyGenerator; + protected @Nullable List formParams; + protected @Nullable List bodyParts; + protected @Nullable String virtualHost; + protected @Nullable ProxyServer proxyServer; + protected @Nullable Realm realm; + protected @Nullable File file; + protected @Nullable Boolean followRedirect; + protected @Nullable Duration requestTimeout; + protected @Nullable Duration readTimeout; protected long rangeOffset; - protected Charset charset; + protected @Nullable Charset charset; protected ChannelPoolPartitioning channelPoolPartitioning = ChannelPoolPartitioning.PerHostChannelPoolPartitioning.INSTANCE; protected NameResolver nameResolver = DEFAULT_NAME_RESOLVER; @@ -293,6 +295,7 @@ public T setSingleHeaders(Map headers) { return asDerivedType(); } + @EnsuresNonNull("cookies") private void lazyInitCookies() { if (cookies == null) { cookies = new ArrayList<>(3); @@ -413,6 +416,7 @@ public T setBody(BodyGenerator bodyGenerator) { return asDerivedType(); } + @EnsuresNonNull("queryParams") public T addQueryParam(String name, String value) { if (queryParams == null) { queryParams = new ArrayList<>(1); @@ -421,6 +425,7 @@ public T addQueryParam(String name, String value) { return asDerivedType(); } + @EnsuresNonNull("queryParams") public T addQueryParams(List params) { if (queryParams == null) { queryParams = params; @@ -434,7 +439,7 @@ public T setQueryParams(Map> map) { return setQueryParams(Param.map2ParamList(map)); } - public T setQueryParams(List params) { + public T setQueryParams(@Nullable List params) { // reset existing query if (uri != null && isNonEmpty(uri.getQuery())) { uri = uri.withNewQuery(null); @@ -443,6 +448,7 @@ public T setQueryParams(List params) { return asDerivedType(); } + @EnsuresNonNull("formParams") public T addFormParam(String name, String value) { resetNonMultipartData(); resetMultipartData(); @@ -457,13 +463,14 @@ public T setFormParams(Map> map) { return setFormParams(Param.map2ParamList(map)); } - public T setFormParams(List params) { + public T setFormParams(@Nullable List params) { resetNonMultipartData(); resetMultipartData(); formParams = params; return asDerivedType(); } + @EnsuresNonNull("bodyParts") public T addBodyPart(Part bodyPart) { resetFormParams(); resetNonMultipartData(); @@ -474,6 +481,7 @@ public T addBodyPart(Part bodyPart) { return asDerivedType(); } + @EnsuresNonNull("bodyParts") public T setBodyParts(List bodyParts) { this.bodyParts = new ArrayList<>(bodyParts); return asDerivedType(); @@ -539,7 +547,7 @@ public T setNameResolver(NameResolver nameResolver) { return asDerivedType(); } - public T setSignatureCalculator(SignatureCalculator signatureCalculator) { + public T setSignatureCalculator(@Nullable SignatureCalculator signatureCalculator) { this.signatureCalculator = signatureCalculator; return asDerivedType(); } @@ -595,6 +603,7 @@ private RequestBuilderBase executeSignatureCalculator() { return rb; } + @EnsuresNonNull("charset") private void updateCharset() { String contentTypeHeader = headers.get(CONTENT_TYPE); Charset contentTypeCharset = extractContentTypeCharsetAttribute(contentTypeHeader); diff --git a/client/src/main/java/org/asynchttpclient/Response.java b/client/src/main/java/org/asynchttpclient/Response.java index 78a257e9c..8b9c9a6f1 100644 --- a/client/src/main/java/org/asynchttpclient/Response.java +++ b/client/src/main/java/org/asynchttpclient/Response.java @@ -20,6 +20,7 @@ import io.netty.handler.codec.http.cookie.Cookie; import org.asynchttpclient.netty.NettyResponse; import org.asynchttpclient.uri.Uri; +import org.jetbrains.annotations.Nullable; import java.io.InputStream; import java.net.SocketAddress; @@ -176,8 +177,8 @@ public interface Response { class ResponseBuilder { private final List bodyParts = new ArrayList<>(1); - private HttpResponseStatus status; - private HttpHeaders headers; + private @Nullable HttpResponseStatus status; + private @Nullable HttpHeaders headers; public void accumulate(HttpResponseStatus status) { this.status = status; @@ -201,7 +202,7 @@ public void accumulate(HttpResponseBodyPart bodyPart) { * * @return a {@link Response} instance */ - public Response build() { + public @Nullable Response build() { return status == null ? null : new NettyResponse(status, headers, bodyParts); } diff --git a/client/src/main/java/org/asynchttpclient/oauth/OAuthSignatureCalculatorInstance.java b/client/src/main/java/org/asynchttpclient/oauth/OAuthSignatureCalculatorInstance.java index 9363917a2..54401091f 100644 --- a/client/src/main/java/org/asynchttpclient/oauth/OAuthSignatureCalculatorInstance.java +++ b/client/src/main/java/org/asynchttpclient/oauth/OAuthSignatureCalculatorInstance.java @@ -21,6 +21,7 @@ import org.asynchttpclient.util.StringBuilderPool; import org.asynchttpclient.util.StringUtils; import org.asynchttpclient.util.Utf8UrlEncoder; +import org.jetbrains.annotations.Nullable; import javax.crypto.Mac; import javax.crypto.spec.SecretKeySpec; @@ -155,7 +156,7 @@ private String encodedParams(ConsumerKey consumerAuth, RequestToken userAuth, lo return parameters.sortAndConcat(); } - private static String percentEncodeAlreadyFormUrlEncoded(String s) { + private static String percentEncodeAlreadyFormUrlEncoded(@Nullable String s) { if (s == null) { return ""; } diff --git a/client/src/main/java/org/asynchttpclient/util/EnsuresNonNull.java b/client/src/main/java/org/asynchttpclient/util/EnsuresNonNull.java new file mode 100644 index 000000000..a0cecaf8e --- /dev/null +++ b/client/src/main/java/org/asynchttpclient/util/EnsuresNonNull.java @@ -0,0 +1,17 @@ +package org.asynchttpclient.util; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * NullAway supports @EnsuresNonNull(param) annotation, but org.jetbrains.annotations doesn't include this annotation. + * The purpose of this annotation is to tell NullAway that if the annotated method succeeded without any exceptions, + * all class's fields defined in "param" will be @NotNull. + */ +@Retention(RetentionPolicy.CLASS) +@Target({ElementType.METHOD}) +public @interface EnsuresNonNull { + String[] value(); +} diff --git a/pom.xml b/pom.xml index 0e6809729..d5ee16304 100644 --- a/pom.xml +++ b/pom.xml @@ -63,6 +63,7 @@ 2.0.5 2.0.1 1.4.5 + 24.0.1 @@ -203,7 +204,7 @@ org.jetbrains annotations - 24.0.1 + ${jetbrains-annotations.version} @@ -231,7 +232,8 @@ -Xep:NullablePrimitive:ERROR -Xep:NullOptional:ERROR -XepExcludedPaths:.*/src/test/java/.* - -XepOpt:NullAway:AnnotatedPackages=org.asynchttpclient.channel,org.asynchttpclient.config,org.asynchttpclient.cookie,org.asynchttpclient.exception,org.asynchttpclient.filter,org.asynchttpclient.oauth,org.asynchttpclient.proxy,org.asynchttpclient.resolver + -XepOpt:NullAway:AnnotatedPackages=org.asynchttpclient + -XepOpt:NullAway:UnannotatedSubPackages=org.asynchttpclient.handler,org.asynchttpclient.netty,org.asynchttpclient.ntlm,org.asynchttpclient.request,org.asynchttpclient.spnego,org.asynchttpclient.uri,org.asynchttpclient.util,org.asynchttpclient.webdav,org.asynchttpclient.ws -XepOpt:NullAway:AcknowledgeRestrictiveAnnotations=true -Xep:NullAway:ERROR From de8d88b3081fc905c59f10e806a0799c875e5477 Mon Sep 17 00:00:00 2001 From: Asapin <1559761+Asapin@users.noreply.github.com> Date: Sun, 7 May 2023 22:18:28 +0900 Subject: [PATCH 010/167] Enabled NullAway for "handler" package (#1879) --- .../handler/BodyDeferringAsyncHandler.java | 11 ++++++----- .../handler/TransferCompletionHandler.java | 5 +++-- .../handler/resumable/ResumableAsyncHandler.java | 14 ++++++++------ pom.xml | 2 +- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/client/src/main/java/org/asynchttpclient/handler/BodyDeferringAsyncHandler.java b/client/src/main/java/org/asynchttpclient/handler/BodyDeferringAsyncHandler.java index 660ed62ff..72f7a648a 100644 --- a/client/src/main/java/org/asynchttpclient/handler/BodyDeferringAsyncHandler.java +++ b/client/src/main/java/org/asynchttpclient/handler/BodyDeferringAsyncHandler.java @@ -17,6 +17,7 @@ import org.asynchttpclient.HttpResponseBodyPart; import org.asynchttpclient.HttpResponseStatus; import org.asynchttpclient.Response; +import org.jetbrains.annotations.Nullable; import java.io.FilterInputStream; import java.io.IOException; @@ -88,8 +89,8 @@ public class BodyDeferringAsyncHandler implements AsyncHandler { private final OutputStream output; private final Semaphore semaphore = new Semaphore(1); private boolean responseSet; - private volatile Response response; - private volatile Throwable throwable; + private volatile @Nullable Response response; + private volatile @Nullable Throwable throwable; public BodyDeferringAsyncHandler(final OutputStream os) { output = os; @@ -166,7 +167,7 @@ protected void closeOut() throws IOException { } @Override - public Response onCompleted() throws IOException { + public @Nullable Response onCompleted() throws IOException { if (!responseSet) { response = responseBuilder.build(); @@ -217,7 +218,7 @@ public Response onCompleted() throws IOException { * @throws InterruptedException if the latch is interrupted * @throws IOException if the handler completed with an exception */ - public Response getResponse() throws InterruptedException, IOException { + public @Nullable Response getResponse() throws InterruptedException, IOException { // block here as long as headers arrive headersArrived.await(); @@ -278,7 +279,7 @@ public void close() throws IOException { * @throws InterruptedException if the latch is interrupted * @throws IOException if the handler completed with an exception */ - public Response getAsapResponse() throws InterruptedException, IOException { + public @Nullable Response getAsapResponse() throws InterruptedException, IOException { return bdah.getResponse(); } diff --git a/client/src/main/java/org/asynchttpclient/handler/TransferCompletionHandler.java b/client/src/main/java/org/asynchttpclient/handler/TransferCompletionHandler.java index 85b0ded15..e0705ad25 100644 --- a/client/src/main/java/org/asynchttpclient/handler/TransferCompletionHandler.java +++ b/client/src/main/java/org/asynchttpclient/handler/TransferCompletionHandler.java @@ -17,6 +17,7 @@ import org.asynchttpclient.AsyncHandler; import org.asynchttpclient.HttpResponseBodyPart; import org.asynchttpclient.Response; +import org.jetbrains.annotations.Nullable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -59,7 +60,7 @@ public class TransferCompletionHandler extends AsyncCompletionHandlerBase { private final ConcurrentLinkedQueue listeners = new ConcurrentLinkedQueue<>(); private final boolean accumulateResponseBytes; - private HttpHeaders headers; + private @Nullable HttpHeaders headers; /** * Create a TransferCompletionHandler that will not accumulate bytes. The resulting {@link Response#getResponseBody()}, @@ -116,7 +117,7 @@ public State onBodyPartReceived(final HttpResponseBodyPart content) throws Excep } @Override - public Response onCompleted(Response response) throws Exception { + public @Nullable Response onCompleted(@Nullable Response response) throws Exception { fireOnEnd(); return response; } diff --git a/client/src/main/java/org/asynchttpclient/handler/resumable/ResumableAsyncHandler.java b/client/src/main/java/org/asynchttpclient/handler/resumable/ResumableAsyncHandler.java index 3cef60a7c..a52c52f5a 100644 --- a/client/src/main/java/org/asynchttpclient/handler/resumable/ResumableAsyncHandler.java +++ b/client/src/main/java/org/asynchttpclient/handler/resumable/ResumableAsyncHandler.java @@ -21,11 +21,13 @@ import org.asynchttpclient.Response; import org.asynchttpclient.Response.ResponseBuilder; import org.asynchttpclient.handler.TransferCompletionHandler; +import org.jetbrains.annotations.Nullable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.IOException; import java.nio.ByteBuffer; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.concurrent.ConcurrentLinkedQueue; @@ -47,18 +49,18 @@ public class ResumableAsyncHandler implements AsyncHandler { private static final Logger logger = LoggerFactory.getLogger(TransferCompletionHandler.class); private static final ResumableIndexThread resumeIndexThread = new ResumableIndexThread(); - private static Map resumableIndex; + private static Map resumableIndex = Collections.emptyMap(); private final AtomicLong byteTransferred; private final ResumableProcessor resumableProcessor; - private final AsyncHandler decoratedAsyncHandler; + private final @Nullable AsyncHandler decoratedAsyncHandler; private final boolean accumulateBody; - private String url; + private String url = ""; private final ResponseBuilder responseBuilder = new ResponseBuilder(); private ResumableListener resumableListener = new NULLResumableListener(); - private ResumableAsyncHandler(long byteTransferred, ResumableProcessor resumableProcessor, - AsyncHandler decoratedAsyncHandler, boolean accumulateBody) { + private ResumableAsyncHandler(long byteTransferred, @Nullable ResumableProcessor resumableProcessor, + @Nullable AsyncHandler decoratedAsyncHandler, boolean accumulateBody) { this.byteTransferred = new AtomicLong(byteTransferred); @@ -152,7 +154,7 @@ public State onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception } @Override - public Response onCompleted() throws Exception { + public @Nullable Response onCompleted() throws Exception { resumableProcessor.remove(url); resumableListener.onAllBytesReceived(); diff --git a/pom.xml b/pom.xml index d5ee16304..56e956cfa 100644 --- a/pom.xml +++ b/pom.xml @@ -233,7 +233,7 @@ -Xep:NullOptional:ERROR -XepExcludedPaths:.*/src/test/java/.* -XepOpt:NullAway:AnnotatedPackages=org.asynchttpclient - -XepOpt:NullAway:UnannotatedSubPackages=org.asynchttpclient.handler,org.asynchttpclient.netty,org.asynchttpclient.ntlm,org.asynchttpclient.request,org.asynchttpclient.spnego,org.asynchttpclient.uri,org.asynchttpclient.util,org.asynchttpclient.webdav,org.asynchttpclient.ws + -XepOpt:NullAway:UnannotatedSubPackages=org.asynchttpclient.netty,org.asynchttpclient.ntlm,org.asynchttpclient.request,org.asynchttpclient.spnego,org.asynchttpclient.uri,org.asynchttpclient.util,org.asynchttpclient.webdav,org.asynchttpclient.ws -XepOpt:NullAway:AcknowledgeRestrictiveAnnotations=true -Xep:NullAway:ERROR From 3e10703e6ad875f33ecea86b1d14ce0c1c3db8e5 Mon Sep 17 00:00:00 2001 From: Asapin <1559761+Asapin@users.noreply.github.com> Date: Sun, 21 May 2023 17:46:05 +0900 Subject: [PATCH 011/167] Bumped ErrorProne version and enabled NullAway for "uri" package (#1882) * Bump error prone version * Enabled NullAway for uri package --- .../java/org/asynchttpclient/uri/Uri.java | 25 +++-- .../org/asynchttpclient/uri/UriParser.java | 94 +++++++++++-------- .../org/asynchttpclient/util/MiscUtils.java | 1 + .../asynchttpclient/uri/UriParserTest.java | 9 +- pom.xml | 4 +- 5 files changed, 71 insertions(+), 62 deletions(-) diff --git a/client/src/main/java/org/asynchttpclient/uri/Uri.java b/client/src/main/java/org/asynchttpclient/uri/Uri.java index 25278307a..1c76ff2ce 100644 --- a/client/src/main/java/org/asynchttpclient/uri/Uri.java +++ b/client/src/main/java/org/asynchttpclient/uri/Uri.java @@ -16,6 +16,7 @@ package org.asynchttpclient.uri; import org.asynchttpclient.util.StringBuilderPool; +import org.jetbrains.annotations.Nullable; import java.net.URI; import java.net.URISyntaxException; @@ -31,17 +32,17 @@ public class Uri { public static final String WS = "ws"; public static final String WSS = "wss"; private final String scheme; - private final String userInfo; + private final @Nullable String userInfo; private final String host; private final int port; - private final String query; + private final @Nullable String query; private final String path; - private final String fragment; - private String url; + private final @Nullable String fragment; + private @Nullable String url; private final boolean secured; private final boolean webSocket; - public Uri(String scheme, String userInfo, String host, int port, String path, String query, String fragment) { + public Uri(String scheme, @Nullable String userInfo, String host, int port, String path, @Nullable String query, @Nullable String fragment) { this.scheme = assertNotEmpty(scheme, "scheme"); this.userInfo = userInfo; this.host = assertNotEmpty(host, "host"); @@ -57,10 +58,8 @@ public static Uri create(String originalUrl) { return create(null, originalUrl); } - public static Uri create(Uri context, final String originalUrl) { - UriParser parser = new UriParser(); - parser.parse(context, originalUrl); - + public static Uri create(@Nullable Uri context, final String originalUrl) { + UriParser parser = UriParser.parse(context, originalUrl); if (isEmpty(parser.scheme)) { throw new IllegalArgumentException(originalUrl + " could not be parsed into a proper Uri, missing scheme"); } @@ -71,7 +70,7 @@ public static Uri create(Uri context, final String originalUrl) { return new Uri(parser.scheme, parser.userInfo, parser.host, parser.port, parser.path, parser.query, parser.fragment); } - public String getQuery() { + public @Nullable String getQuery() { return query; } @@ -79,7 +78,7 @@ public String getPath() { return path; } - public String getUserInfo() { + public @Nullable String getUserInfo() { return userInfo; } @@ -95,7 +94,7 @@ public String getHost() { return host; } - public String getFragment() { + public @Nullable String getFragment() { return fragment; } @@ -203,7 +202,7 @@ public Uri withNewScheme(String newScheme) { return new Uri(newScheme, userInfo, host, port, path, query, fragment); } - public Uri withNewQuery(String newQuery) { + public Uri withNewQuery(@Nullable String newQuery) { return new Uri(scheme, userInfo, host, port, path, newQuery, fragment); } diff --git a/client/src/main/java/org/asynchttpclient/uri/UriParser.java b/client/src/main/java/org/asynchttpclient/uri/UriParser.java index c339d147a..b0bad47ce 100644 --- a/client/src/main/java/org/asynchttpclient/uri/UriParser.java +++ b/client/src/main/java/org/asynchttpclient/uri/UriParser.java @@ -15,23 +15,29 @@ */ package org.asynchttpclient.uri; +import org.jetbrains.annotations.Nullable; + import static org.asynchttpclient.util.Assertions.assertNotNull; import static org.asynchttpclient.util.MiscUtils.isNonEmpty; final class UriParser { - public String scheme; - public String host; + public @Nullable String scheme; + public @Nullable String host; public int port = -1; - public String query; - public String fragment; - private String authority; - public String path; - public String userInfo; + public @Nullable String query; + public @Nullable String fragment; + private @Nullable String authority; + public String path = ""; + public @Nullable String userInfo; - private String originalUrl; + private final String originalUrl; private int start, end, currentIndex; + private UriParser(final String originalUrl) { + this.originalUrl = originalUrl; + } + private void trimLeft() { while (start < end && originalUrl.charAt(start) <= ' ') { start++; @@ -86,7 +92,7 @@ private void computeInitialScheme() { } } - private boolean overrideWithContext(Uri context) { + private boolean overrideWithContext(@Nullable Uri context) { boolean isRelative = false; @@ -126,7 +132,9 @@ private void trimFragment() { } } - private void inheritContextQuery(Uri context, boolean isRelative) { + // isRelative can be true only when context is not null + @SuppressWarnings("NullAway") + private void inheritContextQuery(@Nullable Uri context, boolean isRelative) { // see RFC2396 5.2.2: query and fragment inheritance if (isRelative && currentIndex == end) { query = context.getQuery(); @@ -156,7 +164,7 @@ private boolean currentPositionStartsWith2Slashes() { return originalUrl.regionMatches(currentIndex, "//", 0, 2); } - private void computeAuthority() { + private String computeAuthority() { int authorityEndPosition = findWithinCurrentRange('/'); if (authorityEndPosition == -1) { authorityEndPosition = findWithinCurrentRange('?'); @@ -166,59 +174,60 @@ private void computeAuthority() { } host = authority = originalUrl.substring(currentIndex, authorityEndPosition); currentIndex = authorityEndPosition; + return authority; } - private void computeUserInfo() { - int atPosition = authority.indexOf('@'); + private void computeUserInfo(String nonNullAuthority) { + int atPosition = nonNullAuthority.indexOf('@'); if (atPosition != -1) { - userInfo = authority.substring(0, atPosition); - host = authority.substring(atPosition + 1); + userInfo = nonNullAuthority.substring(0, atPosition); + host = nonNullAuthority.substring(atPosition + 1); } else { userInfo = null; } } - private boolean isMaybeIPV6() { + private boolean isMaybeIPV6(String nonNullHost) { // If the host is surrounded by [ and ] then its an IPv6 // literal address as specified in RFC2732 - return host.length() > 0 && host.charAt(0) == '['; + return nonNullHost.length() > 0 && nonNullHost.charAt(0) == '['; } - private void computeIPV6() { - int positionAfterClosingSquareBrace = host.indexOf(']') + 1; + private void computeIPV6(String nonNullHost) { + int positionAfterClosingSquareBrace = nonNullHost.indexOf(']') + 1; if (positionAfterClosingSquareBrace > 1) { port = -1; - if (host.length() > positionAfterClosingSquareBrace) { - if (host.charAt(positionAfterClosingSquareBrace) == ':') { + if (nonNullHost.length() > positionAfterClosingSquareBrace) { + if (nonNullHost.charAt(positionAfterClosingSquareBrace) == ':') { // see RFC2396: port can be null int portPosition = positionAfterClosingSquareBrace + 1; - if (host.length() > portPosition) { - port = Integer.parseInt(host.substring(portPosition)); + if (nonNullHost.length() > portPosition) { + port = Integer.parseInt(nonNullHost.substring(portPosition)); } } else { throw new IllegalArgumentException("Invalid authority field: " + authority); } } - host = host.substring(0, positionAfterClosingSquareBrace); + host = nonNullHost.substring(0, positionAfterClosingSquareBrace); } else { throw new IllegalArgumentException("Invalid authority field: " + authority); } } - private void computeRegularHostPort() { - int colonPosition = host.indexOf(':'); + private void computeRegularHostPort(String nonNullHost) { + int colonPosition = nonNullHost.indexOf(':'); port = -1; if (colonPosition >= 0) { // see RFC2396: port can be null int portPosition = colonPosition + 1; - if (host.length() > portPosition) { - port = Integer.parseInt(host.substring(portPosition)); + if (nonNullHost.length() > portPosition) { + port = Integer.parseInt(nonNullHost.substring(portPosition)); } - host = host.substring(0, colonPosition); + host = nonNullHost.substring(0, colonPosition); } } @@ -293,14 +302,15 @@ private void parseAuthority() { if (!currentPositionStartsWith4Slashes() && currentPositionStartsWith2Slashes()) { currentIndex += 2; - computeAuthority(); - computeUserInfo(); + String nonNullAuthority = computeAuthority(); + computeUserInfo(nonNullAuthority); if (host != null) { - if (isMaybeIPV6()) { - computeIPV6(); + String nonNullHost = host; + if (isMaybeIPV6(nonNullHost)) { + computeIPV6(nonNullHost); } else { - computeRegularHostPort(); + computeRegularHostPort(nonNullHost); } } @@ -336,17 +346,12 @@ private void computePath(boolean queryOnly) { // Parse the file path if any if (currentIndex < end) { computeRegularPath(); - } else if (queryOnly && path != null) { + } else if (queryOnly) { computeQueryOnlyPath(); - } else if (path == null) { - path = ""; } } - public void parse(Uri context, final String originalUrl) { - - assertNotNull(originalUrl, "originalUrl"); - this.originalUrl = originalUrl; + private void parse(@Nullable Uri context) { end = originalUrl.length(); trimLeft(); @@ -362,4 +367,11 @@ public void parse(Uri context, final String originalUrl) { parseAuthority(); computePath(queryOnly); } + + public static UriParser parse(@Nullable Uri context, final String originalUrl) { + assertNotNull(originalUrl, "originalUrl"); + final UriParser parser = new UriParser(originalUrl); + parser.parse(context); + return parser; + } } \ No newline at end of file diff --git a/client/src/main/java/org/asynchttpclient/util/MiscUtils.java b/client/src/main/java/org/asynchttpclient/util/MiscUtils.java index 6e7f184e6..99c1e827b 100644 --- a/client/src/main/java/org/asynchttpclient/util/MiscUtils.java +++ b/client/src/main/java/org/asynchttpclient/util/MiscUtils.java @@ -32,6 +32,7 @@ public static boolean isNonEmpty(@Nullable String string) { return !isEmpty(string); } + @Contract(value = "null -> true", pure = true) public static boolean isEmpty(@Nullable String string) { return string == null || string.isEmpty(); } diff --git a/client/src/test/java/org/asynchttpclient/uri/UriParserTest.java b/client/src/test/java/org/asynchttpclient/uri/UriParserTest.java index 362141f89..1e314f56d 100644 --- a/client/src/test/java/org/asynchttpclient/uri/UriParserTest.java +++ b/client/src/test/java/org/asynchttpclient/uri/UriParserTest.java @@ -33,14 +33,12 @@ private static void assertUriEquals(UriParser parser, URI uri) { } private static void validateAgainstAbsoluteURI(String url) { - UriParser parser = new UriParser(); - parser.parse(null, url); + final UriParser parser = UriParser.parse(null, url); assertUriEquals(parser, URI.create(url)); } private static void validateAgainstRelativeURI(Uri uriContext, String urlContext, String url) { - UriParser parser = new UriParser(); - parser.parse(uriContext, url); + final UriParser parser = UriParser.parse(uriContext, url); assertUriEquals(parser, URI.create(urlContext).resolve(URI.create(url))); } @@ -56,9 +54,8 @@ public void testFragmentTryingToTrickAuthorityAsBasicAuthCredentials() { @RepeatedIfExceptionsTest(repeats = 5) public void testUrlHasLeadingAndTrailingWhiteSpace() { - UriParser parser = new UriParser(); String url = " http://user@example.com:8080/test?q=1 "; - parser.parse(null, url); + final UriParser parser = UriParser.parse(null, url); assertUriEquals(parser, URI.create(url.trim())); } diff --git a/pom.xml b/pom.xml index 56e956cfa..d5cfc2b7d 100644 --- a/pom.xml +++ b/pom.xml @@ -233,7 +233,7 @@ -Xep:NullOptional:ERROR -XepExcludedPaths:.*/src/test/java/.* -XepOpt:NullAway:AnnotatedPackages=org.asynchttpclient - -XepOpt:NullAway:UnannotatedSubPackages=org.asynchttpclient.netty,org.asynchttpclient.ntlm,org.asynchttpclient.request,org.asynchttpclient.spnego,org.asynchttpclient.uri,org.asynchttpclient.util,org.asynchttpclient.webdav,org.asynchttpclient.ws + -XepOpt:NullAway:UnannotatedSubPackages=org.asynchttpclient.netty,org.asynchttpclient.ntlm,org.asynchttpclient.request,org.asynchttpclient.spnego,org.asynchttpclient.util,org.asynchttpclient.webdav,org.asynchttpclient.ws -XepOpt:NullAway:AcknowledgeRestrictiveAnnotations=true -Xep:NullAway:ERROR @@ -242,7 +242,7 @@ com.google.errorprone error_prone_core - 2.18.0 + 2.19.1 com.uber.nullaway From e504fa57fd1d1901d63319cc4b6daf363cbfb3ea Mon Sep 17 00:00:00 2001 From: Asapin <1559761+Asapin@users.noreply.github.com> Date: Mon, 5 Jun 2023 00:25:00 +0900 Subject: [PATCH 012/167] Fixed another potential NPE in OAuth1 (#1883) * Added new failing test when there are 2 duplicating form parameters but one if them has null as a value * Fixed potentian NPE when form params include two params with the same name and one of the param has null as a value --- .../OAuthSignatureCalculatorInstance.java | 3 +- .../oauth/OAuthSignatureCalculatorTest.java | 37 +++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/client/src/main/java/org/asynchttpclient/oauth/OAuthSignatureCalculatorInstance.java b/client/src/main/java/org/asynchttpclient/oauth/OAuthSignatureCalculatorInstance.java index 54401091f..ec7da244f 100644 --- a/client/src/main/java/org/asynchttpclient/oauth/OAuthSignatureCalculatorInstance.java +++ b/client/src/main/java/org/asynchttpclient/oauth/OAuthSignatureCalculatorInstance.java @@ -143,7 +143,8 @@ private String encodedParams(ConsumerKey consumerAuth, RequestToken userAuth, lo if (formParams != null) { for (Param param : formParams) { // formParams are not already encoded - parameters.add(Utf8UrlEncoder.percentEncodeQueryElement(param.getName()), Utf8UrlEncoder.percentEncodeQueryElement(param.getValue())); + String value = param.getValue() != null ? Utf8UrlEncoder.percentEncodeQueryElement(param.getValue()) : ""; + parameters.add(Utf8UrlEncoder.percentEncodeQueryElement(param.getName()), value); } } if (queryParams != null) { diff --git a/client/src/test/java/org/asynchttpclient/oauth/OAuthSignatureCalculatorTest.java b/client/src/test/java/org/asynchttpclient/oauth/OAuthSignatureCalculatorTest.java index b8e2091e6..b48094aa5 100644 --- a/client/src/test/java/org/asynchttpclient/oauth/OAuthSignatureCalculatorTest.java +++ b/client/src/test/java/org/asynchttpclient/oauth/OAuthSignatureCalculatorTest.java @@ -147,6 +147,43 @@ public void testSignatureBaseStringWithNoValueQueryParameter() throws NoSuchAlgo testSignatureBaseStringWithEncodableOAuthToken(request); } + @Test + public void testDuplicatingNullValueFormParameter() throws Exception { + // Form parameter with no value in OAuth1 should be treated the same as form parameter with an empty value. + // Tested with http://lti.tools/oauth/ + Request request = post("http://example.com/request?b5=%3D%253D&a3=a&c%40=&a2=r%20b") + .addFormParam("c2", "") + .addFormParam("a3", "2 q") + .addFormParam("c2", null) + .build(); + + String signatureBaseString = new OAuthSignatureCalculatorInstance() + .signatureBaseString(// + new ConsumerKey(CONSUMER_KEY, CONSUMER_SECRET), + new RequestToken(TOKEN_KEY, TOKEN_SECRET), + request.getUri(), + request.getMethod(), + request.getFormParams(), + request.getQueryParams(), + TIMESTAMP, + NONCE).toString(); + assertEquals("POST&" + + "http%3A%2F%2Fexample.com%2Frequest" + + "&a2%3Dr%2520b%26" + + "a3%3D2%2520q%26" + + "a3%3Da%26" + + "b5%3D%253D%25253D%26" + + "c%2540%3D%26" + + "c2%3D%26" + + "c2%3D%26" + + "oauth_consumer_key%3Ddpf43f3p2l4k3l03%26" + + "oauth_nonce%3Dkllo9940pd9333jh%26" + + "oauth_signature_method%3DHMAC-SHA1%26" + + "oauth_timestamp%3D1191242096%26" + + "oauth_token%3Dnnch734d00sl2jdk%26" + + "oauth_version%3D1.0", signatureBaseString); + } + // based on the reference test case from // http://oauth.pbwiki.com/TestCases @RepeatedIfExceptionsTest(repeats = 5) From 6f1fb819c669a437d2394b5b20ea5f91b77ffafc Mon Sep 17 00:00:00 2001 From: Asapin <1559761+Asapin@users.noreply.github.com> Date: Mon, 5 Jun 2023 14:40:31 +0900 Subject: [PATCH 013/167] Enabled NullAway for util package (#1885) * Added new failing test when there are 2 duplicating form parameters but one if them has null as a value * Fixed potentian NPE when form params include two params with the same name and one of the param has null as a value * Enabled NullAway for util package --- .../asynchttpclient/proxy/ProxyServer.java | 2 +- .../org/asynchttpclient/util/Assertions.java | 9 ++++-- .../util/AuthenticatorUtils.java | 32 +++++++++++-------- .../org/asynchttpclient/util/HttpUtils.java | 9 +++--- .../org/asynchttpclient/util/MiscUtils.java | 4 +++ .../org/asynchttpclient/util/ProxyUtils.java | 3 +- .../org/asynchttpclient/util/UriEncoder.java | 13 ++++---- .../asynchttpclient/util/Utf8UrlEncoder.java | 8 +++-- pom.xml | 2 +- 9 files changed, 51 insertions(+), 31 deletions(-) diff --git a/client/src/main/java/org/asynchttpclient/proxy/ProxyServer.java b/client/src/main/java/org/asynchttpclient/proxy/ProxyServer.java index a87b04b34..c7d1d6106 100644 --- a/client/src/main/java/org/asynchttpclient/proxy/ProxyServer.java +++ b/client/src/main/java/org/asynchttpclient/proxy/ProxyServer.java @@ -147,7 +147,7 @@ public Builder setSecuredPort(int securedPort) { return this; } - public Builder setRealm(Realm realm) { + public Builder setRealm(@Nullable Realm realm) { this.realm = realm; return this; } diff --git a/client/src/main/java/org/asynchttpclient/util/Assertions.java b/client/src/main/java/org/asynchttpclient/util/Assertions.java index aaffeb64e..5a5f29c06 100644 --- a/client/src/main/java/org/asynchttpclient/util/Assertions.java +++ b/client/src/main/java/org/asynchttpclient/util/Assertions.java @@ -15,12 +15,16 @@ */ package org.asynchttpclient.util; +import org.jetbrains.annotations.Contract; +import org.jetbrains.annotations.Nullable; + public final class Assertions { private Assertions() { } - public static T assertNotNull(T value, String name) { + @Contract(value = "null, _ -> fail", pure = true) + public static T assertNotNull(@Nullable T value, String name) { if (value == null) { throw new NullPointerException(name); } @@ -28,7 +32,8 @@ public static T assertNotNull(T value, String name) { } - public static String assertNotEmpty(String value, String name) { + @Contract(value = "null, _ -> fail", pure = true) + public static String assertNotEmpty(@Nullable String value, String name) { assertNotNull(value, name); if (value.length() == 0) { throw new IllegalArgumentException("empty " + name); diff --git a/client/src/main/java/org/asynchttpclient/util/AuthenticatorUtils.java b/client/src/main/java/org/asynchttpclient/util/AuthenticatorUtils.java index 89be54be8..4e2c4aed3 100644 --- a/client/src/main/java/org/asynchttpclient/util/AuthenticatorUtils.java +++ b/client/src/main/java/org/asynchttpclient/util/AuthenticatorUtils.java @@ -19,6 +19,7 @@ import org.asynchttpclient.spnego.SpnegoEngine; import org.asynchttpclient.spnego.SpnegoEngineException; import org.asynchttpclient.uri.Uri; +import org.jetbrains.annotations.Nullable; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; @@ -38,7 +39,7 @@ private AuthenticatorUtils() { // Prevent outside initialization } - public static String getHeaderWithPrefix(List authenticateHeaders, String prefix) { + public static @Nullable String getHeaderWithPrefix(@Nullable List authenticateHeaders, String prefix) { if (authenticateHeaders != null) { for (String authenticateHeader : authenticateHeaders) { if (authenticateHeader.regionMatches(true, 0, prefix, 0, prefix.length())) { @@ -50,11 +51,11 @@ public static String getHeaderWithPrefix(List authenticateHeaders, Strin return null; } - private static String computeBasicAuthentication(Realm realm) { + private static @Nullable String computeBasicAuthentication(@Nullable Realm realm) { return realm != null ? computeBasicAuthentication(realm.getPrincipal(), realm.getPassword(), realm.getCharset()) : null; } - private static String computeBasicAuthentication(String principal, String password, Charset charset) { + private static String computeBasicAuthentication(@Nullable String principal, @Nullable String password, Charset charset) { String s = principal + ':' + password; return "Basic " + Base64.getEncoder().encodeToString(s.getBytes(charset)); } @@ -68,9 +69,9 @@ public static String computeRealmURI(Uri uri, boolean useAbsoluteURI, boolean om } } - private static String computeDigestAuthentication(Realm realm) { + private static String computeDigestAuthentication(Realm realm, Uri uri) { - String realmUri = computeRealmURI(realm.getUri(), realm.isUseAbsoluteURI(), realm.isOmitQuery()); + String realmUri = computeRealmURI(uri, realm.isUseAbsoluteURI(), realm.isOmitQuery()); StringBuilder builder = new StringBuilder().append("Digest "); append(builder, "username", realm.getPrincipal(), true); @@ -99,7 +100,7 @@ private static String computeDigestAuthentication(Realm realm) { return new String(StringUtils.charSequence2Bytes(builder, ISO_8859_1), StandardCharsets.UTF_8); } - private static void append(StringBuilder builder, String name, String value, boolean quoted) { + private static void append(StringBuilder builder, String name, @Nullable String value, boolean quoted) { builder.append(name).append('='); if (quoted) { builder.append('"').append(value).append('"'); @@ -109,7 +110,7 @@ private static void append(StringBuilder builder, String name, String value, boo builder.append(", "); } - public static String perConnectionProxyAuthorizationHeader(Request request, Realm proxyRealm) { + public static @Nullable String perConnectionProxyAuthorizationHeader(Request request, @Nullable Realm proxyRealm) { String proxyAuthorization = null; if (proxyRealm != null && proxyRealm.isUsePreemptiveAuth()) { switch (proxyRealm.getScheme()) { @@ -130,7 +131,7 @@ public static String perConnectionProxyAuthorizationHeader(Request request, Real return proxyAuthorization; } - public static String perRequestProxyAuthorizationHeader(Request request, Realm proxyRealm) { + public static @Nullable String perRequestProxyAuthorizationHeader(Request request, @Nullable Realm proxyRealm) { String proxyAuthorization = null; if (proxyRealm != null && proxyRealm.isUsePreemptiveAuth()) { @@ -141,11 +142,12 @@ public static String perRequestProxyAuthorizationHeader(Request request, Realm p case DIGEST: if (isNonEmpty(proxyRealm.getNonce())) { // update realm with request information + final Uri uri = request.getUri(); proxyRealm = realm(proxyRealm) - .setUri(request.getUri()) + .setUri(uri) .setMethodName(request.getMethod()) .build(); - proxyAuthorization = computeDigestAuthentication(proxyRealm); + proxyAuthorization = computeDigestAuthentication(proxyRealm, uri); } break; case NTLM: @@ -162,7 +164,8 @@ public static String perRequestProxyAuthorizationHeader(Request request, Realm p return proxyAuthorization; } - public static String perConnectionAuthorizationHeader(Request request, ProxyServer proxyServer, Realm realm) { + public static @Nullable String perConnectionAuthorizationHeader(Request request, @Nullable ProxyServer proxyServer, + @Nullable Realm realm) { String authorizationHeader = null; if (realm != null && realm.isUsePreemptiveAuth()) { @@ -203,7 +206,7 @@ public static String perConnectionAuthorizationHeader(Request request, ProxyServ return authorizationHeader; } - public static String perRequestAuthorizationHeader(Request request, Realm realm) { + public static @Nullable String perRequestAuthorizationHeader(Request request, @Nullable Realm realm) { String authorizationHeader = null; if (realm != null && realm.isUsePreemptiveAuth()) { @@ -214,11 +217,12 @@ public static String perRequestAuthorizationHeader(Request request, Realm realm) case DIGEST: if (isNonEmpty(realm.getNonce())) { // update realm with request information + final Uri uri = request.getUri(); realm = realm(realm) - .setUri(request.getUri()) + .setUri(uri) .setMethodName(request.getMethod()) .build(); - authorizationHeader = computeDigestAuthentication(realm); + authorizationHeader = computeDigestAuthentication(realm, uri); } break; case NTLM: diff --git a/client/src/main/java/org/asynchttpclient/util/HttpUtils.java b/client/src/main/java/org/asynchttpclient/util/HttpUtils.java index e7e703657..f62e2f235 100644 --- a/client/src/main/java/org/asynchttpclient/util/HttpUtils.java +++ b/client/src/main/java/org/asynchttpclient/util/HttpUtils.java @@ -19,6 +19,7 @@ import org.asynchttpclient.Param; import org.asynchttpclient.Request; import org.asynchttpclient.uri.Uri; +import org.jetbrains.annotations.Nullable; import java.net.URLEncoder; import java.nio.ByteBuffer; @@ -59,16 +60,16 @@ public static String originHeader(Uri uri) { return sb.toString(); } - public static Charset extractContentTypeCharsetAttribute(String contentType) { + public static @Nullable Charset extractContentTypeCharsetAttribute(String contentType) { String charsetName = extractContentTypeAttribute(contentType, CONTENT_TYPE_CHARSET_ATTRIBUTE); return charsetName != null ? Charset.forName(charsetName) : null; } - public static String extractContentTypeBoundaryAttribute(String contentType) { + public static @Nullable String extractContentTypeBoundaryAttribute(String contentType) { return extractContentTypeAttribute(contentType, CONTENT_TYPE_BOUNDARY_ATTRIBUTE); } - private static String extractContentTypeAttribute(String contentType, String attribute) { + private static @Nullable String extractContentTypeAttribute(@Nullable String contentType, String attribute) { if (contentType == null) { return null; } @@ -147,7 +148,7 @@ private static StringBuilder urlEncodeFormParams0(List params, Charset ch return sb; } - private static void encodeAndAppendFormParam(StringBuilder sb, String name, String value, Charset charset) { + private static void encodeAndAppendFormParam(StringBuilder sb, String name, @Nullable String value, Charset charset) { encodeAndAppendFormField(sb, name, charset); if (value != null) { sb.append('='); diff --git a/client/src/main/java/org/asynchttpclient/util/MiscUtils.java b/client/src/main/java/org/asynchttpclient/util/MiscUtils.java index 99c1e827b..12506b9a9 100644 --- a/client/src/main/java/org/asynchttpclient/util/MiscUtils.java +++ b/client/src/main/java/org/asynchttpclient/util/MiscUtils.java @@ -37,18 +37,22 @@ public static boolean isEmpty(@Nullable String string) { return string == null || string.isEmpty(); } + @Contract(value = "null -> false", pure = true) public static boolean isNonEmpty(@Nullable Object[] array) { return array != null && array.length != 0; } + @Contract(value = "null -> false", pure = true) public static boolean isNonEmpty(byte @Nullable [] array) { return array != null && array.length != 0; } + @Contract(value = "null -> false") public static boolean isNonEmpty(@Nullable Collection collection) { return collection != null && !collection.isEmpty(); } + @Contract(value = "null -> false") public static boolean isNonEmpty(@Nullable Map map) { return map != null && !map.isEmpty(); } diff --git a/client/src/main/java/org/asynchttpclient/util/ProxyUtils.java b/client/src/main/java/org/asynchttpclient/util/ProxyUtils.java index e849379e3..0942ddd8e 100644 --- a/client/src/main/java/org/asynchttpclient/util/ProxyUtils.java +++ b/client/src/main/java/org/asynchttpclient/util/ProxyUtils.java @@ -17,6 +17,7 @@ import org.asynchttpclient.Request; import org.asynchttpclient.proxy.ProxyServer; import org.asynchttpclient.proxy.ProxyServerSelector; +import org.jetbrains.annotations.Nullable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -80,7 +81,7 @@ private ProxyUtils() { * @param request the request * @return the proxy server to be used for this request (can be null) */ - public static ProxyServer getProxyServer(AsyncHttpClientConfig config, Request request) { + public static @Nullable ProxyServer getProxyServer(AsyncHttpClientConfig config, Request request) { ProxyServer proxyServer = request.getProxyServer(); if (proxyServer == null) { ProxyServerSelector selector = config.getProxyServerSelector(); diff --git a/client/src/main/java/org/asynchttpclient/util/UriEncoder.java b/client/src/main/java/org/asynchttpclient/util/UriEncoder.java index 653477367..126edee3d 100644 --- a/client/src/main/java/org/asynchttpclient/util/UriEncoder.java +++ b/client/src/main/java/org/asynchttpclient/util/UriEncoder.java @@ -17,6 +17,7 @@ import org.asynchttpclient.Param; import org.asynchttpclient.uri.Uri; +import org.jetbrains.annotations.Nullable; import java.util.List; @@ -31,7 +32,7 @@ public String encodePath(String path) { return Utf8UrlEncoder.encodePath(path); } - private void encodeAndAppendQueryParam(final StringBuilder sb, final CharSequence name, final CharSequence value) { + private void encodeAndAppendQueryParam(final StringBuilder sb, final CharSequence name, final @Nullable CharSequence value) { Utf8UrlEncoder.encodeAndAppendQueryElement(sb, name); if (value != null) { sb.append('='); @@ -81,7 +82,7 @@ public String encodePath(String path) { return path; } - private void appendRawQueryParam(StringBuilder sb, String name, String value) { + private void appendRawQueryParam(StringBuilder sb, String name, @Nullable String value) { sb.append(name); if (value != null) { sb.append('=').append(value); @@ -131,15 +132,15 @@ public static UriEncoder uriEncoder(boolean disableUrlEncoding) { protected abstract String withoutQueryWithParams(List queryParams); - private String withQuery(final String query, final List queryParams) { + private String withQuery(final String query, final @Nullable List queryParams) { return isNonEmpty(queryParams) ? withQueryWithParams(query, queryParams) : withQueryWithoutParams(query); } - private String withoutQuery(final List queryParams) { + private @Nullable String withoutQuery(final @Nullable List queryParams) { return isNonEmpty(queryParams) ? withoutQueryWithParams(queryParams) : null; } - public Uri encode(Uri uri, List queryParams) { + public Uri encode(Uri uri, @Nullable List queryParams) { String newPath = encodePath(uri.getPath()); String newQuery = encodeQuery(uri.getQuery(), queryParams); return new Uri(uri.getScheme(), @@ -153,7 +154,7 @@ public Uri encode(Uri uri, List queryParams) { protected abstract String encodePath(String path); - private String encodeQuery(final String query, final List queryParams) { + private @Nullable String encodeQuery(final @Nullable String query, final @Nullable List queryParams) { return isNonEmpty(query) ? withQuery(query, queryParams) : withoutQuery(queryParams); } } diff --git a/client/src/main/java/org/asynchttpclient/util/Utf8UrlEncoder.java b/client/src/main/java/org/asynchttpclient/util/Utf8UrlEncoder.java index fbf7739f0..f2928fa60 100644 --- a/client/src/main/java/org/asynchttpclient/util/Utf8UrlEncoder.java +++ b/client/src/main/java/org/asynchttpclient/util/Utf8UrlEncoder.java @@ -15,6 +15,9 @@ */ package org.asynchttpclient.util; +import org.jetbrains.annotations.Contract; +import org.jetbrains.annotations.Nullable; + import java.util.BitSet; public final class Utf8UrlEncoder { @@ -144,7 +147,8 @@ public static StringBuilder encodeAndAppendFormElement(StringBuilder sb, CharSeq return appendEncoded(sb, input, FORM_URL_ENCODED_SAFE_CHARS, true); } - public static String percentEncodeQueryElement(String input) { + @Contract(value = "!null -> !null") + public static @Nullable String percentEncodeQueryElement(@Nullable String input) { if (input == null) { return null; } @@ -165,7 +169,7 @@ private static StringBuilder lazyInitStringBuilder(CharSequence input, int first return sb; } - private static StringBuilder lazyAppendEncoded(StringBuilder sb, CharSequence input, BitSet dontNeedEncoding, boolean encodeSpaceAsPlus) { + private static @Nullable StringBuilder lazyAppendEncoded(@Nullable StringBuilder sb, CharSequence input, BitSet dontNeedEncoding, boolean encodeSpaceAsPlus) { int c; for (int i = 0; i < input.length(); i += Character.charCount(c)) { c = Character.codePointAt(input, i); diff --git a/pom.xml b/pom.xml index d5cfc2b7d..9be825199 100644 --- a/pom.xml +++ b/pom.xml @@ -233,7 +233,7 @@ -Xep:NullOptional:ERROR -XepExcludedPaths:.*/src/test/java/.* -XepOpt:NullAway:AnnotatedPackages=org.asynchttpclient - -XepOpt:NullAway:UnannotatedSubPackages=org.asynchttpclient.netty,org.asynchttpclient.ntlm,org.asynchttpclient.request,org.asynchttpclient.spnego,org.asynchttpclient.util,org.asynchttpclient.webdav,org.asynchttpclient.ws + -XepOpt:NullAway:UnannotatedSubPackages=org.asynchttpclient.netty,org.asynchttpclient.ntlm,org.asynchttpclient.request,org.asynchttpclient.spnego,org.asynchttpclient.webdav,org.asynchttpclient.ws -XepOpt:NullAway:AcknowledgeRestrictiveAnnotations=true -Xep:NullAway:ERROR From 8f8b6375472646a2f67ca1dd859a387c58101868 Mon Sep 17 00:00:00 2001 From: Asapin <1559761+Asapin@users.noreply.github.com> Date: Mon, 5 Jun 2023 18:54:17 +0900 Subject: [PATCH 014/167] Enabled NullAway for spnego and webdav packages (#1886) * Enabled NullAway for WebDav package * Enabled NullAway for spnego package --- .../spnego/NamePasswordCallbackHandler.java | 13 +++---- .../asynchttpclient/spnego/SpnegoEngine.java | 35 ++++++++++--------- .../spnego/SpnegoEngineException.java | 6 ++-- .../webdav/WebDavCompletionHandlerBase.java | 15 ++++---- .../webdav/WebDavResponse.java | 7 ++-- .../spnego/SpnegoEngineTest.java | 14 ++++++++ pom.xml | 2 +- 7 files changed, 58 insertions(+), 34 deletions(-) diff --git a/client/src/main/java/org/asynchttpclient/spnego/NamePasswordCallbackHandler.java b/client/src/main/java/org/asynchttpclient/spnego/NamePasswordCallbackHandler.java index e055ad8f3..164ee5471 100644 --- a/client/src/main/java/org/asynchttpclient/spnego/NamePasswordCallbackHandler.java +++ b/client/src/main/java/org/asynchttpclient/spnego/NamePasswordCallbackHandler.java @@ -15,6 +15,7 @@ */ package org.asynchttpclient.spnego; +import org.jetbrains.annotations.Nullable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -32,14 +33,14 @@ public class NamePasswordCallbackHandler implements CallbackHandler { private static final Class[] PASSWORD_CALLBACK_TYPES = new Class[]{Object.class, char[].class, String.class}; private final String username; - private final String password; - private final String passwordCallbackName; + private final @Nullable String password; + private final @Nullable String passwordCallbackName; - public NamePasswordCallbackHandler(String username, String password) { + public NamePasswordCallbackHandler(String username, @Nullable String password) { this(username, password, null); } - public NamePasswordCallbackHandler(String username, String password, String passwordCallbackName) { + public NamePasswordCallbackHandler(String username, @Nullable String password, @Nullable String passwordCallbackName) { this.username = username; this.password = password; this.passwordCallbackName = passwordCallbackName; @@ -54,7 +55,7 @@ public void handle(Callback[] callbacks) throws IOException, UnsupportedCallback ((NameCallback) callback).setName(username); } else if (callback instanceof PasswordCallback) { PasswordCallback pwCallback = (PasswordCallback) callback; - pwCallback.setPassword(password.toCharArray()); + pwCallback.setPassword(password != null ? password.toCharArray() : null); } else if (!invokePasswordCallback(callback)) { String errorMsg = "Unsupported callback type " + callback.getClass().getName(); log.info(errorMsg); @@ -80,7 +81,7 @@ private boolean invokePasswordCallback(Callback callback) { try { Method method = callback.getClass().getMethod(cbname, arg); Object[] args = { - arg == String.class ? password : password.toCharArray() + arg == String.class ? password : password != null ? password.toCharArray() : null }; method.invoke(callback, args); return true; diff --git a/client/src/main/java/org/asynchttpclient/spnego/SpnegoEngine.java b/client/src/main/java/org/asynchttpclient/spnego/SpnegoEngine.java index 0006b7aef..d67d923bb 100644 --- a/client/src/main/java/org/asynchttpclient/spnego/SpnegoEngine.java +++ b/client/src/main/java/org/asynchttpclient/spnego/SpnegoEngine.java @@ -42,6 +42,7 @@ import org.ietf.jgss.GSSManager; import org.ietf.jgss.GSSName; import org.ietf.jgss.Oid; +import org.jetbrains.annotations.Nullable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -70,17 +71,19 @@ public class SpnegoEngine { private static final String KERBEROS_OID = "1.2.840.113554.1.2.2"; private static final Map instances = new HashMap<>(); private final Logger log = LoggerFactory.getLogger(getClass()); - private final SpnegoTokenGenerator spnegoGenerator; - private final String username; - private final String password; - private final String servicePrincipalName; - private final String realmName; + private final @Nullable SpnegoTokenGenerator spnegoGenerator; + private final @Nullable String username; + private final @Nullable String password; + private final @Nullable String servicePrincipalName; + private final @Nullable String realmName; private final boolean useCanonicalHostname; - private final String loginContextName; - private final Map customLoginConfig; + private final @Nullable String loginContextName; + private final @Nullable Map customLoginConfig; - public SpnegoEngine(final String username, final String password, final String servicePrincipalName, final String realmName, final boolean useCanonicalHostname, - final Map customLoginConfig, final String loginContextName, final SpnegoTokenGenerator spnegoGenerator) { + public SpnegoEngine(final @Nullable String username, final @Nullable String password, + final @Nullable String servicePrincipalName, final @Nullable String realmName, + final boolean useCanonicalHostname, final @Nullable Map customLoginConfig, + final @Nullable String loginContextName, final @Nullable SpnegoTokenGenerator spnegoGenerator) { this.username = username; this.password = password; this.servicePrincipalName = servicePrincipalName; @@ -95,8 +98,10 @@ public SpnegoEngine() { this(null, null, null, null, true, null, null, null); } - public static SpnegoEngine instance(final String username, final String password, final String servicePrincipalName, final String realmName, - final boolean useCanonicalHostname, final Map customLoginConfig, final String loginContextName) { + public static SpnegoEngine instance(final @Nullable String username, final @Nullable String password, + final @Nullable String servicePrincipalName, final @Nullable String realmName, + final boolean useCanonicalHostname, final @Nullable Map customLoginConfig, + final @Nullable String loginContextName) { String key = ""; if (customLoginConfig != null && !customLoginConfig.isEmpty()) { StringBuilder customLoginConfigKeyValues = new StringBuilder(); @@ -151,7 +156,6 @@ public String generateToken(String host) throws SpnegoEngineException { // Try SPNEGO by default, fall back to Kerberos later if error negotiationOid = new Oid(SPNEGO_OID); - boolean tryKerberos = false; String spn = getCompleteServicePrincipalName(host); try { GSSManager manager = GSSManager.getInstance(); @@ -181,13 +185,12 @@ public String generateToken(String host) throws SpnegoEngineException { // Rethrow any other exception. if (ex.getMajor() == GSSException.BAD_MECH) { log.debug("GSSException BAD_MECH, retry with Kerberos MECH"); - tryKerberos = true; } else { throw ex; } } - if (tryKerberos) { + if (gssContext == null) { /* Kerberos v5 GSS-API mechanism defined in RFC 1964. */ log.debug("Using Kerberos MECH {}", KERBEROS_OID); negotiationOid = new Oid(KERBEROS_OID); @@ -270,14 +273,14 @@ private String getCanonicalHostname(String hostname) { return canonicalHostname; } - private CallbackHandler getUsernamePasswordHandler() { + private @Nullable CallbackHandler getUsernamePasswordHandler() { if (username == null) { return null; } return new NamePasswordCallbackHandler(username, password); } - public Configuration getLoginConfiguration() { + public @Nullable Configuration getLoginConfiguration() { if (customLoginConfig != null && !customLoginConfig.isEmpty()) { return new Configuration() { @Override diff --git a/client/src/main/java/org/asynchttpclient/spnego/SpnegoEngineException.java b/client/src/main/java/org/asynchttpclient/spnego/SpnegoEngineException.java index 2dff563f6..a28c0996a 100644 --- a/client/src/main/java/org/asynchttpclient/spnego/SpnegoEngineException.java +++ b/client/src/main/java/org/asynchttpclient/spnego/SpnegoEngineException.java @@ -15,6 +15,8 @@ */ package org.asynchttpclient.spnego; +import org.jetbrains.annotations.Nullable; + /** * Signals SPNEGO protocol failure. */ @@ -22,11 +24,11 @@ public class SpnegoEngineException extends Exception { private static final long serialVersionUID = -3123799505052881438L; - public SpnegoEngineException(String message) { + public SpnegoEngineException(@Nullable String message) { super(message); } - public SpnegoEngineException(String message, Throwable cause) { + public SpnegoEngineException(@Nullable String message, Throwable cause) { super(message, cause); } } diff --git a/client/src/main/java/org/asynchttpclient/webdav/WebDavCompletionHandlerBase.java b/client/src/main/java/org/asynchttpclient/webdav/WebDavCompletionHandlerBase.java index b17064952..bf57ddd21 100644 --- a/client/src/main/java/org/asynchttpclient/webdav/WebDavCompletionHandlerBase.java +++ b/client/src/main/java/org/asynchttpclient/webdav/WebDavCompletionHandlerBase.java @@ -18,6 +18,7 @@ import org.asynchttpclient.HttpResponseStatus; import org.asynchttpclient.Response; import org.asynchttpclient.netty.NettyResponse; +import org.jetbrains.annotations.Nullable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.w3c.dom.Document; @@ -45,8 +46,8 @@ public abstract class WebDavCompletionHandlerBase implements AsyncHandler private static final Logger LOGGER = LoggerFactory.getLogger(WebDavCompletionHandlerBase.class); private static final DocumentBuilderFactory DOCUMENT_BUILDER_FACTORY; private final List bodyParts = Collections.synchronizedList(new ArrayList<>()); - private HttpResponseStatus status; - private HttpHeaders headers; + private @Nullable HttpResponseStatus status; + private @Nullable HttpHeaders headers; static { DOCUMENT_BUILDER_FACTORY = DocumentBuilderFactory.newInstance(); @@ -78,11 +79,11 @@ public final State onHeadersReceived(final HttpHeaders headers) { return State.CONTINUE; } - private Document readXMLResponse(InputStream stream) { + private Document readXMLResponse(InputStream stream, HttpResponseStatus initialStatus) { Document document; try { document = DOCUMENT_BUILDER_FACTORY.newDocumentBuilder().parse(stream); - parse(document); + status = parse(document, initialStatus); } catch (SAXException | IOException | ParserConfigurationException e) { LOGGER.error(e.getMessage(), e); throw new RuntimeException(e); @@ -90,7 +91,8 @@ private Document readXMLResponse(InputStream stream) { return document; } - private void parse(Document document) { + private static HttpResponseStatus parse(Document document, HttpResponseStatus initialStatus) { + HttpResponseStatus status = initialStatus; Element element = document.getDocumentElement(); NodeList statusNode = element.getElementsByTagName("status"); for (int i = 0; i < statusNode.getLength(); i++) { @@ -101,6 +103,7 @@ private void parse(Document document) { String statusText = value.substring(value.lastIndexOf(' ')); status = new HttpStatusWrapper(status, statusText, statusCode); } + return status; } @Override @@ -108,7 +111,7 @@ public final T onCompleted() throws Exception { if (status != null) { Document document = null; if (status.getStatusCode() == 207) { - document = readXMLResponse(new NettyResponse(status, headers, bodyParts).getResponseBodyAsStream()); + document = readXMLResponse(new NettyResponse(status, headers, bodyParts).getResponseBodyAsStream(), status); } // recompute response as readXMLResponse->parse might have updated it return onCompleted(new WebDavResponse(new NettyResponse(status, headers, bodyParts), document)); diff --git a/client/src/main/java/org/asynchttpclient/webdav/WebDavResponse.java b/client/src/main/java/org/asynchttpclient/webdav/WebDavResponse.java index ae84a1b80..650212d2e 100644 --- a/client/src/main/java/org/asynchttpclient/webdav/WebDavResponse.java +++ b/client/src/main/java/org/asynchttpclient/webdav/WebDavResponse.java @@ -16,6 +16,7 @@ import io.netty.handler.codec.http.cookie.Cookie; import org.asynchttpclient.Response; import org.asynchttpclient.uri.Uri; +import org.jetbrains.annotations.Nullable; import org.w3c.dom.Document; import java.io.InputStream; @@ -30,9 +31,9 @@ public class WebDavResponse implements Response { private final Response response; - private final Document document; + private final @Nullable Document document; - WebDavResponse(Response response, Document document) { + WebDavResponse(Response response, @Nullable Document document) { this.response = response; this.document = document; } @@ -132,7 +133,7 @@ public SocketAddress getLocalAddress() { return response.getLocalAddress(); } - public Document getBodyAsXML() { + public @Nullable Document getBodyAsXML() { return document; } } diff --git a/client/src/test/java/org/asynchttpclient/spnego/SpnegoEngineTest.java b/client/src/test/java/org/asynchttpclient/spnego/SpnegoEngineTest.java index fcc3baf78..523ca40c8 100644 --- a/client/src/test/java/org/asynchttpclient/spnego/SpnegoEngineTest.java +++ b/client/src/test/java/org/asynchttpclient/spnego/SpnegoEngineTest.java @@ -21,6 +21,7 @@ import org.asynchttpclient.AbstractBasicTest; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import java.io.File; import java.util.HashMap; @@ -96,6 +97,19 @@ public void testSpnegoGenerateTokenWithUsernamePassword() throws Exception { assertTrue(token.startsWith("YII")); } + @Test + public void testSpnegoGenerateTokenWithNullPasswordFail() { + SpnegoEngine spnegoEngine = new SpnegoEngine("alice", + null, + "bob", + "service.ws.apache.org", + false, + null, + "alice", + null); + assertThrows(SpnegoEngineException.class, () -> spnegoEngine.generateToken("localhost"), "No password provided"); + } + @RepeatedIfExceptionsTest(repeats = 5) public void testSpnegoGenerateTokenWithUsernamePasswordFail() throws Exception { SpnegoEngine spnegoEngine = new SpnegoEngine("alice", diff --git a/pom.xml b/pom.xml index 9be825199..2427f5516 100644 --- a/pom.xml +++ b/pom.xml @@ -233,7 +233,7 @@ -Xep:NullOptional:ERROR -XepExcludedPaths:.*/src/test/java/.* -XepOpt:NullAway:AnnotatedPackages=org.asynchttpclient - -XepOpt:NullAway:UnannotatedSubPackages=org.asynchttpclient.netty,org.asynchttpclient.ntlm,org.asynchttpclient.request,org.asynchttpclient.spnego,org.asynchttpclient.webdav,org.asynchttpclient.ws + -XepOpt:NullAway:UnannotatedSubPackages=org.asynchttpclient.netty,org.asynchttpclient.ntlm,org.asynchttpclient.request,org.asynchttpclient.ws -XepOpt:NullAway:AcknowledgeRestrictiveAnnotations=true -Xep:NullAway:ERROR From 4dee060d98dbbb070162c1b1b3649aa2cb7aadec Mon Sep 17 00:00:00 2001 From: Asapin <1559761+Asapin@users.noreply.github.com> Date: Tue, 13 Jun 2023 14:41:03 +0900 Subject: [PATCH 015/167] Enabled NullAway for NTLM package (#1887) * Enabled NullAway for NTLM package * Renamed method parameter and added some comments --- .../org/asynchttpclient/ntlm/NtlmEngine.java | 142 ++++++++---------- .../ntlm/NtlmEngineException.java | 4 +- .../org/asynchttpclient/ntlm/NtlmTest.java | 10 ++ pom.xml | 2 +- 4 files changed, 80 insertions(+), 78 deletions(-) diff --git a/client/src/main/java/org/asynchttpclient/ntlm/NtlmEngine.java b/client/src/main/java/org/asynchttpclient/ntlm/NtlmEngine.java index 47e1cc7b2..740683efd 100644 --- a/client/src/main/java/org/asynchttpclient/ntlm/NtlmEngine.java +++ b/client/src/main/java/org/asynchttpclient/ntlm/NtlmEngine.java @@ -27,11 +27,14 @@ // fork from Apache HttpComponents package org.asynchttpclient.ntlm; +import org.jetbrains.annotations.Contract; +import org.jetbrains.annotations.Nullable; + import javax.crypto.Cipher; import javax.crypto.spec.SecretKeySpec; import java.io.UnsupportedEncodingException; import java.nio.charset.Charset; -import java.nio.charset.UnsupportedCharsetException; +import java.nio.charset.StandardCharsets; import java.security.Key; import java.security.MessageDigest; import java.security.SecureRandom; @@ -55,17 +58,7 @@ public final class NtlmEngine { /** * Unicode encoding */ - private static final Charset UNICODE_LITTLE_UNMARKED; - - static { - Charset c; - try { - c = Charset.forName("UnicodeLittleUnmarked"); - } catch (UnsupportedCharsetException e) { - c = null; - } - UNICODE_LITTLE_UNMARKED = c; - } + private static final Charset UNICODE_LITTLE_UNMARKED = StandardCharsets.UTF_16LE; private static final byte[] MAGIC_CONSTANT = "KGS!@#$%".getBytes(US_ASCII); @@ -92,7 +85,7 @@ public final class NtlmEngine { /** * Secure random generator */ - private static final SecureRandom RND_GEN; + private static final @Nullable SecureRandom RND_GEN; static { SecureRandom rnd = null; @@ -132,7 +125,7 @@ public final class NtlmEngine { * @throws NtlmEngineException If {@encrypt(byte[],byte[])} fails. */ private static String getType3Message(final String user, final String password, final String host, final String domain, final byte[] nonce, - final int type2Flags, final String target, final byte[] targetInformation) { + final int type2Flags, final @Nullable String target, final byte @Nullable [] targetInformation) { return new Type3Message(domain, host, user, password, nonce, type2Flags, target, targetInformation).getResponse(); } @@ -140,9 +133,6 @@ private static String getType3Message(final String user, final String password, * Strip dot suffix from a name */ private static String stripDotSuffix(final String value) { - if (value == null) { - return null; - } final int index = value.indexOf('.'); if (index != -1) { return value.substring(0, index); @@ -153,14 +143,16 @@ private static String stripDotSuffix(final String value) { /** * Convert host to standard form */ - private static String convertHost(final String host) { + @Contract(value = "!null -> !null", pure = true) + private static @Nullable String convertHost(final String host) { return host != null ? stripDotSuffix(host).toUpperCase() : null; } /** * Convert domain to standard form */ - private static String convertDomain(final String domain) { + @Contract(value = "!null -> !null", pure = true) + private static @Nullable String convertDomain(final String domain) { return domain != null ? stripDotSuffix(domain).toUpperCase() : null; } @@ -223,36 +215,36 @@ private static class CipherGen { protected final String user; protected final String password; protected final byte[] challenge; - protected final String target; - protected final byte[] targetInformation; + protected final @Nullable String target; + protected final byte @Nullable [] targetInformation; // Information we can generate but may be passed in (for testing) - protected byte[] clientChallenge; - protected byte[] clientChallenge2; - protected byte[] secondaryKey; - protected byte[] timestamp; + protected byte @Nullable [] clientChallenge; + protected byte @Nullable [] clientChallenge2; + protected byte @Nullable [] secondaryKey; + protected byte @Nullable [] timestamp; // Stuff we always generate - protected byte[] lmHash; - protected byte[] lmResponse; - protected byte[] ntlmHash; - protected byte[] ntlmResponse; - protected byte[] ntlmv2Hash; - protected byte[] lmv2Hash; - protected byte[] lmv2Response; - protected byte[] ntlmv2Blob; - protected byte[] ntlmv2Response; - protected byte[] ntlm2SessionResponse; - protected byte[] lm2SessionResponse; - protected byte[] lmUserSessionKey; - protected byte[] ntlmUserSessionKey; - protected byte[] ntlmv2UserSessionKey; - protected byte[] ntlm2SessionResponseUserSessionKey; - protected byte[] lanManagerSessionKey; - - CipherGen(final String domain, final String user, final String password, final byte[] challenge, final String target, - final byte[] targetInformation, final byte[] clientChallenge, final byte[] clientChallenge2, final byte[] secondaryKey, - final byte[] timestamp) { + protected byte @Nullable [] lmHash; + protected byte @Nullable [] lmResponse; + protected byte @Nullable [] ntlmHash; + protected byte @Nullable [] ntlmResponse; + protected byte @Nullable [] ntlmv2Hash; + protected byte @Nullable [] lmv2Hash; + protected byte @Nullable [] lmv2Response; + protected byte @Nullable [] ntlmv2Blob; + protected byte @Nullable [] ntlmv2Response; + protected byte @Nullable [] ntlm2SessionResponse; + protected byte @Nullable [] lm2SessionResponse; + protected byte @Nullable [] lmUserSessionKey; + protected byte @Nullable [] ntlmUserSessionKey; + protected byte @Nullable [] ntlmv2UserSessionKey; + protected byte @Nullable [] ntlm2SessionResponseUserSessionKey; + protected byte @Nullable [] lanManagerSessionKey; + + CipherGen(final String domain, final String user, final String password, final byte[] challenge, final @Nullable String target, + final byte @Nullable [] targetInformation, final byte @Nullable [] clientChallenge, final byte @Nullable [] clientChallenge2, + final byte @Nullable [] secondaryKey, final byte @Nullable [] timestamp) { this.domain = domain; this.target = target; this.user = user; @@ -265,8 +257,8 @@ private static class CipherGen { this.timestamp = timestamp; } - CipherGen(final String domain, final String user, final String password, final byte[] challenge, final String target, - final byte[] targetInformation) { + CipherGen(final String domain, final String user, final String password, final byte[] challenge, final @Nullable String target, + final byte @Nullable [] targetInformation) { this(domain, user, password, challenge, target, targetInformation, null, null, null, null); } @@ -380,8 +372,11 @@ public byte[] getTimestamp() { /** * Calculate the NTLMv2Blob + * + * @param targetInformation this parameter is the same object as the field targetInformation, + * but guaranteed to be not null. This is done to satisfy NullAway requirements */ - public byte[] getNTLMv2Blob() { + public byte[] getNTLMv2Blob(byte[] targetInformation) { if (ntlmv2Blob == null) { ntlmv2Blob = createBlob(getClientChallenge2(), targetInformation, getTimestamp()); } @@ -390,10 +385,13 @@ public byte[] getNTLMv2Blob() { /** * Calculate the NTLMv2Response + * + * @param targetInformation this parameter is the same object as the field targetInformation, + * but guaranteed to be not null. This is done to satisfy NullAway requirements */ - public byte[] getNTLMv2Response() { + public byte[] getNTLMv2Response(byte[] targetInformation) { if (ntlmv2Response == null) { - ntlmv2Response = lmv2Response(getNTLMv2Hash(), challenge, getNTLMv2Blob()); + ntlmv2Response = lmv2Response(getNTLMv2Hash(), challenge, getNTLMv2Blob(targetInformation)); } return ntlmv2Response; } @@ -457,12 +455,15 @@ public byte[] getNTLMUserSessionKey() { /** * GetNTLMv2UserSessionKey + * + * @param targetInformation this parameter is the same object as the field targetInformation, + * but guaranteed to be not null. This is done to satisfy NullAway requirements */ - public byte[] getNTLMv2UserSessionKey() { + public byte[] getNTLMv2UserSessionKey(byte[] targetInformation) { if (ntlmv2UserSessionKey == null) { final byte[] ntlmv2hash = getNTLMv2Hash(); final byte[] truncatedResponse = new byte[16]; - System.arraycopy(getNTLMv2Response(), 0, truncatedResponse, 0, 16); + System.arraycopy(getNTLMv2Response(targetInformation), 0, truncatedResponse, 0, 16); ntlmv2UserSessionKey = hmacMD5(truncatedResponse, ntlmv2hash); } return ntlmv2UserSessionKey; @@ -597,9 +598,6 @@ private static byte[] lmHash(final String password) { * the NTLM Response and the NTLMv2 and LMv2 Hashes. */ private static byte[] ntlmHash(final String password) { - if (UNICODE_LITTLE_UNMARKED == null) { - throw new NtlmEngineException("Unicode not supported"); - } final byte[] unicodePassword = password.getBytes(UNICODE_LITTLE_UNMARKED); final MD4 md4 = new MD4(); md4.update(unicodePassword); @@ -613,9 +611,6 @@ private static byte[] ntlmHash(final String password) { * Responses. */ private static byte[] lmv2Hash(final String domain, final String user, final byte[] ntlmHash) { - if (UNICODE_LITTLE_UNMARKED == null) { - throw new NtlmEngineException("Unicode not supported"); - } final HMACMD5 hmacMD5 = new HMACMD5(ntlmHash); // Upper case username, upper case domain! hmacMD5.update(user.toUpperCase(Locale.ROOT).getBytes(UNICODE_LITTLE_UNMARKED)); @@ -632,9 +627,6 @@ private static byte[] lmv2Hash(final String domain, final String user, final byt * Responses. */ private static byte[] ntlmv2Hash(final String domain, final String user, final byte[] ntlmHash) { - if (UNICODE_LITTLE_UNMARKED == null) { - throw new NtlmEngineException("Unicode not supported"); - } final HMACMD5 hmacMD5 = new HMACMD5(ntlmHash); // Upper case username, mixed case target!! hmacMD5.update(user.toUpperCase(Locale.ROOT).getBytes(UNICODE_LITTLE_UNMARKED)); @@ -774,10 +766,11 @@ private static void oddParity(final byte[] bytes) { * NTLM message generation, base class */ private static class NTLMMessage { + private static final byte[] EMPTY_BYTE_ARRAY = new byte[]{}; /** * The current response */ - private byte[] messageContents; + private byte[] messageContents = EMPTY_BYTE_ARRAY; /** * The current output position @@ -902,7 +895,7 @@ protected void addByte(final byte b) { * * @param bytes the bytes to add. */ - protected void addBytes(final byte[] bytes) { + protected void addBytes(final byte @Nullable [] bytes) { if (bytes == null) { return; } @@ -1022,8 +1015,8 @@ String getResponse() { */ static class Type2Message extends NTLMMessage { protected byte[] challenge; - protected String target; - protected byte[] targetInfo; + protected @Nullable String target; + protected byte @Nullable [] targetInfo; protected int flags; Type2Message(final String message) { @@ -1090,14 +1083,14 @@ byte[] getChallenge() { /** * Retrieve the target */ - String getTarget() { + @Nullable String getTarget() { return target; } /** * Retrieve the target info */ - byte[] getTargetInfo() { + byte @Nullable [] getTargetInfo() { return targetInfo; } @@ -1117,19 +1110,19 @@ static class Type3Message extends NTLMMessage { // Response flags from the type2 message protected int type2Flags; - protected byte[] domainBytes; - protected byte[] hostBytes; + protected byte @Nullable [] domainBytes; + protected byte @Nullable [] hostBytes; protected byte[] userBytes; protected byte[] lmResp; protected byte[] ntResp; - protected byte[] sessionKey; + protected byte @Nullable [] sessionKey; /** * Constructor. Pass the arguments we will need */ Type3Message(final String domain, final String host, final String user, final String password, final byte[] nonce, - final int type2Flags, final String target, final byte[] targetInformation) { + final int type2Flags, final @Nullable String target, final byte @Nullable [] targetInformation) { // Save the flags this.type2Flags = type2Flags; @@ -1149,12 +1142,12 @@ static class Type3Message extends NTLMMessage { // been tested if ((type2Flags & FLAG_TARGETINFO_PRESENT) != 0 && targetInformation != null && target != null) { // NTLMv2 - ntResp = gen.getNTLMv2Response(); + ntResp = gen.getNTLMv2Response(targetInformation); lmResp = gen.getLMv2Response(); if ((type2Flags & FLAG_REQUEST_LAN_MANAGER_KEY) != 0) { userSessionKey = gen.getLanManagerSessionKey(); } else { - userSessionKey = gen.getNTLMv2UserSessionKey(); + userSessionKey = gen.getNTLMv2UserSessionKey(targetInformation); } } else { // NTLMv1 @@ -1198,9 +1191,6 @@ static class Type3Message extends NTLMMessage { } else { sessionKey = null; } - if (UNICODE_LITTLE_UNMARKED == null) { - throw new NtlmEngineException("Unicode not supported"); - } hostBytes = unqualifiedHost != null ? unqualifiedHost.getBytes(UNICODE_LITTLE_UNMARKED) : null; domainBytes = unqualifiedDomain != null ? unqualifiedDomain.toUpperCase(Locale.ROOT).getBytes(UNICODE_LITTLE_UNMARKED) : null; userBytes = user.getBytes(UNICODE_LITTLE_UNMARKED); diff --git a/client/src/main/java/org/asynchttpclient/ntlm/NtlmEngineException.java b/client/src/main/java/org/asynchttpclient/ntlm/NtlmEngineException.java index 3cc503314..dd7827cbf 100644 --- a/client/src/main/java/org/asynchttpclient/ntlm/NtlmEngineException.java +++ b/client/src/main/java/org/asynchttpclient/ntlm/NtlmEngineException.java @@ -26,6 +26,8 @@ package org.asynchttpclient.ntlm; +import org.jetbrains.annotations.Nullable; + /** * Signals NTLM protocol failure. */ @@ -49,7 +51,7 @@ class NtlmEngineException extends RuntimeException { * @param cause the Throwable that caused this exception, or null * if the cause is unavailable, unknown, or not a Throwable */ - NtlmEngineException(String message, Throwable cause) { + NtlmEngineException(@Nullable String message, Throwable cause) { super(message, cause); } } diff --git a/client/src/test/java/org/asynchttpclient/ntlm/NtlmTest.java b/client/src/test/java/org/asynchttpclient/ntlm/NtlmTest.java index 77b506121..93506925e 100644 --- a/client/src/test/java/org/asynchttpclient/ntlm/NtlmTest.java +++ b/client/src/test/java/org/asynchttpclient/ntlm/NtlmTest.java @@ -27,9 +27,11 @@ import org.asynchttpclient.ntlm.NtlmEngine.Type2Message; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.handler.AbstractHandler; +import org.junit.jupiter.api.Test; import java.io.IOException; import java.nio.ByteBuffer; +import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.util.Base64; import java.util.concurrent.ExecutionException; @@ -70,6 +72,14 @@ private void ntlmAuthTest(Realm.Builder realmBuilder) throws IOException, Interr } } + @Test + public void testUnicodeLittleUnmarkedEncoding() { + final Charset unicodeLittleUnmarked = Charset.forName("UnicodeLittleUnmarked"); + final Charset utf16le = StandardCharsets.UTF_16LE; + assertEquals(unicodeLittleUnmarked, utf16le); + assertArrayEquals("Test @ テスト".getBytes(unicodeLittleUnmarked), "Test @ テスト".getBytes(utf16le)); + } + @RepeatedIfExceptionsTest(repeats = 5) public void lazyNTLMAuthTest() throws Exception { ntlmAuthTest(realmBuilderBase()); diff --git a/pom.xml b/pom.xml index 2427f5516..4546845d6 100644 --- a/pom.xml +++ b/pom.xml @@ -233,7 +233,7 @@ -Xep:NullOptional:ERROR -XepExcludedPaths:.*/src/test/java/.* -XepOpt:NullAway:AnnotatedPackages=org.asynchttpclient - -XepOpt:NullAway:UnannotatedSubPackages=org.asynchttpclient.netty,org.asynchttpclient.ntlm,org.asynchttpclient.request,org.asynchttpclient.ws + -XepOpt:NullAway:UnannotatedSubPackages=org.asynchttpclient.netty,org.asynchttpclient.request,org.asynchttpclient.ws -XepOpt:NullAway:AcknowledgeRestrictiveAnnotations=true -Xep:NullAway:ERROR From 498930feaa1bd717eb6dcbefb50e483de70caf8b Mon Sep 17 00:00:00 2001 From: Asapin <1559761+Asapin@users.noreply.github.com> Date: Thu, 29 Jun 2023 19:07:57 +0900 Subject: [PATCH 016/167] Enabled NullAway for ws package (#1894) * Enabled NullAway for ws package * Updated test case to redirect to google instead of microsoft --- .../netty/handler/WebSocketHandler.java | 5 +++-- .../asynchttpclient/ws/WebSocketUpgradeHandler.java | 11 ++++++++--- .../asynchttpclient/PerRequestRelative302Test.java | 8 ++++---- pom.xml | 2 +- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/client/src/main/java/org/asynchttpclient/netty/handler/WebSocketHandler.java b/client/src/main/java/org/asynchttpclient/netty/handler/WebSocketHandler.java index faf3beebf..2c7cb3b4f 100755 --- a/client/src/main/java/org/asynchttpclient/netty/handler/WebSocketHandler.java +++ b/client/src/main/java/org/asynchttpclient/netty/handler/WebSocketHandler.java @@ -80,13 +80,14 @@ private void upgrade(Channel channel, NettyResponseFuture future, WebSocketUp // if it comes in the same frame as the HTTP Upgrade response Channels.setAttribute(channel, future); - handler.setWebSocket(new NettyWebSocket(channel, responseHeaders)); + final NettyWebSocket webSocket = new NettyWebSocket(channel, responseHeaders); + handler.setWebSocket(webSocket); channelManager.upgradePipelineForWebSockets(channel.pipeline()); // We don't need to synchronize as replacing the "ws-decoder" will // process using the same thread. try { - handler.onOpen(); + handler.onOpen(webSocket); } catch (Exception ex) { logger.warn("onSuccess unexpected exception", ex); } diff --git a/client/src/main/java/org/asynchttpclient/ws/WebSocketUpgradeHandler.java b/client/src/main/java/org/asynchttpclient/ws/WebSocketUpgradeHandler.java index 6e1e5546d..b4c6e1a44 100644 --- a/client/src/main/java/org/asynchttpclient/ws/WebSocketUpgradeHandler.java +++ b/client/src/main/java/org/asynchttpclient/ws/WebSocketUpgradeHandler.java @@ -20,6 +20,7 @@ import org.asynchttpclient.HttpResponseBodyPart; import org.asynchttpclient.HttpResponseStatus; import org.asynchttpclient.netty.ws.NettyWebSocket; +import org.jetbrains.annotations.Nullable; import java.util.ArrayList; import java.util.List; @@ -32,7 +33,7 @@ public class WebSocketUpgradeHandler implements AsyncHandler { private final List listeners; - private NettyWebSocket webSocket; + private @Nullable NettyWebSocket webSocket; public WebSocketUpgradeHandler(List listeners) { this.listeners = listeners; @@ -78,7 +79,7 @@ public final State onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exce } @Override - public final NettyWebSocket onCompleted() throws Exception { + public final @Nullable NettyWebSocket onCompleted() throws Exception { onCompleted0(); return webSocket; } @@ -99,7 +100,11 @@ public final void setWebSocket(NettyWebSocket webSocket) { setWebSocket0(webSocket); } - public final void onOpen() { + /** + * @param webSocket this parameter is the same object as the field webSocket, + * but guaranteed to be not null. This is done to satisfy NullAway requirements + */ + public final void onOpen(NettyWebSocket webSocket) { onOpen0(); for (WebSocketListener listener : listeners) { webSocket.addWebSocketListener(listener); diff --git a/client/src/test/java/org/asynchttpclient/PerRequestRelative302Test.java b/client/src/test/java/org/asynchttpclient/PerRequestRelative302Test.java index e2f9f644f..4c119779c 100644 --- a/client/src/test/java/org/asynchttpclient/PerRequestRelative302Test.java +++ b/client/src/test/java/org/asynchttpclient/PerRequestRelative302Test.java @@ -80,15 +80,15 @@ public void runAllSequentiallyBecauseNotThreadSafe() throws Exception { public void redirected302Test() throws Exception { isSet.getAndSet(false); try (AsyncHttpClient c = asyncHttpClient()) { - Response response = c.prepareGet(getTargetUrl()).setFollowRedirect(true).setHeader("X-redirect", "https://www.microsoft.com/").execute().get(); + Response response = c.prepareGet(getTargetUrl()).setFollowRedirect(true).setHeader("X-redirect", "https://www.google.com/").execute().get(); assertNotNull(response); - assertEquals(response.getStatusCode(), 200); + assertEquals(200, response.getStatusCode()); - String anyMicrosoftPage = "https://www.microsoft.com[^:]*:443"; + String anyGooglePage = "https://www.google.com[^:]*:443"; String baseUrl = getBaseUrl(response.getUri()); - assertTrue(baseUrl.matches(anyMicrosoftPage), "response does not show redirection to " + anyMicrosoftPage); + assertTrue(baseUrl.matches(anyGooglePage), "response does not show redirection to " + anyGooglePage); } } diff --git a/pom.xml b/pom.xml index 4546845d6..06beec486 100644 --- a/pom.xml +++ b/pom.xml @@ -233,7 +233,7 @@ -Xep:NullOptional:ERROR -XepExcludedPaths:.*/src/test/java/.* -XepOpt:NullAway:AnnotatedPackages=org.asynchttpclient - -XepOpt:NullAway:UnannotatedSubPackages=org.asynchttpclient.netty,org.asynchttpclient.request,org.asynchttpclient.ws + -XepOpt:NullAway:UnannotatedSubPackages=org.asynchttpclient.netty,org.asynchttpclient.request -XepOpt:NullAway:AcknowledgeRestrictiveAnnotations=true -Xep:NullAway:ERROR From d15dec6cd658a47d7a25caf27b69afb376800d1e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Jul 2023 11:25:03 +0530 Subject: [PATCH 017/167] Bump netty-handler from 4.1.91.Final to 4.1.94.Final (#1896) Bumps [netty-handler](https://github.com/netty/netty) from 4.1.91.Final to 4.1.94.Final. - [Commits](https://github.com/netty/netty/compare/netty-4.1.91.Final...netty-4.1.94.Final) --- updated-dependencies: - dependency-name: io.netty:netty-handler dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 06beec486..42c96fc06 100644 --- a/pom.xml +++ b/pom.xml @@ -58,7 +58,7 @@ 11 UTF-8 - 4.1.91.Final + 4.1.94.Final 0.0.20.Final 2.0.5 2.0.1 From eca99c5ba02a9034ba7e695a1a728ed0c315bdc1 Mon Sep 17 00:00:00 2001 From: Goooler Date: Sat, 19 Aug 2023 18:53:26 +0800 Subject: [PATCH 018/167] Note integration sections in Gradle (#1898) --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 67699870c..44555f076 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,8 @@ It's built on top of [Netty](https://github.com/netty/netty). It's compiled with Binaries are deployed on Maven Central. Add a dependency on the main AsyncHttpClient artifact: +Maven: ```xml - org.asynchttpclient @@ -25,6 +25,13 @@ Add a dependency on the main AsyncHttpClient artifact: ``` +Gradle: +```groovy +dependencies { + implementation 'org.asynchttpclient:async-http-client:3.0.0.Beta2' +} +``` + ## Version AHC doesn't use SEMVER, and won't. From b1296887f2b4a11ece11434b023ea745a4b8d366 Mon Sep 17 00:00:00 2001 From: Aayush Atharva Date: Sun, 3 Sep 2023 15:30:33 +0530 Subject: [PATCH 019/167] Minor cleanups (#1899) --- .../AsyncCompletionHandler.java | 2 +- .../org/asynchttpclient/AsyncHandler.java | 4 +- .../org/asynchttpclient/AsyncHttpClient.java | 22 +++++------ .../AsyncHttpClientConfig.java | 2 +- .../java/org/asynchttpclient/ClientStats.java | 2 +- .../DefaultAsyncHttpClient.java | 2 +- .../DefaultAsyncHttpClientConfig.java | 5 +-- .../asynchttpclient/HttpResponseStatus.java | 2 +- .../org/asynchttpclient/ListenableFuture.java | 2 +- .../java/org/asynchttpclient/Request.java | 14 +++---- .../asynchttpclient/RequestBuilderBase.java | 8 ++-- .../asynchttpclient/SignatureCalculator.java | 1 + .../asynchttpclient/channel/ChannelPool.java | 2 +- .../channel/ChannelPoolPartitioning.java | 10 +---- .../config/AsyncHttpClientConfigHelper.java | 6 ++- .../asynchttpclient/cookie/CookieStore.java | 9 +++-- .../cookie/ThreadSafeCookieStore.java | 8 +--- .../exception/ChannelClosedException.java | 3 +- .../exception/FilterException.java | 37 +++++++++++++++++++ .../exception/PoolAlreadyClosedException.java | 3 +- .../exception/RemotelyClosedException.java | 3 +- .../TooManyConnectionsException.java | 2 +- .../TooManyConnectionsPerHostException.java | 3 +- .../filter/FilterException.java | 31 ---------------- .../filter/IOExceptionFilter.java | 3 +- .../asynchttpclient/filter/RequestFilter.java | 1 + .../filter/ResponseFilter.java | 1 + .../filter/ThrottleRequestFilter.java | 1 + .../handler/BodyDeferringAsyncHandler.java | 6 +-- .../handler/ProgressAsyncHandler.java | 4 +- .../handler/TransferListener.java | 2 +- .../resumable/ResumableAsyncHandler.java | 4 +- .../netty/NettyResponseStatus.java | 2 +- .../netty/channel/ChannelManager.java | 2 +- .../netty/future/StackTraceInspector.java | 12 ++++-- .../netty/handler/AsyncHttpClientHandler.java | 9 ----- .../netty/handler/WebSocketHandler.java | 2 +- .../intercept/ResponseFiltersInterceptor.java | 2 +- .../intercept/Unauthorized401Interceptor.java | 2 +- .../netty/request/NettyRequestSender.java | 8 ++-- .../org/asynchttpclient/ntlm/NtlmEngine.java | 12 +++--- .../OAuthSignatureCalculatorInstance.java | 2 +- .../request/body/generator/BodyGenerator.java | 2 +- .../generator/InputStreamBodyGenerator.java | 2 +- .../org/asynchttpclient/uri/UriParser.java | 4 +- .../asynchttpclient/util/EnsuresNonNull.java | 2 +- .../org/asynchttpclient/util/MiscUtils.java | 4 +- .../org/asynchttpclient/util/ProxyUtils.java | 2 +- .../asynchttpclient/util/Utf8UrlEncoder.java | 2 +- .../org/asynchttpclient/ws/WebSocket.java | 30 +++++++-------- 50 files changed, 152 insertions(+), 154 deletions(-) create mode 100644 client/src/main/java/org/asynchttpclient/exception/FilterException.java delete mode 100644 client/src/main/java/org/asynchttpclient/filter/FilterException.java diff --git a/client/src/main/java/org/asynchttpclient/AsyncCompletionHandler.java b/client/src/main/java/org/asynchttpclient/AsyncCompletionHandler.java index e5cb67207..63335cb29 100644 --- a/client/src/main/java/org/asynchttpclient/AsyncCompletionHandler.java +++ b/client/src/main/java/org/asynchttpclient/AsyncCompletionHandler.java @@ -98,7 +98,7 @@ public State onHeadersWritten() { } /** - * Invoked when the content (a {@link File}, {@link String} or + * Invoked when the content (a {@link File}, {@link String}) or * {@link InputStream} has been fully written on the I/O socket. * * @return a {@link AsyncHandler.State} telling to CONTINUE diff --git a/client/src/main/java/org/asynchttpclient/AsyncHandler.java b/client/src/main/java/org/asynchttpclient/AsyncHandler.java index 74099cc4d..a912ad9c5 100644 --- a/client/src/main/java/org/asynchttpclient/AsyncHandler.java +++ b/client/src/main/java/org/asynchttpclient/AsyncHandler.java @@ -54,7 +54,7 @@ *

* Do NOT perform any blocking operations in any of these methods. A typical example would be trying to send another * request and calling get() on its future. - * There's a chance you might end up in a dead lock. + * There's a chance you might end up in a deadlock. * If you really need to perform a blocking operation, execute it in a different dedicated thread pool. * * @param Type of object returned by the {@link Future#get} @@ -151,7 +151,7 @@ default void onHostnameResolutionFailure(String name, Throwable cause) { /** * Notify the callback when trying to open a new connection. *

- * Might be called several times if the name was resolved to multiple addresses and we failed to connect to the first(s) one(s). + * Might be called several times if the name was resolved to multiple addresses, and we failed to connect to the first(s) one(s). * * @param remoteAddress the address we try to connect to */ diff --git a/client/src/main/java/org/asynchttpclient/AsyncHttpClient.java b/client/src/main/java/org/asynchttpclient/AsyncHttpClient.java index 9e86b9f84..01a3ecf73 100755 --- a/client/src/main/java/org/asynchttpclient/AsyncHttpClient.java +++ b/client/src/main/java/org/asynchttpclient/AsyncHttpClient.java @@ -66,7 +66,7 @@ * The {@link AsyncCompletionHandler#onCompleted(Response)} method will be invoked once the http response has been fully read. * The {@link Response} object includes the http headers and the response body. Note that the entire response will be buffered in memory. *
- * You can also have more control about the how the response is asynchronously processed by using an {@link AsyncHandler} + * You can also have more control about how the response is asynchronously processed by using an {@link AsyncHandler} *

  *      AsyncHttpClient c = new AsyncHttpClient();
  *      Future<String> f = c.prepareGet(TARGET_URL).execute(new AsyncHandler<String>() {
@@ -149,7 +149,7 @@ public interface AsyncHttpClient extends Closeable {
      * Prepare an HTTP client request.
      *
      * @param method HTTP request method type. MUST BE in upper case
-     * @param url    A well formed URL.
+     * @param url    A well-formed URL.
      * @return {@link RequestBuilder}
      */
     BoundRequestBuilder prepare(String method, String url);
@@ -158,7 +158,7 @@ public interface AsyncHttpClient extends Closeable {
     /**
      * Prepare an HTTP client GET request.
      *
-     * @param url A well formed URL.
+     * @param url A well-formed URL.
      * @return {@link RequestBuilder}
      */
     BoundRequestBuilder prepareGet(String url);
@@ -166,7 +166,7 @@ public interface AsyncHttpClient extends Closeable {
     /**
      * Prepare an HTTP client CONNECT request.
      *
-     * @param url A well formed URL.
+     * @param url A well-formed URL.
      * @return {@link RequestBuilder}
      */
     BoundRequestBuilder prepareConnect(String url);
@@ -174,7 +174,7 @@ public interface AsyncHttpClient extends Closeable {
     /**
      * Prepare an HTTP client OPTIONS request.
      *
-     * @param url A well formed URL.
+     * @param url A well-formed URL.
      * @return {@link RequestBuilder}
      */
     BoundRequestBuilder prepareOptions(String url);
@@ -182,7 +182,7 @@ public interface AsyncHttpClient extends Closeable {
     /**
      * Prepare an HTTP client HEAD request.
      *
-     * @param url A well formed URL.
+     * @param url A well-formed URL.
      * @return {@link RequestBuilder}
      */
     BoundRequestBuilder prepareHead(String url);
@@ -190,7 +190,7 @@ public interface AsyncHttpClient extends Closeable {
     /**
      * Prepare an HTTP client POST request.
      *
-     * @param url A well formed URL.
+     * @param url A well-formed URL.
      * @return {@link RequestBuilder}
      */
     BoundRequestBuilder preparePost(String url);
@@ -198,7 +198,7 @@ public interface AsyncHttpClient extends Closeable {
     /**
      * Prepare an HTTP client PUT request.
      *
-     * @param url A well formed URL.
+     * @param url A well-formed URL.
      * @return {@link RequestBuilder}
      */
     BoundRequestBuilder preparePut(String url);
@@ -206,7 +206,7 @@ public interface AsyncHttpClient extends Closeable {
     /**
      * Prepare an HTTP client DELETE request.
      *
-     * @param url A well formed URL.
+     * @param url A well-formed URL.
      * @return {@link RequestBuilder}
      */
     BoundRequestBuilder prepareDelete(String url);
@@ -214,7 +214,7 @@ public interface AsyncHttpClient extends Closeable {
     /**
      * Prepare an HTTP client PATCH request.
      *
-     * @param url A well formed URL.
+     * @param url A well-formed URL.
      * @return {@link RequestBuilder}
      */
     BoundRequestBuilder preparePatch(String url);
@@ -222,7 +222,7 @@ public interface AsyncHttpClient extends Closeable {
     /**
      * Prepare an HTTP client TRACE request.
      *
-     * @param url A well formed URL.
+     * @param url A well-formed URL.
      * @return {@link RequestBuilder}
      */
     BoundRequestBuilder prepareTrace(String url);
diff --git a/client/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java b/client/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
index 972fa0b3a..484cd0029 100644
--- a/client/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
+++ b/client/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
@@ -231,7 +231,7 @@ public interface AsyncHttpClientConfig {
     boolean isDisableUrlEncodingForBoundRequests();
 
     /**
-     * @return true if AHC is to use a LAX cookie encoder, eg accept illegal chars in cookie value
+     * @return true if AHC is to use a LAX cookie encoder, e.g. accept illegal chars in cookie value
      */
     boolean isUseLaxCookieEncoder();
 
diff --git a/client/src/main/java/org/asynchttpclient/ClientStats.java b/client/src/main/java/org/asynchttpclient/ClientStats.java
index 28cb0b293..7d450ad96 100644
--- a/client/src/main/java/org/asynchttpclient/ClientStats.java
+++ b/client/src/main/java/org/asynchttpclient/ClientStats.java
@@ -20,7 +20,7 @@
 import java.util.Objects;
 
 /**
- * A record class representing the state of an (@link org.asynchttpclient.AsyncHttpClient).
+ * A record class representing the state of a (@link org.asynchttpclient.AsyncHttpClient).
  */
 public class ClientStats {
 
diff --git a/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClient.java b/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClient.java
index ab841fa28..22eb92068 100644
--- a/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClient.java
+++ b/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClient.java
@@ -25,7 +25,7 @@
 import org.asynchttpclient.cookie.CookieEvictionTask;
 import org.asynchttpclient.cookie.CookieStore;
 import org.asynchttpclient.filter.FilterContext;
-import org.asynchttpclient.filter.FilterException;
+import org.asynchttpclient.exception.FilterException;
 import org.asynchttpclient.filter.RequestFilter;
 import org.asynchttpclient.handler.resumable.ResumableAsyncHandler;
 import org.asynchttpclient.netty.channel.ChannelManager;
diff --git a/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClientConfig.java b/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClientConfig.java
index 059cc3e78..0357592bd 100644
--- a/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClientConfig.java
+++ b/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClientConfig.java
@@ -978,7 +978,7 @@ public Builder setStrict302Handling(final boolean strict302Handling) {
 
         /**
          * If true, AHC will  add Accept-Encoding HTTP header to each request
-         *
+         * 

* If false (default), AHC will either leave AcceptEncoding header as is * (if enableAutomaticDecompression is false) or will remove unsupported * algorithms (if enableAutomaticDecompression is true) @@ -988,7 +988,6 @@ public Builder setCompressionEnforced(boolean compressionEnforced) { return this; } - /* * If true (default), AHC will add a Netty HttpContentDecompressor, so compressed * content will automatically get decompressed. @@ -997,7 +996,7 @@ public Builder setCompressionEnforced(boolean compressionEnforced) { * be done by calling code. */ public Builder setEnableAutomaticDecompression(boolean enable) { - this.enableAutomaticDecompression = enable; + enableAutomaticDecompression = enable; return this; } diff --git a/client/src/main/java/org/asynchttpclient/HttpResponseStatus.java b/client/src/main/java/org/asynchttpclient/HttpResponseStatus.java index 60c82908e..8ac5c316d 100644 --- a/client/src/main/java/org/asynchttpclient/HttpResponseStatus.java +++ b/client/src/main/java/org/asynchttpclient/HttpResponseStatus.java @@ -21,7 +21,7 @@ import java.net.SocketAddress; /** - * A class that represent the HTTP response' status line (code + text) + * A class that represent the HTTP response status line (code + text) */ public abstract class HttpResponseStatus { diff --git a/client/src/main/java/org/asynchttpclient/ListenableFuture.java b/client/src/main/java/org/asynchttpclient/ListenableFuture.java index 930d8d8c2..6f9280369 100755 --- a/client/src/main/java/org/asynchttpclient/ListenableFuture.java +++ b/client/src/main/java/org/asynchttpclient/ListenableFuture.java @@ -70,7 +70,7 @@ public interface ListenableFuture extends Future { * in the thread where completion happens. *
* There is no guaranteed ordering of execution of listeners, they may get - * called in the order they were added and they may get called out of order, + * called in the order they were added, and they may get called out of order, * but any listener added through this method is guaranteed to be called once * the computation is complete. * diff --git a/client/src/main/java/org/asynchttpclient/Request.java b/client/src/main/java/org/asynchttpclient/Request.java index 0f8cdaa06..ecb40678c 100644 --- a/client/src/main/java/org/asynchttpclient/Request.java +++ b/client/src/main/java/org/asynchttpclient/Request.java @@ -84,32 +84,32 @@ public interface Request { List getCookies(); /** - * @return the request's body byte array (only non null if it was set this way) + * @return the request's body byte array (only non-null if it was set this way) */ byte @Nullable [] getByteData(); /** - * @return the request's body array of byte arrays (only non null if it was set this way) + * @return the request's body array of byte arrays (only non-null if it was set this way) */ @Nullable List getCompositeByteData(); /** - * @return the request's body string (only non null if it was set this way) + * @return the request's body string (only non-null if it was set this way) */ @Nullable String getStringData(); /** - * @return the request's body ByteBuffer (only non null if it was set this way) + * @return the request's body ByteBuffer (only non-null if it was set this way) */ @Nullable ByteBuffer getByteBufferData(); /** - * @return the request's body InputStream (only non null if it was set this way) + * @return the request's body InputStream (only non-null if it was set this way) */ @Nullable InputStream getStreamData(); /** - * @return the request's body BodyGenerator (only non null if it was set this way) + * @return the request's body BodyGenerator (only non-null if it was set this way) */ @Nullable BodyGenerator getBodyGenerator(); @@ -159,7 +159,7 @@ public interface Request { Duration getRequestTimeout(); /** - * @return the read timeout. Non zero values means "override config value". + * @return the read timeout. Non-zero values means "override config value". */ Duration getReadTimeout(); diff --git a/client/src/main/java/org/asynchttpclient/RequestBuilderBase.java b/client/src/main/java/org/asynchttpclient/RequestBuilderBase.java index 0be0a8f44..dbfd58f5b 100644 --- a/client/src/main/java/org/asynchttpclient/RequestBuilderBase.java +++ b/client/src/main/java/org/asynchttpclient/RequestBuilderBase.java @@ -226,7 +226,7 @@ public T addHeader(CharSequence name, String value) { } /** - * Add a header value for the request. If a header with {@code name} was setup for this request already - + * Add a header value for the request. If a header with {@code name} was set up for this request already - * call will add one more header value and convert it to multi-value header * * @param name header name @@ -244,7 +244,7 @@ public T addHeader(CharSequence name, Object value) { } /** - * Add header values for the request. If a header with {@code name} was setup for this request already - + * Add header values for the request. If a header with {@code name} was set up for this request already - * call will add more header values and convert it to multi-value header * * @param name header name @@ -267,7 +267,7 @@ public T setHeaders(HttpHeaders headers) { /** * Set request headers using a map {@code headers} of pair (Header name, Header values) - * This method could be used to setup multi-valued headers + * This method could be used to set up multivalued headers * * @param headers map of header names as the map keys and header values {@link Iterable} as the map values * @return {@code this} @@ -559,7 +559,7 @@ private RequestBuilderBase executeSignatureCalculator() { // build a first version of the request, without signatureCalculator in play RequestBuilder rb = new RequestBuilder(method); - // make copy of mutable collections so we don't risk affecting + // make copy of mutable collections, so we don't risk affecting // original RequestBuilder // call setFormParams first as it resets other fields if (formParams != null) { diff --git a/client/src/main/java/org/asynchttpclient/SignatureCalculator.java b/client/src/main/java/org/asynchttpclient/SignatureCalculator.java index 0341b6b1f..98000f0d2 100644 --- a/client/src/main/java/org/asynchttpclient/SignatureCalculator.java +++ b/client/src/main/java/org/asynchttpclient/SignatureCalculator.java @@ -25,6 +25,7 @@ */ @FunctionalInterface public interface SignatureCalculator { + /** * Method called when {@link RequestBuilder#build} method is called. * Should first calculate signature information and then modify request diff --git a/client/src/main/java/org/asynchttpclient/channel/ChannelPool.java b/client/src/main/java/org/asynchttpclient/channel/ChannelPool.java index d4469360d..1b38f09a3 100755 --- a/client/src/main/java/org/asynchttpclient/channel/ChannelPool.java +++ b/client/src/main/java/org/asynchttpclient/channel/ChannelPool.java @@ -50,7 +50,7 @@ public interface ChannelPool { boolean removeAll(Channel channel); /** - * Return true if a channel can be cached. A implementation can decide based + * Return true if a channel can be cached. An implementation can decide based * on some rules to allow caching Calling this method is equivalent of * checking the returned value of {@link ChannelPool#offer(Channel, Object)} * diff --git a/client/src/main/java/org/asynchttpclient/channel/ChannelPoolPartitioning.java b/client/src/main/java/org/asynchttpclient/channel/ChannelPoolPartitioning.java index 1e910df03..fd9a51b23 100644 --- a/client/src/main/java/org/asynchttpclient/channel/ChannelPoolPartitioning.java +++ b/client/src/main/java/org/asynchttpclient/channel/ChannelPoolPartitioning.java @@ -65,8 +65,7 @@ class CompositePartitionKey { private final int proxyPort; private final @Nullable ProxyType proxyType; - CompositePartitionKey(String targetHostBaseUrl, @Nullable String virtualHost, - @Nullable String proxyHost, int proxyPort, @Nullable ProxyType proxyType) { + CompositePartitionKey(String targetHostBaseUrl, @Nullable String virtualHost, @Nullable String proxyHost, int proxyPort, @Nullable ProxyType proxyType) { this.targetHostBaseUrl = targetHostBaseUrl; this.virtualHost = virtualHost; this.proxyHost = proxyHost; @@ -102,12 +101,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - int result = targetHostBaseUrl != null ? targetHostBaseUrl.hashCode() : 0; - result = 31 * result + (virtualHost != null ? virtualHost.hashCode() : 0); - result = 31 * result + (proxyHost != null ? proxyHost.hashCode() : 0); - result = 31 * result + proxyPort; - result = 31 * result + (proxyType != null ? proxyType.hashCode() : 0); - return result; + return Objects.hash(targetHostBaseUrl, virtualHost, proxyHost, proxyPort, proxyType); } @Override diff --git a/client/src/main/java/org/asynchttpclient/config/AsyncHttpClientConfigHelper.java b/client/src/main/java/org/asynchttpclient/config/AsyncHttpClientConfigHelper.java index 9d5800227..3922a6d60 100644 --- a/client/src/main/java/org/asynchttpclient/config/AsyncHttpClientConfigHelper.java +++ b/client/src/main/java/org/asynchttpclient/config/AsyncHttpClientConfigHelper.java @@ -25,7 +25,8 @@ public final class AsyncHttpClientConfigHelper { - private static volatile @Nullable Config config; + @Nullable + private static volatile Config config; private AsyncHttpClientConfigHelper() { } @@ -93,7 +94,8 @@ public String getString(String key) { }); } - public @Nullable String[] getStringArray(String key) { + @Nullable + public String[] getStringArray(String key) { String s = getString(key); s = s.trim(); if (s.isEmpty()) { diff --git a/client/src/main/java/org/asynchttpclient/cookie/CookieStore.java b/client/src/main/java/org/asynchttpclient/cookie/CookieStore.java index 225516c11..d19a0d13e 100644 --- a/client/src/main/java/org/asynchttpclient/cookie/CookieStore.java +++ b/client/src/main/java/org/asynchttpclient/cookie/CookieStore.java @@ -34,20 +34,21 @@ * @since 2.1 */ public interface CookieStore extends Counted { + /** * Adds one {@link Cookie} to the store. This is called for every incoming HTTP response. * If the given cookie has already expired it will not be added. * - *

A cookie to store may or may not be associated with an URI. If it - * is not associated with an URI, the cookie's domain and path attribute - * will indicate where it comes from. If it is associated with an URI and + *

A cookie to store may or may not be associated with a URI. If it + * is not associated with a URI, the cookie's domain and path attribute + * will indicate where it comes from. If it is associated with a URI and * its domain and path attribute are not specified, given URI will indicate * where this cookie comes from. * *

If a cookie corresponding to the given URI already exists, * then it is replaced with the new one. * - * @param uri the {@link Uri uri} this cookie associated with. if {@code null}, this cookie will not be associated with an URI + * @param uri the {@link Uri uri} this cookie associated with. if {@code null}, this cookie will not be associated with a URI * @param cookie the {@link Cookie cookie} to be added */ void add(Uri uri, Cookie cookie); diff --git a/client/src/main/java/org/asynchttpclient/cookie/ThreadSafeCookieStore.java b/client/src/main/java/org/asynchttpclient/cookie/ThreadSafeCookieStore.java index d14392fb4..44cb4e260 100644 --- a/client/src/main/java/org/asynchttpclient/cookie/ThreadSafeCookieStore.java +++ b/client/src/main/java/org/asynchttpclient/cookie/ThreadSafeCookieStore.java @@ -54,8 +54,7 @@ public List get(Uri uri) { @Override public List getAll() { - return cookieJar - .values() + return cookieJar.values() .stream() .flatMap(map -> map.values().stream()) .filter(pair -> !hasCookieExpired(pair.cookie, pair.createdAt)) @@ -260,10 +259,7 @@ public boolean equals(Object obj) { @Override public int hashCode() { - int result = 17; - result = 31 * result + name.hashCode(); - result = 31 * result + path.hashCode(); - return result; + return Objects.hash(name, path); } @Override diff --git a/client/src/main/java/org/asynchttpclient/exception/ChannelClosedException.java b/client/src/main/java/org/asynchttpclient/exception/ChannelClosedException.java index 1d3325503..3d1101291 100644 --- a/client/src/main/java/org/asynchttpclient/exception/ChannelClosedException.java +++ b/client/src/main/java/org/asynchttpclient/exception/ChannelClosedException.java @@ -19,9 +19,8 @@ import static org.asynchttpclient.util.ThrowableUtil.unknownStackTrace; -@SuppressWarnings("serial") public final class ChannelClosedException extends IOException { - + private static final long serialVersionUID = -2528693697240456658L; public static final ChannelClosedException INSTANCE = unknownStackTrace(new ChannelClosedException(), ChannelClosedException.class, "INSTANCE"); private ChannelClosedException() { diff --git a/client/src/main/java/org/asynchttpclient/exception/FilterException.java b/client/src/main/java/org/asynchttpclient/exception/FilterException.java new file mode 100644 index 000000000..6e5902b9b --- /dev/null +++ b/client/src/main/java/org/asynchttpclient/exception/FilterException.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2023 AsyncHttpClient Project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.asynchttpclient.exception; + +import org.asynchttpclient.AsyncHandler; +import org.asynchttpclient.filter.RequestFilter; +import org.asynchttpclient.filter.ResponseFilter; + +/** + * An exception that can be thrown by an {@link AsyncHandler} to interrupt invocation of + * the {@link RequestFilter} and {@link ResponseFilter}. It also interrupts the request and response processing. + */ +public class FilterException extends Exception { + + private static final long serialVersionUID = -3963344749394925069L; + + public FilterException(final String message) { + super(message); + } + + public FilterException(final String message, final Throwable cause) { + super(message, cause); + } +} diff --git a/client/src/main/java/org/asynchttpclient/exception/PoolAlreadyClosedException.java b/client/src/main/java/org/asynchttpclient/exception/PoolAlreadyClosedException.java index 168a11a09..d832bc40a 100644 --- a/client/src/main/java/org/asynchttpclient/exception/PoolAlreadyClosedException.java +++ b/client/src/main/java/org/asynchttpclient/exception/PoolAlreadyClosedException.java @@ -19,9 +19,8 @@ import static org.asynchttpclient.util.ThrowableUtil.unknownStackTrace; -@SuppressWarnings("serial") public class PoolAlreadyClosedException extends IOException { - + private static final long serialVersionUID = -3883404852005245296L; public static final PoolAlreadyClosedException INSTANCE = unknownStackTrace(new PoolAlreadyClosedException(), PoolAlreadyClosedException.class, "INSTANCE"); private PoolAlreadyClosedException() { diff --git a/client/src/main/java/org/asynchttpclient/exception/RemotelyClosedException.java b/client/src/main/java/org/asynchttpclient/exception/RemotelyClosedException.java index 6ea0bd334..8b8165589 100644 --- a/client/src/main/java/org/asynchttpclient/exception/RemotelyClosedException.java +++ b/client/src/main/java/org/asynchttpclient/exception/RemotelyClosedException.java @@ -19,9 +19,8 @@ import static org.asynchttpclient.util.ThrowableUtil.unknownStackTrace; -@SuppressWarnings("serial") public final class RemotelyClosedException extends IOException { - + private static final long serialVersionUID = 5634105738124356785L; public static final RemotelyClosedException INSTANCE = unknownStackTrace(new RemotelyClosedException(), RemotelyClosedException.class, "INSTANCE"); private RemotelyClosedException() { diff --git a/client/src/main/java/org/asynchttpclient/exception/TooManyConnectionsException.java b/client/src/main/java/org/asynchttpclient/exception/TooManyConnectionsException.java index ec9351152..2a0add003 100644 --- a/client/src/main/java/org/asynchttpclient/exception/TooManyConnectionsException.java +++ b/client/src/main/java/org/asynchttpclient/exception/TooManyConnectionsException.java @@ -17,8 +17,8 @@ import java.io.IOException; -@SuppressWarnings("serial") public class TooManyConnectionsException extends IOException { + private static final long serialVersionUID = 8645586459539317237L; public TooManyConnectionsException(int max) { super("Too many connections: " + max); diff --git a/client/src/main/java/org/asynchttpclient/exception/TooManyConnectionsPerHostException.java b/client/src/main/java/org/asynchttpclient/exception/TooManyConnectionsPerHostException.java index 5c5d7926f..47f5be7e2 100644 --- a/client/src/main/java/org/asynchttpclient/exception/TooManyConnectionsPerHostException.java +++ b/client/src/main/java/org/asynchttpclient/exception/TooManyConnectionsPerHostException.java @@ -17,9 +17,10 @@ import java.io.IOException; -@SuppressWarnings("serial") public class TooManyConnectionsPerHostException extends IOException { + private static final long serialVersionUID = 5702859695179937503L; + public TooManyConnectionsPerHostException(int max) { super("Too many connections: " + max); } diff --git a/client/src/main/java/org/asynchttpclient/filter/FilterException.java b/client/src/main/java/org/asynchttpclient/filter/FilterException.java deleted file mode 100644 index 8d209211a..000000000 --- a/client/src/main/java/org/asynchttpclient/filter/FilterException.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.filter; - -import org.asynchttpclient.AsyncHandler; - -/** - * An exception that can be thrown by an {@link AsyncHandler} to interrupt invocation of - * the {@link RequestFilter} and {@link ResponseFilter}. It also interrupt the request and response processing. - */ -@SuppressWarnings("serial") -public class FilterException extends Exception { - - public FilterException(final String message) { - super(message); - } - - public FilterException(final String message, final Throwable cause) { - super(message, cause); - } -} diff --git a/client/src/main/java/org/asynchttpclient/filter/IOExceptionFilter.java b/client/src/main/java/org/asynchttpclient/filter/IOExceptionFilter.java index a7df37717..182ea56e2 100644 --- a/client/src/main/java/org/asynchttpclient/filter/IOExceptionFilter.java +++ b/client/src/main/java/org/asynchttpclient/filter/IOExceptionFilter.java @@ -14,11 +14,12 @@ import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.Request; +import org.asynchttpclient.exception.FilterException; import java.io.IOException; /** - * This filter is invoked when an {@link IOException} occurs during an http transaction. + * This filter is invoked when an {@link IOException} occurs during a http transaction. */ public interface IOExceptionFilter { diff --git a/client/src/main/java/org/asynchttpclient/filter/RequestFilter.java b/client/src/main/java/org/asynchttpclient/filter/RequestFilter.java index 8b2a6fd9d..d4eaf8a32 100644 --- a/client/src/main/java/org/asynchttpclient/filter/RequestFilter.java +++ b/client/src/main/java/org/asynchttpclient/filter/RequestFilter.java @@ -13,6 +13,7 @@ package org.asynchttpclient.filter; import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.exception.FilterException; /** * A Filter interface that gets invoked before making an actual request. diff --git a/client/src/main/java/org/asynchttpclient/filter/ResponseFilter.java b/client/src/main/java/org/asynchttpclient/filter/ResponseFilter.java index 3fd9ffb23..939adf6d8 100644 --- a/client/src/main/java/org/asynchttpclient/filter/ResponseFilter.java +++ b/client/src/main/java/org/asynchttpclient/filter/ResponseFilter.java @@ -13,6 +13,7 @@ package org.asynchttpclient.filter; import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.exception.FilterException; /** * A Filter interface that gets invoked before making the processing of the response bytes. {@link ResponseFilter} are invoked diff --git a/client/src/main/java/org/asynchttpclient/filter/ThrottleRequestFilter.java b/client/src/main/java/org/asynchttpclient/filter/ThrottleRequestFilter.java index 9b5225198..3d5d9943a 100644 --- a/client/src/main/java/org/asynchttpclient/filter/ThrottleRequestFilter.java +++ b/client/src/main/java/org/asynchttpclient/filter/ThrottleRequestFilter.java @@ -12,6 +12,7 @@ */ package org.asynchttpclient.filter; +import org.asynchttpclient.exception.FilterException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/client/src/main/java/org/asynchttpclient/handler/BodyDeferringAsyncHandler.java b/client/src/main/java/org/asynchttpclient/handler/BodyDeferringAsyncHandler.java index 72f7a648a..dc58fc2c5 100644 --- a/client/src/main/java/org/asynchttpclient/handler/BodyDeferringAsyncHandler.java +++ b/client/src/main/java/org/asynchttpclient/handler/BodyDeferringAsyncHandler.java @@ -37,9 +37,9 @@ * long as headers are received, and return Response as soon as possible, but * still pouring response body into supplied output stream. This handler is * meant for situations when the "recommended" way (using - * {@code client.prepareGet("http://foo.com/aResource").execute().get()} + * {@code client.prepareGet("http://foo.com/aResource").execute().get()}), which * would not work for you, since a potentially large response body is about to - * be GETted, but you need headers first, or you don't know yet (depending on + * be GET-ted, but you need headers first, or you don't know yet (depending on * some logic, maybe coming from headers) where to save the body, or you just * want to leave body stream to some other component to consume it. *
@@ -211,7 +211,7 @@ protected void closeOut() throws IOException { * 1st cached, probably incomplete one. Note: the response returned by this * method will contain everything except the response body itself, * so invoking any method like Response.getResponseBodyXXX() will result in - * error! Also, please not that this method might return {@code null} + * error! Also, please note that this method might return {@code null} * in case of some errors. * * @return a {@link Response} diff --git a/client/src/main/java/org/asynchttpclient/handler/ProgressAsyncHandler.java b/client/src/main/java/org/asynchttpclient/handler/ProgressAsyncHandler.java index 50100e3bf..04839e276 100644 --- a/client/src/main/java/org/asynchttpclient/handler/ProgressAsyncHandler.java +++ b/client/src/main/java/org/asynchttpclient/handler/ProgressAsyncHandler.java @@ -25,7 +25,7 @@ public interface ProgressAsyncHandler extends AsyncHandler { /** - * Invoked when the content (a {@link File}, {@link String} or {@link FileInputStream} has been fully + * Invoked when the content (a {@link File}, {@link String} or {@link FileInputStream}) has been fully * written on the I/O socket. * * @return a {@link AsyncHandler.State} telling to CONTINUE or ABORT the current processing. @@ -33,7 +33,7 @@ public interface ProgressAsyncHandler extends AsyncHandler { State onHeadersWritten(); /** - * Invoked when the content (a {@link File}, {@link String} or {@link FileInputStream} has been fully + * Invoked when the content (a {@link File}, {@link String} or {@link FileInputStream}) has been fully * written on the I/O socket. * * @return a {@link AsyncHandler.State} telling to CONTINUE or ABORT the current processing. diff --git a/client/src/main/java/org/asynchttpclient/handler/TransferListener.java b/client/src/main/java/org/asynchttpclient/handler/TransferListener.java index c3921f1a0..fd50dcf7e 100644 --- a/client/src/main/java/org/asynchttpclient/handler/TransferListener.java +++ b/client/src/main/java/org/asynchttpclient/handler/TransferListener.java @@ -15,7 +15,7 @@ import io.netty.handler.codec.http.HttpHeaders; /** - * A simple interface an application can implements in order to received byte transfer information. + * A simple interface an application can implement in order to received byte transfer information. */ public interface TransferListener { diff --git a/client/src/main/java/org/asynchttpclient/handler/resumable/ResumableAsyncHandler.java b/client/src/main/java/org/asynchttpclient/handler/resumable/ResumableAsyncHandler.java index a52c52f5a..6b8794547 100644 --- a/client/src/main/java/org/asynchttpclient/handler/resumable/ResumableAsyncHandler.java +++ b/client/src/main/java/org/asynchttpclient/handler/resumable/ResumableAsyncHandler.java @@ -37,8 +37,8 @@ import static io.netty.handler.codec.http.HttpHeaderNames.RANGE; /** - * An {@link AsyncHandler} which support resumable download, e.g when used with an {@link ResumableIOExceptionFilter}, - * this handler can resume the download operation at the point it was before the interruption occurred. This prevent having to + * An {@link AsyncHandler} which support resumable download, e.g. when used with an {@link ResumableIOExceptionFilter}, + * this handler can resume the download operation at the point it was before the interruption occurred. This prevents having to * download the entire file again. It's the responsibility of the {@link ResumableAsyncHandler} * to track how many bytes has been transferred and to properly adjust the file's write position. *
diff --git a/client/src/main/java/org/asynchttpclient/netty/NettyResponseStatus.java b/client/src/main/java/org/asynchttpclient/netty/NettyResponseStatus.java index d8f68b0d7..49af6b160 100755 --- a/client/src/main/java/org/asynchttpclient/netty/NettyResponseStatus.java +++ b/client/src/main/java/org/asynchttpclient/netty/NettyResponseStatus.java @@ -23,7 +23,7 @@ import java.net.SocketAddress; /** - * A class that represent the HTTP response' status line (code + text) + * A class that represent the HTTP response status line (code + text) */ public class NettyResponseStatus extends HttpResponseStatus { diff --git a/client/src/main/java/org/asynchttpclient/netty/channel/ChannelManager.java b/client/src/main/java/org/asynchttpclient/netty/channel/ChannelManager.java index 45ff3adc1..fe85734c7 100755 --- a/client/src/main/java/org/asynchttpclient/netty/channel/ChannelManager.java +++ b/client/src/main/java/org/asynchttpclient/netty/channel/ChannelManager.java @@ -113,7 +113,7 @@ public class ChannelManager { private boolean isInstanceof(Object object, String name) { final Class clazz; try { - clazz = Class.forName(name, false, this.getClass().getClassLoader()); + clazz = Class.forName(name, false, getClass().getClassLoader()); } catch (ClassNotFoundException ignored) { return false; } diff --git a/client/src/main/java/org/asynchttpclient/netty/future/StackTraceInspector.java b/client/src/main/java/org/asynchttpclient/netty/future/StackTraceInspector.java index a3218dbbf..919bd3cfa 100755 --- a/client/src/main/java/org/asynchttpclient/netty/future/StackTraceInspector.java +++ b/client/src/main/java/org/asynchttpclient/netty/future/StackTraceInspector.java @@ -38,8 +38,12 @@ private static boolean exceptionInMethod(Throwable t, String className, String m private static boolean recoverOnConnectCloseException(Throwable t) { while (true) { - if (exceptionInMethod(t, "sun.nio.ch.SocketChannelImpl", "checkConnect")) return true; - if (t.getCause() == null) return false; + if (exceptionInMethod(t, "sun.nio.ch.SocketChannelImpl", "checkConnect")) { + return true; + } + if (t.getCause() == null) { + return false; + } t = t.getCause(); } } @@ -67,7 +71,9 @@ public static boolean recoverOnReadOrWriteException(Throwable t) { } catch (Throwable ignore) { } - if (t.getCause() == null) return false; + if (t.getCause() == null) { + return false; + } t = t.getCause(); } } diff --git a/client/src/main/java/org/asynchttpclient/netty/handler/AsyncHttpClientHandler.java b/client/src/main/java/org/asynchttpclient/netty/handler/AsyncHttpClientHandler.java index 85f96d2f7..71d48f408 100755 --- a/client/src/main/java/org/asynchttpclient/netty/handler/AsyncHttpClientHandler.java +++ b/client/src/main/java/org/asynchttpclient/netty/handler/AsyncHttpClientHandler.java @@ -179,17 +179,8 @@ public void channelActive(ChannelHandlerContext ctx) { @Override public void channelReadComplete(ChannelHandlerContext ctx) { ctx.read(); -// if (!isHandledByReactiveStreams(ctx)) { -// ctx.read(); -// } else { -// ctx.fireChannelReadComplete(); -// } } -// private static boolean isHandledByReactiveStreams(ChannelHandlerContext ctx) { -// return Channels.getAttribute(ctx.channel()) instanceof StreamedResponsePublisher; -// } - void finishUpdate(NettyResponseFuture future, Channel channel, boolean close) { future.cancelTimeouts(); diff --git a/client/src/main/java/org/asynchttpclient/netty/handler/WebSocketHandler.java b/client/src/main/java/org/asynchttpclient/netty/handler/WebSocketHandler.java index 2c7cb3b4f..9d26c49b2 100755 --- a/client/src/main/java/org/asynchttpclient/netty/handler/WebSocketHandler.java +++ b/client/src/main/java/org/asynchttpclient/netty/handler/WebSocketHandler.java @@ -132,7 +132,7 @@ public void handleRead(Channel channel, NettyResponseFuture future, Object e) webSocket.handleFrame(frame); } else { // WebSocket hasn't been opened yet, but upgrading the pipeline triggered a read and a frame was sent along the HTTP upgrade response - // as we want to keep sequential order (but can't notify user of open before upgrading so he doesn't to try send immediately), we have to buffer + // as we want to keep sequential order (but can't notify user of open before upgrading, so he doesn't try to send immediately), we have to buffer webSocket.bufferFrame(frame); } diff --git a/client/src/main/java/org/asynchttpclient/netty/handler/intercept/ResponseFiltersInterceptor.java b/client/src/main/java/org/asynchttpclient/netty/handler/intercept/ResponseFiltersInterceptor.java index 89f70f50a..d3f33d49f 100644 --- a/client/src/main/java/org/asynchttpclient/netty/handler/intercept/ResponseFiltersInterceptor.java +++ b/client/src/main/java/org/asynchttpclient/netty/handler/intercept/ResponseFiltersInterceptor.java @@ -21,7 +21,7 @@ import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.HttpResponseStatus; import org.asynchttpclient.filter.FilterContext; -import org.asynchttpclient.filter.FilterException; +import org.asynchttpclient.exception.FilterException; import org.asynchttpclient.filter.ResponseFilter; import org.asynchttpclient.netty.NettyResponseFuture; import org.asynchttpclient.netty.request.NettyRequestSender; diff --git a/client/src/main/java/org/asynchttpclient/netty/handler/intercept/Unauthorized401Interceptor.java b/client/src/main/java/org/asynchttpclient/netty/handler/intercept/Unauthorized401Interceptor.java index 3f3c710aa..d622a4675 100644 --- a/client/src/main/java/org/asynchttpclient/netty/handler/intercept/Unauthorized401Interceptor.java +++ b/client/src/main/java/org/asynchttpclient/netty/handler/intercept/Unauthorized401Interceptor.java @@ -179,7 +179,7 @@ private static void ntlmChallenge(String authenticateHeader, NettyResponseFuture future) { if ("NTLM".equals(authenticateHeader)) { - // server replied bare NTLM => we didn't preemptively sent Type1Msg + // server replied bare NTLM => we didn't preemptively send Type1Msg String challengeHeader = NtlmEngine.INSTANCE.generateType1Msg(); // FIXME we might want to filter current NTLM and add (leave other // Authorization headers untouched) diff --git a/client/src/main/java/org/asynchttpclient/netty/request/NettyRequestSender.java b/client/src/main/java/org/asynchttpclient/netty/request/NettyRequestSender.java index fd4a0e19b..bb3628123 100755 --- a/client/src/main/java/org/asynchttpclient/netty/request/NettyRequestSender.java +++ b/client/src/main/java/org/asynchttpclient/netty/request/NettyRequestSender.java @@ -39,7 +39,7 @@ import org.asynchttpclient.exception.PoolAlreadyClosedException; import org.asynchttpclient.exception.RemotelyClosedException; import org.asynchttpclient.filter.FilterContext; -import org.asynchttpclient.filter.FilterException; +import org.asynchttpclient.exception.FilterException; import org.asynchttpclient.filter.IOExceptionFilter; import org.asynchttpclient.handler.TransferCompletionHandler; import org.asynchttpclient.netty.NettyResponseFuture; @@ -114,7 +114,7 @@ public ListenableFuture sendRequest(final Request request, final AsyncHan // Perform CONNECT return sendRequestWithCertainForceConnect(request, asyncHandler, future, proxyServer, true); } else { - // CONNECT will depend if we can pool or connection or if we have to open a new one + // CONNECT will depend on if we can pool or connection or if we have to open a new one return sendRequestThroughProxy(request, asyncHandler, future, proxyServer); } } else { @@ -145,8 +145,8 @@ private ListenableFuture sendRequestWithCertainForceConnect(Request reque } /** - * Using CONNECT depends on wither we can fetch a valid channel or not Loop - * until we get a valid channel from the pool and it's still valid once the + * Using CONNECT depends on whether we can fetch a valid channel or not Loop + * until we get a valid channel from the pool, and it's still valid once the * request is built @ */ private ListenableFuture sendRequestThroughProxy(Request request, diff --git a/client/src/main/java/org/asynchttpclient/ntlm/NtlmEngine.java b/client/src/main/java/org/asynchttpclient/ntlm/NtlmEngine.java index 740683efd..ce7624d2b 100644 --- a/client/src/main/java/org/asynchttpclient/ntlm/NtlmEngine.java +++ b/client/src/main/java/org/asynchttpclient/ntlm/NtlmEngine.java @@ -116,7 +116,7 @@ public final class NtlmEngine { * username and the result of encrypting the nonce sent by the server using * the user's password as the key. * - * @param user The user name. This should not include the domain name. + * @param user The username. This should not include the domain name. * @param password The password. * @param host The host that is originating the authentication request. * @param domain The domain to authenticate within. @@ -766,7 +766,7 @@ private static void oddParity(final byte[] bytes) { * NTLM message generation, base class */ private static class NTLMMessage { - private static final byte[] EMPTY_BYTE_ARRAY = new byte[]{}; + private static final byte[] EMPTY_BYTE_ARRAY = {}; /** * The current response */ @@ -846,14 +846,14 @@ protected final void readBytes(final byte[] buffer, final int position) { } /** - * Read a ushort from a position within the message buffer + * Read an ushort from a position within the message buffer */ protected int readUShort(final int position) { return NtlmEngine.readUShort(messageContents, position); } /** - * Read a ulong from a position within the message buffer + * Read an ulong from a position within the message buffer */ protected final int readULong(final int position) { return NtlmEngine.readULong(messageContents, position); @@ -1033,7 +1033,7 @@ static class Type2Message extends NTLMMessage { // Next 2 bytes, major/minor version number (e.g. 0x05 0x02) // Next 8 bytes, build number // Next 2 bytes, protocol version number (e.g. 0x00 0x0f) - // Next, various text fields, and a ushort of value 0 at the end + // Next, various text fields, and an ushort of value 0 at the end // Parse out the rest of the info we need from the message // The nonce is the 8 bytes starting from the byte in position 24. @@ -1566,7 +1566,7 @@ void update(final byte[] input) { /** * Creates the first message (type 1 message) in the NTLM authentication - * sequence. This message includes the user name, domain and host for the + * sequence. This message includes the username, domain and host for the * authentication session. * * @return String the message to add to the HTTP request header. diff --git a/client/src/main/java/org/asynchttpclient/oauth/OAuthSignatureCalculatorInstance.java b/client/src/main/java/org/asynchttpclient/oauth/OAuthSignatureCalculatorInstance.java index ec7da244f..76c08fc77 100644 --- a/client/src/main/java/org/asynchttpclient/oauth/OAuthSignatureCalculatorInstance.java +++ b/client/src/main/java/org/asynchttpclient/oauth/OAuthSignatureCalculatorInstance.java @@ -115,7 +115,7 @@ StringBuilder signatureBaseString(ConsumerKey consumerAuth, RequestToken userAut String encodedParams = encodedParams(consumerAuth, userAuth, oauthTimestamp, percentEncodedNonce, formParams, queryParams); StringBuilder sb = StringBuilderPool.DEFAULT.stringBuilder(); - sb.append(method); // POST / GET etc (nothing to URL encode) + sb.append(method); // POST / GET etc. (nothing to URL encode) sb.append('&'); Utf8UrlEncoder.encodeAndAppendPercentEncoded(sb, baseUrl); diff --git a/client/src/main/java/org/asynchttpclient/request/body/generator/BodyGenerator.java b/client/src/main/java/org/asynchttpclient/request/body/generator/BodyGenerator.java index 7c5027d94..835ef7bd6 100644 --- a/client/src/main/java/org/asynchttpclient/request/body/generator/BodyGenerator.java +++ b/client/src/main/java/org/asynchttpclient/request/body/generator/BodyGenerator.java @@ -23,7 +23,7 @@ public interface BodyGenerator { /** * Creates a new instance of the request body to be read. While each invocation of this method is supposed to create * a fresh instance of the body, the actual contents of all these body instances is the same. For example, the body - * needs to be resend after an authentication challenge of a redirect. + * needs to be resent after an authentication challenge of a redirect. * * @return The request body, never {@code null}. */ diff --git a/client/src/main/java/org/asynchttpclient/request/body/generator/InputStreamBodyGenerator.java b/client/src/main/java/org/asynchttpclient/request/body/generator/InputStreamBodyGenerator.java index b98460b69..1f602dae4 100644 --- a/client/src/main/java/org/asynchttpclient/request/body/generator/InputStreamBodyGenerator.java +++ b/client/src/main/java/org/asynchttpclient/request/body/generator/InputStreamBodyGenerator.java @@ -24,7 +24,7 @@ * A {@link BodyGenerator} which use an {@link InputStream} for reading bytes, without having to read the entire stream in memory. *
* NOTE: The {@link InputStream} must support the {@link InputStream#mark} and {@link InputStream#reset()} operation. If not, mechanisms like authentication, redirect, or - * resumable download will not works. + * resumable download will not work. */ public final class InputStreamBodyGenerator implements BodyGenerator { diff --git a/client/src/main/java/org/asynchttpclient/uri/UriParser.java b/client/src/main/java/org/asynchttpclient/uri/UriParser.java index b0bad47ce..ae347277e 100644 --- a/client/src/main/java/org/asynchttpclient/uri/UriParser.java +++ b/client/src/main/java/org/asynchttpclient/uri/UriParser.java @@ -187,8 +187,8 @@ private void computeUserInfo(String nonNullAuthority) { } } - private boolean isMaybeIPV6(String nonNullHost) { - // If the host is surrounded by [ and ] then its an IPv6 + private static boolean isMaybeIPV6(String nonNullHost) { + // If the host is surrounded by [ and ] then it's an IPv6 // literal address as specified in RFC2732 return nonNullHost.length() > 0 && nonNullHost.charAt(0) == '['; } diff --git a/client/src/main/java/org/asynchttpclient/util/EnsuresNonNull.java b/client/src/main/java/org/asynchttpclient/util/EnsuresNonNull.java index a0cecaf8e..64ccee659 100644 --- a/client/src/main/java/org/asynchttpclient/util/EnsuresNonNull.java +++ b/client/src/main/java/org/asynchttpclient/util/EnsuresNonNull.java @@ -11,7 +11,7 @@ * all class's fields defined in "param" will be @NotNull. */ @Retention(RetentionPolicy.CLASS) -@Target({ElementType.METHOD}) +@Target(ElementType.METHOD) public @interface EnsuresNonNull { String[] value(); } diff --git a/client/src/main/java/org/asynchttpclient/util/MiscUtils.java b/client/src/main/java/org/asynchttpclient/util/MiscUtils.java index 12506b9a9..5a37cce75 100644 --- a/client/src/main/java/org/asynchttpclient/util/MiscUtils.java +++ b/client/src/main/java/org/asynchttpclient/util/MiscUtils.java @@ -47,12 +47,12 @@ public static boolean isNonEmpty(byte @Nullable [] array) { return array != null && array.length != 0; } - @Contract(value = "null -> false") + @Contract("null -> false") public static boolean isNonEmpty(@Nullable Collection collection) { return collection != null && !collection.isEmpty(); } - @Contract(value = "null -> false") + @Contract("null -> false") public static boolean isNonEmpty(@Nullable Map map) { return map != null && !map.isEmpty(); } diff --git a/client/src/main/java/org/asynchttpclient/util/ProxyUtils.java b/client/src/main/java/org/asynchttpclient/util/ProxyUtils.java index 0942ddd8e..a7bf5b7e2 100644 --- a/client/src/main/java/org/asynchttpclient/util/ProxyUtils.java +++ b/client/src/main/java/org/asynchttpclient/util/ProxyUtils.java @@ -94,7 +94,7 @@ private ProxyUtils() { /** * Creates a proxy server instance from the given properties. - * Currently the default http.* proxy properties are supported as well as properties specific for AHC. + * Currently, the default http.* proxy properties are supported as well as properties specific for AHC. * * @param properties the properties to evaluate. Must not be null. * @return a ProxyServer instance or null, if no valid properties were set. diff --git a/client/src/main/java/org/asynchttpclient/util/Utf8UrlEncoder.java b/client/src/main/java/org/asynchttpclient/util/Utf8UrlEncoder.java index f2928fa60..fe01e3208 100644 --- a/client/src/main/java/org/asynchttpclient/util/Utf8UrlEncoder.java +++ b/client/src/main/java/org/asynchttpclient/util/Utf8UrlEncoder.java @@ -147,7 +147,7 @@ public static StringBuilder encodeAndAppendFormElement(StringBuilder sb, CharSeq return appendEncoded(sb, input, FORM_URL_ENCODED_SAFE_CHARS, true); } - @Contract(value = "!null -> !null") + @Contract("!null -> !null") public static @Nullable String percentEncodeQueryElement(@Nullable String input) { if (input == null) { return null; diff --git a/client/src/main/java/org/asynchttpclient/ws/WebSocket.java b/client/src/main/java/org/asynchttpclient/ws/WebSocket.java index 4857876a2..0362ba455 100644 --- a/client/src/main/java/org/asynchttpclient/ws/WebSocket.java +++ b/client/src/main/java/org/asynchttpclient/ws/WebSocket.java @@ -57,7 +57,7 @@ public interface WebSocket { * Allows sending a text frame with fragmentation or extension bits. When using fragmentation, the next fragments must be sent with sendContinuationFrame. * * @param payload a text fragment. - * @param finalFragment flag indicating whether or not this is the final fragment + * @param finalFragment flag indicating whether this is the final fragment * @param rsv extension bits, 0 otherwise * @return a future that will be completed once the frame will be actually written on the wire */ @@ -67,7 +67,7 @@ public interface WebSocket { * Allows sending a text frame with fragmentation or extension bits. When using fragmentation, the next fragments must be sent with sendContinuationFrame. * * @param payload a ByteBuf fragment. - * @param finalFragment flag indicating whether or not this is the final fragment + * @param finalFragment flag indicating whether this is the final fragment * @param rsv extension bits, 0 otherwise * @return a future that will be completed once the frame will be actually written on the wire */ @@ -85,7 +85,7 @@ public interface WebSocket { * Allows sending a binary frame with fragmentation or extension bits. When using fragmentation, the next fragments must be sent with sendContinuationFrame. * * @param payload a binary payload - * @param finalFragment flag indicating whether or not this is the last fragment + * @param finalFragment flag indicating whether this is the last fragment * @param rsv extension bits, 0 otherwise * @return a future that will be completed once the frame will be actually written on the wire */ @@ -95,7 +95,7 @@ public interface WebSocket { * Allows sending a binary frame with fragmentation or extension bits. When using fragmentation, the next fragments must be sent with sendContinuationFrame. * * @param payload a ByteBuf payload - * @param finalFragment flag indicating whether or not this is the last fragment + * @param finalFragment flag indicating whether this is the last fragment * @param rsv extension bits, 0 otherwise * @return a future that will be completed once the frame will be actually written on the wire */ @@ -105,7 +105,7 @@ public interface WebSocket { * Send a text continuation frame. The last fragment must have finalFragment set to true. * * @param payload the text fragment - * @param finalFragment flag indicating whether or not this is the last fragment + * @param finalFragment flag indicating whether this is the last fragment * @param rsv extension bits, 0 otherwise * @return a future that will be completed once the frame will be actually written on the wire */ @@ -115,7 +115,7 @@ public interface WebSocket { * Send a binary continuation frame. The last fragment must have finalFragment set to true. * * @param payload the binary fragment - * @param finalFragment flag indicating whether or not this is the last fragment + * @param finalFragment flag indicating whether this is the last fragment * @param rsv extension bits, 0 otherwise * @return a future that will be completed once the frame will be actually written on the wire */ @@ -125,21 +125,21 @@ public interface WebSocket { * Send a continuation frame (those are actually untyped as counterpart must have memorized first fragmented frame type). The last fragment must have finalFragment set to true. * * @param payload a ByteBuf fragment - * @param finalFragment flag indicating whether or not this is the last fragment + * @param finalFragment flag indicating whether this is the last fragment * @param rsv extension bits, 0 otherwise * @return a future that will be completed once the frame will be actually written on the wire */ Future sendContinuationFrame(ByteBuf payload, boolean finalFragment, int rsv); /** - * Send a empty ping frame + * Send an empty ping frame * * @return a future that will be completed once the frame will be actually written on the wire */ Future sendPingFrame(); /** - * Send a ping frame with a byte array payload (limited to 125 bytes or less). + * Send a ping frame with a byte array payload (limited to 125 bytes or fewer). * * @param payload the payload. * @return a future that will be completed once the frame will be actually written on the wire @@ -147,7 +147,7 @@ public interface WebSocket { Future sendPingFrame(byte[] payload); /** - * Send a ping frame with a ByteBuf payload (limited to 125 bytes or less). + * Send a ping frame with a ByteBuf payload (limited to 125 bytes or fewer). * * @param payload the payload. * @return a future that will be completed once the frame will be actually written on the wire @@ -155,14 +155,14 @@ public interface WebSocket { Future sendPingFrame(ByteBuf payload); /** - * Send a empty pong frame + * Send an empty pong frame * * @return a future that will be completed once the frame will be actually written on the wire */ Future sendPongFrame(); /** - * Send a pong frame with a byte array payload (limited to 125 bytes or less). + * Send a pong frame with a byte array payload (limited to 125 bytes or fewer). * * @param payload the payload. * @return a future that will be completed once the frame will be actually written on the wire @@ -170,7 +170,7 @@ public interface WebSocket { Future sendPongFrame(byte[] payload); /** - * Send a pong frame with a ByteBuf payload (limited to 125 bytes or less). + * Send a pong frame with a ByteBuf payload (limited to 125 bytes or fewer). * * @param payload the payload. * @return a future that will be completed once the frame will be actually written on the wire @@ -178,14 +178,14 @@ public interface WebSocket { Future sendPongFrame(ByteBuf payload); /** - * Send a empty close frame. + * Send an empty close frame. * * @return a future that will be completed once the frame will be actually written on the wire */ Future sendCloseFrame(); /** - * Send a empty close frame. + * Send an empty close frame. * * @param statusCode a status code * @param reasonText a reason From 63be9fa1ae1d45502a3e7b4792e79df36e835da0 Mon Sep 17 00:00:00 2001 From: Aayush Atharva Date: Sun, 3 Sep 2023 15:36:59 +0530 Subject: [PATCH 020/167] Drop WebDAV Support (#1900) --- .../webdav/WebDavCompletionHandlerBase.java | 192 ------------------ .../webdav/WebDavResponse.java | 139 ------------- .../asynchttpclient/webdav/WebdavTest.java | 179 ---------------- 3 files changed, 510 deletions(-) delete mode 100644 client/src/main/java/org/asynchttpclient/webdav/WebDavCompletionHandlerBase.java delete mode 100644 client/src/main/java/org/asynchttpclient/webdav/WebDavResponse.java delete mode 100644 client/src/test/java/org/asynchttpclient/webdav/WebdavTest.java diff --git a/client/src/main/java/org/asynchttpclient/webdav/WebDavCompletionHandlerBase.java b/client/src/main/java/org/asynchttpclient/webdav/WebDavCompletionHandlerBase.java deleted file mode 100644 index bf57ddd21..000000000 --- a/client/src/main/java/org/asynchttpclient/webdav/WebDavCompletionHandlerBase.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.webdav; - -import io.netty.handler.codec.http.HttpHeaders; -import org.asynchttpclient.AsyncHandler; -import org.asynchttpclient.HttpResponseBodyPart; -import org.asynchttpclient.HttpResponseStatus; -import org.asynchttpclient.Response; -import org.asynchttpclient.netty.NettyResponse; -import org.jetbrains.annotations.Nullable; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.xml.sax.SAXException; - -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import java.io.IOException; -import java.io.InputStream; -import java.net.SocketAddress; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.concurrent.Future; - -/** - * Simple {@link AsyncHandler} that add support for WebDav's response manipulation. - * - * @param the result type - */ -public abstract class WebDavCompletionHandlerBase implements AsyncHandler { - private static final Logger LOGGER = LoggerFactory.getLogger(WebDavCompletionHandlerBase.class); - private static final DocumentBuilderFactory DOCUMENT_BUILDER_FACTORY; - private final List bodyParts = Collections.synchronizedList(new ArrayList<>()); - private @Nullable HttpResponseStatus status; - private @Nullable HttpHeaders headers; - - static { - DOCUMENT_BUILDER_FACTORY = DocumentBuilderFactory.newInstance(); - if (Boolean.getBoolean("org.asynchttpclient.webdav.enableDtd")) { - try { - DOCUMENT_BUILDER_FACTORY.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); - } catch (ParserConfigurationException e) { - LOGGER.error("Failed to disable doctype declaration"); - throw new ExceptionInInitializerError(e); - } - } - } - - @Override - public final State onBodyPartReceived(final HttpResponseBodyPart content) { - bodyParts.add(content); - return State.CONTINUE; - } - - @Override - public final State onStatusReceived(final HttpResponseStatus status) { - this.status = status; - return State.CONTINUE; - } - - @Override - public final State onHeadersReceived(final HttpHeaders headers) { - this.headers = headers; - return State.CONTINUE; - } - - private Document readXMLResponse(InputStream stream, HttpResponseStatus initialStatus) { - Document document; - try { - document = DOCUMENT_BUILDER_FACTORY.newDocumentBuilder().parse(stream); - status = parse(document, initialStatus); - } catch (SAXException | IOException | ParserConfigurationException e) { - LOGGER.error(e.getMessage(), e); - throw new RuntimeException(e); - } - return document; - } - - private static HttpResponseStatus parse(Document document, HttpResponseStatus initialStatus) { - HttpResponseStatus status = initialStatus; - Element element = document.getDocumentElement(); - NodeList statusNode = element.getElementsByTagName("status"); - for (int i = 0; i < statusNode.getLength(); i++) { - Node node = statusNode.item(i); - - String value = node.getFirstChild().getNodeValue(); - int statusCode = Integer.parseInt(value.substring(value.indexOf(' '), value.lastIndexOf(' ')).trim()); - String statusText = value.substring(value.lastIndexOf(' ')); - status = new HttpStatusWrapper(status, statusText, statusCode); - } - return status; - } - - @Override - public final T onCompleted() throws Exception { - if (status != null) { - Document document = null; - if (status.getStatusCode() == 207) { - document = readXMLResponse(new NettyResponse(status, headers, bodyParts).getResponseBodyAsStream(), status); - } - // recompute response as readXMLResponse->parse might have updated it - return onCompleted(new WebDavResponse(new NettyResponse(status, headers, bodyParts), document)); - } else { - throw new IllegalStateException("Status is null"); - } - } - - @Override - public void onThrowable(Throwable t) { - LOGGER.debug(t.getMessage(), t); - } - - /** - * Invoked once the HTTP response has been fully read. - * - * @param response The {@link Response} - * @return Type of the value that will be returned by the associated {@link Future} - * @throws Exception if something wrong happens - */ - public abstract T onCompleted(WebDavResponse response) throws Exception; - - private static class HttpStatusWrapper extends HttpResponseStatus { - - private final HttpResponseStatus wrapped; - - private final String statusText; - - private final int statusCode; - - HttpStatusWrapper(HttpResponseStatus wrapper, String statusText, int statusCode) { - super(wrapper.getUri()); - wrapped = wrapper; - this.statusText = statusText; - this.statusCode = statusCode; - } - - @Override - public int getStatusCode() { - return statusText == null ? wrapped.getStatusCode() : statusCode; - } - - @Override - public String getStatusText() { - return statusText == null ? wrapped.getStatusText() : statusText; - } - - @Override - public String getProtocolName() { - return wrapped.getProtocolName(); - } - - @Override - public int getProtocolMajorVersion() { - return wrapped.getProtocolMajorVersion(); - } - - @Override - public int getProtocolMinorVersion() { - return wrapped.getProtocolMinorVersion(); - } - - @Override - public String getProtocolText() { - return wrapped.getStatusText(); - } - - @Override - public SocketAddress getRemoteAddress() { - return wrapped.getRemoteAddress(); - } - - @Override - public SocketAddress getLocalAddress() { - return wrapped.getLocalAddress(); - } - } -} diff --git a/client/src/main/java/org/asynchttpclient/webdav/WebDavResponse.java b/client/src/main/java/org/asynchttpclient/webdav/WebDavResponse.java deleted file mode 100644 index 650212d2e..000000000 --- a/client/src/main/java/org/asynchttpclient/webdav/WebDavResponse.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.webdav; - -import io.netty.handler.codec.http.HttpHeaders; -import io.netty.handler.codec.http.cookie.Cookie; -import org.asynchttpclient.Response; -import org.asynchttpclient.uri.Uri; -import org.jetbrains.annotations.Nullable; -import org.w3c.dom.Document; - -import java.io.InputStream; -import java.net.SocketAddress; -import java.nio.ByteBuffer; -import java.nio.charset.Charset; -import java.util.List; - -/** - * Customized {@link Response} which add support for getting the response's body as an XML document (@link WebDavResponse#getBodyAsXML} - */ -public class WebDavResponse implements Response { - - private final Response response; - private final @Nullable Document document; - - WebDavResponse(Response response, @Nullable Document document) { - this.response = response; - this.document = document; - } - - @Override - public int getStatusCode() { - return response.getStatusCode(); - } - - @Override - public String getStatusText() { - return response.getStatusText(); - } - - @Override - public byte[] getResponseBodyAsBytes() { - return response.getResponseBodyAsBytes(); - } - - @Override - public ByteBuffer getResponseBodyAsByteBuffer() { - return response.getResponseBodyAsByteBuffer(); - } - - @Override - public InputStream getResponseBodyAsStream() { - return response.getResponseBodyAsStream(); - } - - @Override - public String getResponseBody() { - return response.getResponseBody(); - } - - @Override - public String getResponseBody(Charset charset) { - return response.getResponseBody(charset); - } - - @Override - public Uri getUri() { - return response.getUri(); - } - - @Override - public String getContentType() { - return response.getContentType(); - } - - @Override - public String getHeader(CharSequence name) { - return response.getHeader(name); - } - - @Override - public List getHeaders(CharSequence name) { - return response.getHeaders(name); - } - - @Override - public HttpHeaders getHeaders() { - return response.getHeaders(); - } - - @Override - public boolean isRedirected() { - return response.isRedirected(); - } - - @Override - public List getCookies() { - return response.getCookies(); - } - - @Override - public boolean hasResponseStatus() { - return response.hasResponseStatus(); - } - - @Override - public boolean hasResponseHeaders() { - return response.hasResponseHeaders(); - } - - @Override - public boolean hasResponseBody() { - return response.hasResponseBody(); - } - - @Override - public SocketAddress getRemoteAddress() { - return response.getRemoteAddress(); - } - - @Override - public SocketAddress getLocalAddress() { - return response.getLocalAddress(); - } - - public @Nullable Document getBodyAsXML() { - return document; - } -} diff --git a/client/src/test/java/org/asynchttpclient/webdav/WebdavTest.java b/client/src/test/java/org/asynchttpclient/webdav/WebdavTest.java deleted file mode 100644 index ce351c03e..000000000 --- a/client/src/test/java/org/asynchttpclient/webdav/WebdavTest.java +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Copyright (c) 2010-2012 Sonatype, Inc. All rights reserved. - * - * This program is licensed to you under the Apache License Version 2.0, - * and you may not use this file except in compliance with the Apache License Version 2.0. - * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the Apache License Version 2.0 is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - */ -package org.asynchttpclient.webdav; - -import jakarta.servlet.ServletConfig; -import jakarta.servlet.ServletContext; -import jakarta.servlet.ServletException; -import org.apache.catalina.Context; -import org.apache.catalina.servlets.WebdavServlet; -import org.apache.catalina.startup.Tomcat; -import org.asynchttpclient.AsyncHttpClient; -import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.BeforeEach; - -import java.io.File; -import java.util.Enumeration; - -import static org.asynchttpclient.Dsl.asyncHttpClient; -import static org.asynchttpclient.Dsl.delete; - -public class WebdavTest { - - private Tomcat tomcat; - private int port1; - - @SuppressWarnings("serial") - @BeforeEach - public void setUpGlobal() throws Exception { - String path = new File(".").getAbsolutePath() + "/target"; - - tomcat = new Tomcat(); - tomcat.setHostname("localhost"); - tomcat.setPort(0); - tomcat.setBaseDir(path); - Context ctx = tomcat.addContext("", path); - - Tomcat.addServlet(ctx, "webdav", new WebdavServlet() { - @Override - public void init(ServletConfig config) throws ServletException { - - super.init(new ServletConfig() { - - @Override - public String getServletName() { - return config.getServletName(); - } - - @Override - public ServletContext getServletContext() { - return config.getServletContext(); - } - - @Override - public Enumeration getInitParameterNames() { - // FIXME - return config.getInitParameterNames(); - } - - @Override - public String getInitParameter(String name) { - switch (name) { - case "readonly": - return "false"; - case "listings": - return "true"; - default: - return config.getInitParameter(name); - } - } - }); - } - - }); - ctx.addServletMappingDecoded("/*", "webdav"); - tomcat.start(); - port1 = tomcat.getConnector().getLocalPort(); - } - - @AfterEach - public void tearDownGlobal() throws Exception { - tomcat.stop(); - } - - private String getTargetUrl() { - return String.format("http://localhost:%s/folder1", port1); - } - - @AfterEach - public void clean() throws Exception { - try (AsyncHttpClient client = asyncHttpClient()) { - client.executeRequest(delete(getTargetUrl())).get(); - } - } - -// @RepeatedIfExceptionsTest(repeats = 5) -// public void mkcolWebDavTest1() throws Exception { -// try (AsyncHttpClient client = asyncHttpClient()) { -// Request mkcolRequest = new RequestBuilder("MKCOL").setUrl(getTargetUrl()).build(); -// Response response = client.executeRequest(mkcolRequest).get(); -// assertEquals(201, response.getStatusCode()); -// } -// } -// -// @RepeatedIfExceptionsTest(repeats = 5) -// public void mkcolWebDavTest2() throws Exception { -// try (AsyncHttpClient client = asyncHttpClient()) { -// Request mkcolRequest = new RequestBuilder("MKCOL").setUrl(getTargetUrl() + "/folder2").build(); -// Response response = client.executeRequest(mkcolRequest).get(); -// assertEquals(409, response.getStatusCode()); -// } -// } -// -// @RepeatedIfExceptionsTest(repeats = 5) -// public void basicPropFindWebDavTest() throws Exception { -// try (AsyncHttpClient client = asyncHttpClient()) { -// Request propFindRequest = new RequestBuilder("PROPFIND").setUrl(getTargetUrl()).build(); -// Response response = client.executeRequest(propFindRequest).get(); -// -// assertEquals(404, response.getStatusCode()); -// } -// } -// -// @RepeatedIfExceptionsTest(repeats = 5) -// public void propFindWebDavTest() throws Exception { -// try (AsyncHttpClient client = asyncHttpClient()) { -// Request mkcolRequest = new RequestBuilder("MKCOL").setUrl(getTargetUrl()).build(); -// Response response = client.executeRequest(mkcolRequest).get(); -// assertEquals(201, response.getStatusCode()); -// -// Request putRequest = put(getTargetUrl() + "/Test.txt").setBody("this is a test").build(); -// response = client.executeRequest(putRequest).get(); -// assertEquals(201, response.getStatusCode()); -// -// Request propFindRequest = new RequestBuilder("PROPFIND").setUrl(getTargetUrl() + "/Test.txt").build(); -// response = client.executeRequest(propFindRequest).get(); -// -// assertEquals(207, response.getStatusCode()); -// String body = response.getResponseBody(); -// assertTrue(body.contains("HTTP/1.1 200"), "Got " + body); -// } -// } -// -// @RepeatedIfExceptionsTest(repeats = 5) -// public void propFindCompletionHandlerWebDavTest() throws Exception { -// try (AsyncHttpClient c = asyncHttpClient()) { -// Request mkcolRequest = new RequestBuilder("MKCOL").setUrl(getTargetUrl()).build(); -// Response response = c.executeRequest(mkcolRequest).get(); -// assertEquals(201, response.getStatusCode()); -// -// Request propFindRequest = new RequestBuilder("PROPFIND").setUrl(getTargetUrl()).build(); -// WebDavResponse webDavResponse = c.executeRequest(propFindRequest, new WebDavCompletionHandlerBase() { -// -// @Override -// public void onThrowable(Throwable t) { -// t.printStackTrace(); -// } -// -// @Override -// public WebDavResponse onCompleted(WebDavResponse response) { -// return response; -// } -// }).get(); -// -// assertEquals(207, webDavResponse.getStatusCode()); -// String body = webDavResponse.getResponseBody(); -// assertTrue(body.contains("HTTP/1.1 200"), "Got " + body); -// } -// } -} From b735dbb4f4e7566fc151fcdaba27e9392c9d3a59 Mon Sep 17 00:00:00 2001 From: Aayush Atharva Date: Sun, 3 Sep 2023 15:53:35 +0530 Subject: [PATCH 021/167] Drop OAuth1 Support (#1902) --- .../asynchttpclient/oauth/ConsumerKey.java | 45 -- .../oauth/OAuthSignatureCalculator.java | 67 --- .../OAuthSignatureCalculatorInstance.java | 204 --------- .../org/asynchttpclient/oauth/Parameter.java | 60 --- .../org/asynchttpclient/oauth/Parameters.java | 52 --- .../asynchttpclient/oauth/RequestToken.java | 47 -- .../oauth/OAuthSignatureCalculatorTest.java | 406 ------------------ .../oauth/StaticOAuthSignatureCalculator.java | 57 --- 8 files changed, 938 deletions(-) delete mode 100644 client/src/main/java/org/asynchttpclient/oauth/ConsumerKey.java delete mode 100644 client/src/main/java/org/asynchttpclient/oauth/OAuthSignatureCalculator.java delete mode 100644 client/src/main/java/org/asynchttpclient/oauth/OAuthSignatureCalculatorInstance.java delete mode 100644 client/src/main/java/org/asynchttpclient/oauth/Parameter.java delete mode 100644 client/src/main/java/org/asynchttpclient/oauth/Parameters.java delete mode 100644 client/src/main/java/org/asynchttpclient/oauth/RequestToken.java delete mode 100644 client/src/test/java/org/asynchttpclient/oauth/OAuthSignatureCalculatorTest.java delete mode 100644 client/src/test/java/org/asynchttpclient/oauth/StaticOAuthSignatureCalculator.java diff --git a/client/src/main/java/org/asynchttpclient/oauth/ConsumerKey.java b/client/src/main/java/org/asynchttpclient/oauth/ConsumerKey.java deleted file mode 100644 index a86eb35a5..000000000 --- a/client/src/main/java/org/asynchttpclient/oauth/ConsumerKey.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2018-2023 AsyncHttpClient Project. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.asynchttpclient.oauth; - -import org.asynchttpclient.util.Utf8UrlEncoder; - -/** - * Value class for OAuth consumer keys. - */ -public class ConsumerKey { - private final String key; - private final String secret; - private final String percentEncodedKey; - - public ConsumerKey(String key, String secret) { - this.key = key; - this.secret = secret; - percentEncodedKey = Utf8UrlEncoder.percentEncodeQueryElement(key); - } - - public String getKey() { - return key; - } - - public String getSecret() { - return secret; - } - - public String getPercentEncodedKey() { - return percentEncodedKey; - } -} diff --git a/client/src/main/java/org/asynchttpclient/oauth/OAuthSignatureCalculator.java b/client/src/main/java/org/asynchttpclient/oauth/OAuthSignatureCalculator.java deleted file mode 100644 index 3f1a1a7c5..000000000 --- a/client/src/main/java/org/asynchttpclient/oauth/OAuthSignatureCalculator.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2016-2023 AsyncHttpClient Project. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.asynchttpclient.oauth; - -import io.netty.handler.codec.http.HttpHeaderNames; -import org.asynchttpclient.Request; -import org.asynchttpclient.RequestBuilderBase; -import org.asynchttpclient.SignatureCalculator; - -import java.security.InvalidKeyException; -import java.security.NoSuchAlgorithmException; - -/** - * OAuth {@link SignatureCalculator} that delegates to {@link OAuthSignatureCalculatorInstance}s. - */ -public class OAuthSignatureCalculator implements SignatureCalculator { - - private static final ThreadLocal INSTANCES = ThreadLocal.withInitial(() -> { - try { - return new OAuthSignatureCalculatorInstance(); - } catch (NoSuchAlgorithmException e) { - throw new ExceptionInInitializerError(e); - } - }); - - private final ConsumerKey consumerAuth; - - private final RequestToken userAuth; - - /** - * @param consumerAuth Consumer key to use for signature calculation - * @param userAuth Request/access token to use for signature calculation - */ - public OAuthSignatureCalculator(ConsumerKey consumerAuth, RequestToken userAuth) { - this.consumerAuth = consumerAuth; - this.userAuth = userAuth; - } - - @Override - public void calculateAndAddSignature(Request request, RequestBuilderBase requestBuilder) { - try { - String authorization = INSTANCES.get().computeAuthorizationHeader( - consumerAuth, - userAuth, - request.getUri(), - request.getMethod(), - request.getFormParams(), - request.getQueryParams()); - requestBuilder.setHeader(HttpHeaderNames.AUTHORIZATION, authorization); - } catch (InvalidKeyException e) { - throw new IllegalArgumentException("Failed to compute a valid key from consumer and user secrets", e); - } - } -} diff --git a/client/src/main/java/org/asynchttpclient/oauth/OAuthSignatureCalculatorInstance.java b/client/src/main/java/org/asynchttpclient/oauth/OAuthSignatureCalculatorInstance.java deleted file mode 100644 index 76c08fc77..000000000 --- a/client/src/main/java/org/asynchttpclient/oauth/OAuthSignatureCalculatorInstance.java +++ /dev/null @@ -1,204 +0,0 @@ -/* - * Copyright (c) 2017-2023 AsyncHttpClient Project. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.asynchttpclient.oauth; - -import org.asynchttpclient.Param; -import org.asynchttpclient.SignatureCalculator; -import org.asynchttpclient.uri.Uri; -import org.asynchttpclient.util.StringBuilderPool; -import org.asynchttpclient.util.StringUtils; -import org.asynchttpclient.util.Utf8UrlEncoder; -import org.jetbrains.annotations.Nullable; - -import javax.crypto.Mac; -import javax.crypto.spec.SecretKeySpec; -import java.nio.ByteBuffer; -import java.security.InvalidKeyException; -import java.security.NoSuchAlgorithmException; -import java.util.Base64; -import java.util.List; -import java.util.concurrent.ThreadLocalRandom; -import java.util.regex.Pattern; - -import static java.nio.charset.StandardCharsets.UTF_8; - -/** - * Non thread-safe {@link SignatureCalculator} for OAuth1. - *

- * Supports most common signature inclusion and calculation methods: HMAC-SHA1 for calculation, and Header inclusion as inclusion method. Nonce generation uses simple random - * numbers with base64 encoding. - */ -public class OAuthSignatureCalculatorInstance { - - private static final Pattern STAR_CHAR_PATTERN = Pattern.compile("*", Pattern.LITERAL); - private static final Pattern PLUS_CHAR_PATTERN = Pattern.compile("+", Pattern.LITERAL); - private static final Pattern ENCODED_TILDE_PATTERN = Pattern.compile("%7E", Pattern.LITERAL); - private static final String KEY_OAUTH_CONSUMER_KEY = "oauth_consumer_key"; - private static final String KEY_OAUTH_NONCE = "oauth_nonce"; - private static final String KEY_OAUTH_SIGNATURE = "oauth_signature"; - private static final String KEY_OAUTH_SIGNATURE_METHOD = "oauth_signature_method"; - private static final String KEY_OAUTH_TIMESTAMP = "oauth_timestamp"; - private static final String KEY_OAUTH_TOKEN = "oauth_token"; - private static final String KEY_OAUTH_VERSION = "oauth_version"; - private static final String OAUTH_VERSION_1_0 = "1.0"; - private static final String OAUTH_SIGNATURE_METHOD = "HMAC-SHA1"; - private static final String HMAC_SHA1_ALGORITHM = "HmacSHA1"; - - private final Mac mac; - private final byte[] nonceBuffer = new byte[16]; - private final Parameters parameters = new Parameters(); - - public OAuthSignatureCalculatorInstance() throws NoSuchAlgorithmException { - mac = Mac.getInstance(HMAC_SHA1_ALGORITHM); - } - - public String computeAuthorizationHeader(ConsumerKey consumerAuth, RequestToken userAuth, Uri uri, String method, List formParams, List queryParams) - throws InvalidKeyException { - String nonce = generateNonce(); - long timestamp = generateTimestamp(); - return computeAuthorizationHeader(consumerAuth, userAuth, uri, method, formParams, queryParams, timestamp, nonce); - } - - private String generateNonce() { - ThreadLocalRandom.current().nextBytes(nonceBuffer); - // let's use base64 encoding over hex, slightly more compact than hex or decimals - return Base64.getEncoder().encodeToString(nonceBuffer); - } - - private static long generateTimestamp() { - return System.currentTimeMillis() / 1000L; - } - - String computeAuthorizationHeader(ConsumerKey consumerAuth, RequestToken userAuth, Uri uri, String method, - List formParams, List queryParams, long timestamp, String nonce) throws InvalidKeyException { - String percentEncodedNonce = Utf8UrlEncoder.percentEncodeQueryElement(nonce); - String signature = computeSignature(consumerAuth, userAuth, uri, method, formParams, queryParams, timestamp, percentEncodedNonce); - return computeAuthorizationHeader(consumerAuth, userAuth, signature, timestamp, percentEncodedNonce); - } - - String computeSignature(ConsumerKey consumerAuth, RequestToken userAuth, Uri uri, String method, - List formParams, List queryParams, long oauthTimestamp, String percentEncodedNonce) throws InvalidKeyException { - StringBuilder sb = signatureBaseString( - consumerAuth, - userAuth, - uri, - method, - formParams, - queryParams, - oauthTimestamp, - percentEncodedNonce); - - ByteBuffer rawBase = StringUtils.charSequence2ByteBuffer(sb, UTF_8); - byte[] rawSignature = digest(consumerAuth, userAuth, rawBase); - // and finally, base64 encoded... phew! - return Base64.getEncoder().encodeToString(rawSignature); - } - - StringBuilder signatureBaseString(ConsumerKey consumerAuth, RequestToken userAuth, Uri uri, String method, - List formParams, List queryParams, long oauthTimestamp, String percentEncodedNonce) { - - // beware: must generate first as we're using pooled StringBuilder - String baseUrl = uri.toBaseUrl(); - String encodedParams = encodedParams(consumerAuth, userAuth, oauthTimestamp, percentEncodedNonce, formParams, queryParams); - - StringBuilder sb = StringBuilderPool.DEFAULT.stringBuilder(); - sb.append(method); // POST / GET etc. (nothing to URL encode) - sb.append('&'); - Utf8UrlEncoder.encodeAndAppendPercentEncoded(sb, baseUrl); - - // and all that needs to be URL encoded (... again!) - sb.append('&'); - Utf8UrlEncoder.encodeAndAppendPercentEncoded(sb, encodedParams); - return sb; - } - - private String encodedParams(ConsumerKey consumerAuth, RequestToken userAuth, long oauthTimestamp, String percentEncodedNonce, - List formParams, List queryParams) { - parameters.reset(); - - // List of all query and form parameters added to this request; needed for calculating request signature - // Start with standard OAuth parameters we need - parameters.add(KEY_OAUTH_CONSUMER_KEY, consumerAuth.getPercentEncodedKey()) - .add(KEY_OAUTH_NONCE, percentEncodedNonce) - .add(KEY_OAUTH_SIGNATURE_METHOD, OAUTH_SIGNATURE_METHOD) - .add(KEY_OAUTH_TIMESTAMP, String.valueOf(oauthTimestamp)); - if (userAuth.getKey() != null) { - parameters.add(KEY_OAUTH_TOKEN, userAuth.getPercentEncodedKey()); - } - parameters.add(KEY_OAUTH_VERSION, OAUTH_VERSION_1_0); - - if (formParams != null) { - for (Param param : formParams) { - // formParams are not already encoded - String value = param.getValue() != null ? Utf8UrlEncoder.percentEncodeQueryElement(param.getValue()) : ""; - parameters.add(Utf8UrlEncoder.percentEncodeQueryElement(param.getName()), value); - } - } - if (queryParams != null) { - for (Param param : queryParams) { - // queryParams are already form-url-encoded - // but OAuth1 uses RFC3986_UNRESERVED_CHARS so * and + have to be encoded - parameters.add(percentEncodeAlreadyFormUrlEncoded(param.getName()), percentEncodeAlreadyFormUrlEncoded(param.getValue())); - } - } - return parameters.sortAndConcat(); - } - - private static String percentEncodeAlreadyFormUrlEncoded(@Nullable String s) { - if (s == null) { - return ""; - } - s = STAR_CHAR_PATTERN.matcher(s).replaceAll("%2A"); - s = PLUS_CHAR_PATTERN.matcher(s).replaceAll("%20"); - s = ENCODED_TILDE_PATTERN.matcher(s).replaceAll("~"); - return s; - } - - private byte[] digest(ConsumerKey consumerAuth, RequestToken userAuth, ByteBuffer message) throws InvalidKeyException { - StringBuilder sb = StringBuilderPool.DEFAULT.stringBuilder(); - Utf8UrlEncoder.encodeAndAppendQueryElement(sb, consumerAuth.getSecret()); - sb.append('&'); - if (userAuth != null && userAuth.getSecret() != null) { - Utf8UrlEncoder.encodeAndAppendQueryElement(sb, userAuth.getSecret()); - } - byte[] keyBytes = StringUtils.charSequence2Bytes(sb, UTF_8); - SecretKeySpec signingKey = new SecretKeySpec(keyBytes, HMAC_SHA1_ALGORITHM); - - mac.init(signingKey); - mac.update(message); - return mac.doFinal(); - } - - String computeAuthorizationHeader(ConsumerKey consumerAuth, RequestToken userAuth, String signature, long oauthTimestamp, String percentEncodedNonce) { - StringBuilder sb = StringBuilderPool.DEFAULT.stringBuilder(); - sb.append("OAuth "); - sb.append(KEY_OAUTH_CONSUMER_KEY).append("=\"").append(consumerAuth.getPercentEncodedKey()).append("\", "); - if (userAuth.getKey() != null) { - sb.append(KEY_OAUTH_TOKEN).append("=\"").append(userAuth.getPercentEncodedKey()).append("\", "); - } - sb.append(KEY_OAUTH_SIGNATURE_METHOD).append("=\"").append(OAUTH_SIGNATURE_METHOD).append("\", "); - - // careful: base64 has chars that need URL encoding: - sb.append(KEY_OAUTH_SIGNATURE).append("=\""); - Utf8UrlEncoder.encodeAndAppendPercentEncoded(sb, signature).append("\", "); - sb.append(KEY_OAUTH_TIMESTAMP).append("=\"").append(oauthTimestamp).append("\", "); - - sb.append(KEY_OAUTH_NONCE).append("=\"").append(percentEncodedNonce).append("\", "); - - sb.append(KEY_OAUTH_VERSION).append("=\"").append(OAUTH_VERSION_1_0).append('"'); - return sb.toString(); - } -} diff --git a/client/src/main/java/org/asynchttpclient/oauth/Parameter.java b/client/src/main/java/org/asynchttpclient/oauth/Parameter.java deleted file mode 100644 index 3fa651a47..000000000 --- a/client/src/main/java/org/asynchttpclient/oauth/Parameter.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2017-2023 AsyncHttpClient Project. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.asynchttpclient.oauth; - -/** - * Helper class for sorting query and form parameters that we need - */ -final class Parameter implements Comparable { - - final String key, value; - - Parameter(String key, String value) { - this.key = key; - this.value = value; - } - - @Override - public int compareTo(Parameter other) { - int keyDiff = key.compareTo(other.key); - return keyDiff == 0 ? value.compareTo(other.value) : keyDiff; - } - - @Override - public String toString() { - return key + '=' + value; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - - Parameter parameter = (Parameter) o; - return key.equals(parameter.key) && value.equals(parameter.value); - } - - @Override - public int hashCode() { - int result = key.hashCode(); - result = 31 * result + value.hashCode(); - return result; - } -} diff --git a/client/src/main/java/org/asynchttpclient/oauth/Parameters.java b/client/src/main/java/org/asynchttpclient/oauth/Parameters.java deleted file mode 100644 index f8ba4b2a3..000000000 --- a/client/src/main/java/org/asynchttpclient/oauth/Parameters.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2017-2023 AsyncHttpClient Project. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.asynchttpclient.oauth; - -import org.asynchttpclient.util.StringBuilderPool; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -final class Parameters { - - private final List parameters = new ArrayList<>(); - - public Parameters add(String key, String value) { - parameters.add(new Parameter(key, value)); - return this; - } - - public void reset() { - parameters.clear(); - } - - String sortAndConcat() { - // then sort them (AFTER encoding, important) - Collections.sort(parameters); - - // and build parameter section using pre-encoded pieces: - StringBuilder encodedParams = StringBuilderPool.DEFAULT.stringBuilder(); - for (Parameter param : parameters) { - encodedParams.append(param.key).append('=').append(param.value).append('&'); - } - int length = encodedParams.length(); - if (length > 0) { - encodedParams.setLength(length - 1); - } - return encodedParams.toString(); - } -} diff --git a/client/src/main/java/org/asynchttpclient/oauth/RequestToken.java b/client/src/main/java/org/asynchttpclient/oauth/RequestToken.java deleted file mode 100644 index fe90fd413..000000000 --- a/client/src/main/java/org/asynchttpclient/oauth/RequestToken.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2017-2023 AsyncHttpClient Project. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.asynchttpclient.oauth; - -import org.asynchttpclient.util.Utf8UrlEncoder; - -/** - * Value class used for OAuth tokens (request secret, access secret); - * simple container with two parts, public id part ("key") and - * confidential ("secret") part. - */ -public class RequestToken { - private final String key; - private final String secret; - private final String percentEncodedKey; - - public RequestToken(String key, String token) { - this.key = key; - secret = token; - percentEncodedKey = Utf8UrlEncoder.percentEncodeQueryElement(key); - } - - public String getKey() { - return key; - } - - public String getSecret() { - return secret; - } - - public String getPercentEncodedKey() { - return percentEncodedKey; - } -} diff --git a/client/src/test/java/org/asynchttpclient/oauth/OAuthSignatureCalculatorTest.java b/client/src/test/java/org/asynchttpclient/oauth/OAuthSignatureCalculatorTest.java deleted file mode 100644 index b48094aa5..000000000 --- a/client/src/test/java/org/asynchttpclient/oauth/OAuthSignatureCalculatorTest.java +++ /dev/null @@ -1,406 +0,0 @@ -/* - * Copyright (c) 2016-2023 AsyncHttpClient Project. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.asynchttpclient.oauth; - -import io.github.artsok.RepeatedIfExceptionsTest; -import org.asynchttpclient.Param; -import org.asynchttpclient.Request; -import org.asynchttpclient.RequestBuilder; -import org.asynchttpclient.util.Utf8UrlEncoder; -import org.junit.jupiter.api.Test; - -import java.io.UnsupportedEncodingException; -import java.net.URLDecoder; -import java.nio.charset.StandardCharsets; -import java.security.NoSuchAlgorithmException; -import java.util.List; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import static io.netty.handler.codec.http.HttpHeaderNames.AUTHORIZATION; -import static org.asynchttpclient.Dsl.get; -import static org.asynchttpclient.Dsl.post; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertTrue; - -/** - * Tests the OAuth signature behavior. - *

- * See Signature Tester for an online oauth signature checker. - */ -public class OAuthSignatureCalculatorTest { - private static final String TOKEN_KEY = "nnch734d00sl2jdk"; - private static final String TOKEN_SECRET = "pfkkdhi9sl3r4s00"; - private static final String NONCE = "kllo9940pd9333jh"; - private static final long TIMESTAMP = 1191242096; - private static final String CONSUMER_KEY = "dpf43f3p2l4k3l03"; - private static final String CONSUMER_SECRET = "kd94hf93k423kf44"; - - // sample from RFC https://tools.ietf.org/html/rfc5849#section-3.4.1 - private static void testSignatureBaseString(Request request) throws NoSuchAlgorithmException { - String signatureBaseString = new OAuthSignatureCalculatorInstance() - .signatureBaseString(// - new ConsumerKey("9djdj82h48djs9d2", CONSUMER_SECRET), - new RequestToken("kkk9d7dh3k39sjv7", TOKEN_SECRET), - request.getUri(), - request.getMethod(), - request.getFormParams(), - request.getQueryParams(), - 137131201, - "7d8f3e4a").toString(); - - assertEquals("POST&" - + "http%3A%2F%2Fexample.com%2Frequest" - + "&a2%3Dr%2520b%26" - + "a3%3D2%2520q%26" - + "a3%3Da%26" - + "b5%3D%253D%25253D%26" - + "c%2540%3D%26" - + "c2%3D%26" - + "oauth_consumer_key%3D9djdj82h48djs9d2%26" - + "oauth_nonce%3D7d8f3e4a%26" - + "oauth_signature_method%3DHMAC-SHA1%26" - + "oauth_timestamp%3D137131201%26" - + "oauth_token%3Dkkk9d7dh3k39sjv7%26" - + "oauth_version%3D1.0", signatureBaseString); - } - - // fork above test with an OAuth token that requires encoding - private static void testSignatureBaseStringWithEncodableOAuthToken(Request request) throws NoSuchAlgorithmException { - String signatureBaseString = new OAuthSignatureCalculatorInstance() - .signatureBaseString(// - new ConsumerKey("9djdj82h48djs9d2", CONSUMER_SECRET), - new RequestToken("kkk9d7dh3k39sjv7", TOKEN_SECRET), - request.getUri(), - request.getMethod(), - request.getFormParams(), - request.getQueryParams(), - 137131201, - Utf8UrlEncoder.percentEncodeQueryElement("ZLc92RAkooZcIO/0cctl0Q==")).toString(); - - assertEquals("POST&" - + "http%3A%2F%2Fexample.com%2Frequest" - + "&a2%3Dr%2520b%26" - + "a3%3D2%2520q%26" - + "a3%3Da%26" - + "b5%3D%253D%25253D%26" - + "c%2540%3D%26" - + "c2%3D%26" - + "oauth_consumer_key%3D9djdj82h48djs9d2%26" - + "oauth_nonce%3DZLc92RAkooZcIO%252F0cctl0Q%253D%253D%26" - + "oauth_signature_method%3DHMAC-SHA1%26" - + "oauth_timestamp%3D137131201%26" - + "oauth_token%3Dkkk9d7dh3k39sjv7%26" - + "oauth_version%3D1.0", signatureBaseString); - } - - @RepeatedIfExceptionsTest(repeats = 5) - public void testSignatureBaseStringWithProperlyEncodedUri() throws NoSuchAlgorithmException { - Request request = post("http://example.com/request?b5=%3D%253D&a3=a&c%40=&a2=r%20b") - .addFormParam("c2", "") - .addFormParam("a3", "2 q") - .build(); - - testSignatureBaseString(request); - testSignatureBaseStringWithEncodableOAuthToken(request); - } - - @RepeatedIfExceptionsTest(repeats = 5) - public void testSignatureBaseStringWithRawUri() throws NoSuchAlgorithmException { - // note: @ is legal so don't decode it into %40 because it won't be - // encoded back - // note: we don't know how to fix a = that should have been encoded as - // %3D but who would be stupid enough to do that? - Request request = post("http://example.com/request?b5=%3D%253D&a3=a&c%40=&a2=r b") - .addFormParam("c2", "") - .addFormParam("a3", "2 q") - .build(); - - testSignatureBaseString(request); - testSignatureBaseStringWithEncodableOAuthToken(request); - } - - @Test - public void testSignatureBaseStringWithNoValueQueryParameter() throws NoSuchAlgorithmException { - // Query parameter with no value in OAuth1 should be treated the same as query parameter with an empty value. - // i.e."http://example.com/request?b5" == "http://example.com/request?b5=" - // Tested with http://lti.tools/oauth/ - Request request = post("http://example.com/request?b5=%3D%253D&a3=a&c%40&a2=r%20b") - .addFormParam("c2", "") - .addFormParam("a3", "2 q") - .build(); - - testSignatureBaseString(request); - testSignatureBaseStringWithEncodableOAuthToken(request); - } - - @Test - public void testDuplicatingNullValueFormParameter() throws Exception { - // Form parameter with no value in OAuth1 should be treated the same as form parameter with an empty value. - // Tested with http://lti.tools/oauth/ - Request request = post("http://example.com/request?b5=%3D%253D&a3=a&c%40=&a2=r%20b") - .addFormParam("c2", "") - .addFormParam("a3", "2 q") - .addFormParam("c2", null) - .build(); - - String signatureBaseString = new OAuthSignatureCalculatorInstance() - .signatureBaseString(// - new ConsumerKey(CONSUMER_KEY, CONSUMER_SECRET), - new RequestToken(TOKEN_KEY, TOKEN_SECRET), - request.getUri(), - request.getMethod(), - request.getFormParams(), - request.getQueryParams(), - TIMESTAMP, - NONCE).toString(); - assertEquals("POST&" + - "http%3A%2F%2Fexample.com%2Frequest" + - "&a2%3Dr%2520b%26" + - "a3%3D2%2520q%26" + - "a3%3Da%26" + - "b5%3D%253D%25253D%26" + - "c%2540%3D%26" + - "c2%3D%26" + - "c2%3D%26" + - "oauth_consumer_key%3Ddpf43f3p2l4k3l03%26" + - "oauth_nonce%3Dkllo9940pd9333jh%26" + - "oauth_signature_method%3DHMAC-SHA1%26" + - "oauth_timestamp%3D1191242096%26" + - "oauth_token%3Dnnch734d00sl2jdk%26" + - "oauth_version%3D1.0", signatureBaseString); - } - - // based on the reference test case from - // http://oauth.pbwiki.com/TestCases - @RepeatedIfExceptionsTest(repeats = 5) - public void testGetCalculateSignature() throws Exception { - Request request = get("http://photos.example.net/photos") - .addQueryParam("file", "vacation.jpg") - .addQueryParam("size", "original") - .build(); - - String signature = new OAuthSignatureCalculatorInstance() - .computeSignature(new ConsumerKey(CONSUMER_KEY, CONSUMER_SECRET), - new RequestToken(TOKEN_KEY, TOKEN_SECRET), - request.getUri(), - request.getMethod(), - request.getFormParams(), - request.getQueryParams(), - TIMESTAMP, - NONCE); - - assertEquals("tR3+Ty81lMeYAr/Fid0kMTYa/WM=", signature); - } - - @RepeatedIfExceptionsTest(repeats = 5) - public void testPostCalculateSignature() throws UnsupportedEncodingException { - StaticOAuthSignatureCalculator calc = // - new StaticOAuthSignatureCalculator(// - new ConsumerKey(CONSUMER_KEY, CONSUMER_SECRET), - new RequestToken(TOKEN_KEY, TOKEN_SECRET), - NONCE, - TIMESTAMP); - - final Request req = post("http://photos.example.net/photos") - .addFormParam("file", "vacation.jpg") - .addFormParam("size", "original") - .setSignatureCalculator(calc) - .build(); - - // From the signature tester, POST should look like: - // normalized parameters: - // file=vacation.jpg&oauth_consumer_key=dpf43f3p2l4k3l03&oauth_nonce=kllo9940pd9333jh&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1191242096&oauth_token=nnch734d00sl2jdk&oauth_version=1.0&size=original - // signature base string: - // POST&http%3A%2F%2Fphotos.example.net%2Fphotos&file%3Dvacation.jpg%26oauth_consumer_key%3Ddpf43f3p2l4k3l03%26oauth_nonce%3Dkllo9940pd9333jh%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1191242096%26oauth_token%3Dnnch734d00sl2jdk%26oauth_version%3D1.0%26size%3Doriginal - // signature: wPkvxykrw+BTdCcGqKr+3I+PsiM= - // header: OAuth - // realm="",oauth_version="1.0",oauth_consumer_key="dpf43f3p2l4k3l03",oauth_token="nnch734d00sl2jdk",oauth_timestamp="1191242096",oauth_nonce="kllo9940pd9333jh",oauth_signature_method="HMAC-SHA1",oauth_signature="wPkvxykrw%2BBTdCcGqKr%2B3I%2BPsiM%3D" - - String authHeader = req.getHeaders().get(AUTHORIZATION); - Matcher m = Pattern.compile("oauth_signature=\"(.+?)\"").matcher(authHeader); - assertTrue(m.find()); - String encodedSig = m.group(1); - String sig = URLDecoder.decode(encodedSig, StandardCharsets.UTF_8); - - assertEquals("wPkvxykrw+BTdCcGqKr+3I+PsiM=", sig); - } - - @RepeatedIfExceptionsTest(repeats = 5) - public void testGetWithRequestBuilder() throws UnsupportedEncodingException { - StaticOAuthSignatureCalculator calc = - new StaticOAuthSignatureCalculator( - new ConsumerKey(CONSUMER_KEY, CONSUMER_SECRET), - new RequestToken(TOKEN_KEY, TOKEN_SECRET), - NONCE, - TIMESTAMP); - - final Request req = get("http://photos.example.net/photos") - .addQueryParam("file", "vacation.jpg") - .addQueryParam("size", "original") - .setSignatureCalculator(calc) - .build(); - - final List params = req.getQueryParams(); - assertEquals(2, params.size()); - - // From the signature tester, the URL should look like: - // normalized parameters: - // file=vacation.jpg&oauth_consumer_key=dpf43f3p2l4k3l03&oauth_nonce=kllo9940pd9333jh&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1191242096&oauth_token=nnch734d00sl2jdk&oauth_version=1.0&size=original - // signature base string: - // GET&http%3A%2F%2Fphotos.example.net%2Fphotos&file%3Dvacation.jpg%26oauth_consumer_key%3Ddpf43f3p2l4k3l03%26oauth_nonce%3Dkllo9940pd9333jh%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1191242096%26oauth_token%3Dnnch734d00sl2jdk%26oauth_version%3D1.0%26size%3Doriginal - // signature: tR3+Ty81lMeYAr/Fid0kMTYa/WM= - // Authorization header: OAuth - // realm="",oauth_version="1.0",oauth_consumer_key="dpf43f3p2l4k3l03",oauth_token="nnch734d00sl2jdk",oauth_timestamp="1191242096",oauth_nonce="kllo9940pd9333jh",oauth_signature_method="HMAC-SHA1",oauth_signature="tR3%2BTy81lMeYAr%2FFid0kMTYa%2FWM%3D" - - String authHeader = req.getHeaders().get(AUTHORIZATION); - Matcher m = Pattern.compile("oauth_signature=\"(.+?)\"").matcher(authHeader); - assertTrue(m.find()); - String encodedSig = m.group(1); - String sig = URLDecoder.decode(encodedSig, StandardCharsets.UTF_8); - - assertEquals(sig, "tR3+Ty81lMeYAr/Fid0kMTYa/WM="); - assertEquals(req.getUrl(), "http://photos.example.net/photos?file=vacation.jpg&size=original"); - } - - @RepeatedIfExceptionsTest(repeats = 5) - public void testGetWithRequestBuilderAndQuery() throws UnsupportedEncodingException { - StaticOAuthSignatureCalculator calc = // - new StaticOAuthSignatureCalculator(// - new ConsumerKey(CONSUMER_KEY, CONSUMER_SECRET), - new RequestToken(TOKEN_KEY, TOKEN_SECRET), - NONCE, - TIMESTAMP); - - final Request req = get("http://photos.example.net/photos?file=vacation.jpg&size=original") - .setSignatureCalculator(calc) - .build(); - - final List params = req.getQueryParams(); - assertEquals(params.size(), 2); - - // From the signature tester, the URL should look like: - // normalized parameters: - // file=vacation.jpg&oauth_consumer_key=dpf43f3p2l4k3l03&oauth_nonce=kllo9940pd9333jh&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1191242096&oauth_token=nnch734d00sl2jdk&oauth_version=1.0&size=original - // signature base string: - // GET&http%3A%2F%2Fphotos.example.net%2Fphotos&file%3Dvacation.jpg%26oauth_consumer_key%3Ddpf43f3p2l4k3l03%26oauth_nonce%3Dkllo9940pd9333jh%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1191242096%26oauth_token%3Dnnch734d00sl2jdk%26oauth_version%3D1.0%26size%3Doriginal - // signature: tR3+Ty81lMeYAr/Fid0kMTYa/WM= - // Authorization header: OAuth - // realm="",oauth_version="1.0",oauth_consumer_key="dpf43f3p2l4k3l03",oauth_token="nnch734d00sl2jdk",oauth_timestamp="1191242096",oauth_nonce="kllo9940pd9333jh",oauth_signature_method="HMAC-SHA1",oauth_signature="tR3%2BTy81lMeYAr%2FFid0kMTYa%2FWM%3D" - - String authHeader = req.getHeaders().get(AUTHORIZATION); - Matcher m = Pattern.compile("oauth_signature=\"(.+?)\"").matcher(authHeader); - assertTrue(m.find()); - String encodedSig = m.group(1); - String sig = URLDecoder.decode(encodedSig, StandardCharsets.UTF_8); - - assertEquals("tR3+Ty81lMeYAr/Fid0kMTYa/WM=", sig); - assertEquals("http://photos.example.net/photos?file=vacation.jpg&size=original", req.getUrl()); - assertEquals( - "OAuth oauth_consumer_key=\"dpf43f3p2l4k3l03\", oauth_token=\"nnch734d00sl2jdk\", oauth_signature_method=\"HMAC-SHA1\", oauth_signature=\"tR3%2BTy81lMeYAr%2FFid0kMTYa%2FWM%3D\", oauth_timestamp=\"1191242096\", oauth_nonce=\"kllo9940pd9333jh\", oauth_version=\"1.0\"", - authHeader); - } - - @RepeatedIfExceptionsTest(repeats = 5) - public void testWithNullRequestToken() throws NoSuchAlgorithmException { - final Request request = get("http://photos.example.net/photos?file=vacation.jpg&size=original").build(); - - String signatureBaseString = new OAuthSignatureCalculatorInstance() - .signatureBaseString(// - new ConsumerKey("9djdj82h48djs9d2", CONSUMER_SECRET), - new RequestToken(null, null), - request.getUri(), - request.getMethod(), - request.getFormParams(), - request.getQueryParams(), - 137131201, - Utf8UrlEncoder.percentEncodeQueryElement("ZLc92RAkooZcIO/0cctl0Q==")).toString(); - - assertEquals("GET&" + - "http%3A%2F%2Fphotos.example.net%2Fphotos&file%3Dvacation.jpg%26" + - "oauth_consumer_key%3D9djdj82h48djs9d2%26" + - "oauth_nonce%3DZLc92RAkooZcIO%252F0cctl0Q%253D%253D%26" + - "oauth_signature_method%3DHMAC-SHA1%26" + - "oauth_timestamp%3D137131201%26" + - "oauth_version%3D1.0%26size%3Doriginal", signatureBaseString); - } - - @RepeatedIfExceptionsTest(repeats = 5) - public void testWithStarQueryParameterValue() throws NoSuchAlgorithmException { - final Request request = get("http://term.ie/oauth/example/request_token.php?testvalue=*").build(); - - String signatureBaseString = new OAuthSignatureCalculatorInstance() - .signatureBaseString( - new ConsumerKey("key", "secret"), - new RequestToken(null, null), - request.getUri(), - request.getMethod(), - request.getFormParams(), - request.getQueryParams(), - 1469019732, - "6ad17f97334700f3ec2df0631d5b7511").toString(); - - assertEquals("GET&" + - "http%3A%2F%2Fterm.ie%2Foauth%2Fexample%2Frequest_token.php&" - + "oauth_consumer_key%3Dkey%26" - + "oauth_nonce%3D6ad17f97334700f3ec2df0631d5b7511%26" - + "oauth_signature_method%3DHMAC-SHA1%26" - + "oauth_timestamp%3D1469019732%26" - + "oauth_version%3D1.0%26" - + "testvalue%3D%252A", signatureBaseString); - } - - @RepeatedIfExceptionsTest(repeats = 5) - public void testSignatureGenerationWithAsteriskInPath() throws Exception { - ConsumerKey consumerKey = new ConsumerKey("key", "secret"); - RequestToken requestToken = new RequestToken(null, null); - String nonce = "6ad17f97334700f3ec2df0631d5b7511"; - long timestamp = 1469019732; - - final Request request = get("http://example.com/oauth/example/*path/wi*th/asterisks*").build(); - - String expectedSignature = "cswi/v3ZqhVkTyy5MGqW841BxDA="; - String actualSignature = new OAuthSignatureCalculatorInstance().computeSignature( - consumerKey, - requestToken, - request.getUri(), - request.getMethod(), - request.getFormParams(), - request.getQueryParams(), - timestamp, - nonce); - assertEquals(expectedSignature, actualSignature); - - String generatedAuthHeader = new OAuthSignatureCalculatorInstance().computeAuthorizationHeader(consumerKey, requestToken, actualSignature, timestamp, nonce); - assertTrue(generatedAuthHeader.contains("oauth_signature=\"cswi%2Fv3ZqhVkTyy5MGqW841BxDA%3D\"")); - } - - @RepeatedIfExceptionsTest(repeats = 5) - public void testPercentEncodeKeyValues() { - // see https://github.com/AsyncHttpClient/async-http-client/issues/1415 - String keyValue = "\u3b05\u000c\u375b"; - - ConsumerKey consumer = new ConsumerKey(keyValue, "secret"); - RequestToken reqToken = new RequestToken(keyValue, "secret"); - OAuthSignatureCalculator calc = new OAuthSignatureCalculator(consumer, reqToken); - - RequestBuilder reqBuilder = new RequestBuilder() - .setUrl("https://api.dropbox.com/1/oauth/access_token?oauth_token=%EC%AD%AE%E3%AC%82%EC%BE%B8%E7%9C%9A%E8%BD%BD%E1%94%A5%E8%AD%AF%E8%98%93%E0%B9%99%E5%9E%96%EF%92%A2%EA%BC%97%EA%90%B0%E4%8A%91%E8%97%BF%EF%A8%BB%E5%B5%B1%DA%98%E2%90%87%E2%96%96%EE%B5%B5%E7%B9%AD%E9%AD%87%E3%BE%93%E5%AF%92%EE%BC%8F%E3%A0%B2%E8%A9%AB%E1%8B%97%EC%BF%80%EA%8F%AE%ED%87%B0%E5%97%B7%E9%97%BF%E8%BF%87%E6%81%A3%E5%BB%A1%EC%86%92%E8%92%81%E2%B9%94%EB%B6%86%E9%AE%8A%E6%94%B0%EE%AC%B5%E6%A0%99%EB%8B%AD%EB%BA%81%E7%89%9F%E5%B3%B7%EA%9D%B7%EC%A4%9C%E0%BC%BA%EB%BB%B9%ED%84%A9%E8%A5%B9%E8%AF%A0%E3%AC%85%0C%E3%9D%9B%E8%B9%8B%E6%BF%8C%EB%91%98%E7%8B%B3%E7%BB%A8%E2%A7%BB%E6%A3%84%E1%AB%B2%E8%8D%93%E4%BF%98%E9%B9%B9%EF%9A%8B%E8%A5%93"); - Request req = reqBuilder.build(); - - calc.calculateAndAddSignature(req, reqBuilder); - } -} diff --git a/client/src/test/java/org/asynchttpclient/oauth/StaticOAuthSignatureCalculator.java b/client/src/test/java/org/asynchttpclient/oauth/StaticOAuthSignatureCalculator.java deleted file mode 100644 index 9e3f2cfe9..000000000 --- a/client/src/test/java/org/asynchttpclient/oauth/StaticOAuthSignatureCalculator.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2017-2023 AsyncHttpClient Project. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.asynchttpclient.oauth; - -import io.netty.handler.codec.http.HttpHeaderNames; -import org.asynchttpclient.Request; -import org.asynchttpclient.RequestBuilderBase; -import org.asynchttpclient.SignatureCalculator; - -import java.security.InvalidKeyException; -import java.security.NoSuchAlgorithmException; - -class StaticOAuthSignatureCalculator implements SignatureCalculator { - - private final ConsumerKey consumerKey; - private final RequestToken requestToken; - private final String nonce; - private final long timestamp; - - StaticOAuthSignatureCalculator(ConsumerKey consumerKey, RequestToken requestToken, String nonce, long timestamp) { - this.consumerKey = consumerKey; - this.requestToken = requestToken; - this.nonce = nonce; - this.timestamp = timestamp; - } - - @Override - public void calculateAndAddSignature(Request request, RequestBuilderBase requestBuilder) { - try { - String authorization = new OAuthSignatureCalculatorInstance().computeAuthorizationHeader( - consumerKey, - requestToken, - request.getUri(), - request.getMethod(), - request.getFormParams(), - request.getQueryParams(), - timestamp, - nonce); - requestBuilder.setHeader(HttpHeaderNames.AUTHORIZATION, authorization); - } catch (InvalidKeyException | NoSuchAlgorithmException e) { - throw new IllegalArgumentException(e); - } - } -} From 745a7bc7815356366dcf7df6f478dfaf4f21a75a Mon Sep 17 00:00:00 2001 From: Aayush Atharva Date: Sun, 3 Sep 2023 16:15:11 +0530 Subject: [PATCH 022/167] Run WebServer once per class instead of method (#1903) --- .../test/java/org/asynchttpclient/AbstractBasicTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/src/test/java/org/asynchttpclient/AbstractBasicTest.java b/client/src/test/java/org/asynchttpclient/AbstractBasicTest.java index 60de7f58a..f556d7486 100644 --- a/client/src/test/java/org/asynchttpclient/AbstractBasicTest.java +++ b/client/src/test/java/org/asynchttpclient/AbstractBasicTest.java @@ -19,7 +19,9 @@ import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.ServerConnector; import org.eclipse.jetty.server.handler.AbstractHandler; +import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.TestInstance; import org.slf4j.Logger; @@ -36,7 +38,7 @@ public abstract class AbstractBasicTest { protected int port1 = -1; protected int port2 = -1; - @BeforeEach + @BeforeAll public void setUpGlobal() throws Exception { server = new Server(); ServerConnector connector1 = addHttpConnector(server); @@ -50,7 +52,7 @@ public void setUpGlobal() throws Exception { logger.info("Local HTTP server started successfully"); } - @AfterEach + @AfterAll public void tearDownGlobal() throws Exception { logger.debug("Shutting down local server: {}", server); From df54ba9431e2832b2d1b9131014162596d7a9376 Mon Sep 17 00:00:00 2001 From: Aayush Atharva Date: Mon, 4 Sep 2023 08:49:12 +0530 Subject: [PATCH 023/167] Fix Thread#sleep in ClientStatsTest (#1904) --- .../org/asynchttpclient/ClientStatsTest.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/client/src/test/java/org/asynchttpclient/ClientStatsTest.java b/client/src/test/java/org/asynchttpclient/ClientStatsTest.java index 4d598d431..bda1aa3a2 100644 --- a/client/src/test/java/org/asynchttpclient/ClientStatsTest.java +++ b/client/src/test/java/org/asynchttpclient/ClientStatsTest.java @@ -15,7 +15,7 @@ */ package org.asynchttpclient; -import io.github.artsok.RepeatedIfExceptionsTest; +import org.junit.jupiter.api.Test; import java.time.Duration; import java.util.List; @@ -34,7 +34,7 @@ public class ClientStatsTest extends AbstractBasicTest { private static final String hostname = "localhost"; - @RepeatedIfExceptionsTest(repeats = 5) + @Test public void testClientStatus() throws Throwable { try (final AsyncHttpClient client = asyncHttpClient(config().setKeepAlive(true).setPooledConnectionIdleTimeout(Duration.ofSeconds(5)))) { final String url = getTargetUrl(); @@ -51,7 +51,7 @@ public void testClientStatus() throws Throwable { .limit(5) .collect(Collectors.toList()); - Thread.sleep(2000 + 1000); + Thread.sleep(2000); final ClientStats activeStats = client.getClientStats(); @@ -63,7 +63,7 @@ public void testClientStatus() throws Throwable { futures.forEach(future -> future.toCompletableFuture().join()); - Thread.sleep(1000 + 1000); + Thread.sleep(1000); final ClientStats idleStats = client.getClientStats(); @@ -79,7 +79,7 @@ public void testClientStatus() throws Throwable { .limit(3) .collect(Collectors.toList()); - Thread.sleep(2000 + 1000); + Thread.sleep(2000); final ClientStats activeCachedStats = client.getClientStats(); @@ -91,7 +91,7 @@ public void testClientStatus() throws Throwable { repeatedFutures.forEach(future -> future.toCompletableFuture().join()); - Thread.sleep(1000 + 1000); + Thread.sleep(1000); final ClientStats idleCachedStats = client.getClientStats(); @@ -101,7 +101,7 @@ public void testClientStatus() throws Throwable { assertEquals(3, idleCachedStats.getTotalConnectionCount()); assertEquals(3, idleCachedStats.getStatsPerHost().get(hostname).getHostConnectionCount()); - Thread.sleep(5000 + 1000); + Thread.sleep(5000); final ClientStats timeoutStats = client.getClientStats(); @@ -113,7 +113,7 @@ public void testClientStatus() throws Throwable { } } - @RepeatedIfExceptionsTest(repeats = 5) + @Test public void testClientStatusNoKeepalive() throws Throwable { try (final AsyncHttpClient client = asyncHttpClient(config().setKeepAlive(false).setPooledConnectionIdleTimeout(Duration.ofSeconds(1)))) { final String url = getTargetUrl(); @@ -130,7 +130,7 @@ public void testClientStatusNoKeepalive() throws Throwable { .limit(5) .collect(Collectors.toList()); - Thread.sleep(2000 + 1000); + Thread.sleep(2000); final ClientStats activeStats = client.getClientStats(); @@ -142,7 +142,7 @@ public void testClientStatusNoKeepalive() throws Throwable { futures.forEach(future -> future.toCompletableFuture().join()); - Thread.sleep(1000 + 1000); + Thread.sleep(1000); final ClientStats idleStats = client.getClientStats(); @@ -158,7 +158,7 @@ public void testClientStatusNoKeepalive() throws Throwable { .limit(3) .collect(Collectors.toList()); - Thread.sleep(2000 + 1000); + Thread.sleep(2000); final ClientStats activeCachedStats = client.getClientStats(); @@ -170,7 +170,7 @@ public void testClientStatusNoKeepalive() throws Throwable { repeatedFutures.forEach(future -> future.toCompletableFuture().join()); - Thread.sleep(1000 + 1000); + Thread.sleep(1000); final ClientStats idleCachedStats = client.getClientStats(); From 37cadf319ecf3f8c4e3720fdc9059c348da97ab4 Mon Sep 17 00:00:00 2001 From: Aayush Atharva Date: Thu, 7 Sep 2023 01:55:38 +0530 Subject: [PATCH 024/167] JavaDoc Improvement (#1905) --- .../AsyncCompletionHandlerBase.java | 1 + .../DefaultAsyncHttpClient.java | 4 +-- .../main/java/org/asynchttpclient/Realm.java | 4 +-- .../channel/NoopChannelPool.java | 31 +++++++++++++++++++ .../config/AsyncHttpClientConfigHelper.java | 27 +++++++++++----- .../cookie/ThreadSafeCookieStore.java | 20 +++++++----- .../exception/ChannelClosedException.java | 4 +++ .../exception/PoolAlreadyClosedException.java | 4 +++ .../exception/RemotelyClosedException.java | 4 +++ .../TooManyConnectionsException.java | 3 ++ .../TooManyConnectionsPerHostException.java | 3 ++ .../netty/channel/ChannelState.java | 20 +++++++++++- .../netty/channel/DefaultChannelPool.java | 4 +-- .../intercept/ResponseFiltersInterceptor.java | 2 +- .../netty/request/NettyRequestSender.java | 4 +-- .../netty/request/body/BodyChunkedInput.java | 4 +-- .../netty/request/body/BodyFileRegion.java | 4 +-- .../asynchttpclient/proxy/ProxyServer.java | 4 +-- .../body/generator/FileBodyGenerator.java | 4 +-- .../request/body/multipart/ByteArrayPart.java | 4 +-- .../body/multipart/InputStreamPart.java | 4 +-- .../request/body/multipart/MultipartBody.java | 4 +-- .../body/multipart/MultipartUtils.java | 4 +-- .../request/body/multipart/StringPart.java | 4 +-- .../org/asynchttpclient/uri/UriParser.java | 4 +-- .../org/asynchttpclient/util/Assertions.java | 13 ++------ 26 files changed, 132 insertions(+), 56 deletions(-) diff --git a/client/src/main/java/org/asynchttpclient/AsyncCompletionHandlerBase.java b/client/src/main/java/org/asynchttpclient/AsyncCompletionHandlerBase.java index 8ad58eff6..25fc9da18 100644 --- a/client/src/main/java/org/asynchttpclient/AsyncCompletionHandlerBase.java +++ b/client/src/main/java/org/asynchttpclient/AsyncCompletionHandlerBase.java @@ -23,6 +23,7 @@ * Simple {@link AsyncHandler} of type {@link Response} */ public class AsyncCompletionHandlerBase extends AsyncCompletionHandler { + @Override public @Nullable Response onCompleted(@Nullable Response response) throws Exception { return response; diff --git a/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClient.java b/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClient.java index 22eb92068..fb5dad6ff 100644 --- a/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClient.java +++ b/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClient.java @@ -40,7 +40,7 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.function.Predicate; -import static org.asynchttpclient.util.Assertions.assertNotNull; +import static java.util.Objects.requireNonNull; import static org.asynchttpclient.util.HttpConstants.Methods.CONNECT; import static org.asynchttpclient.util.HttpConstants.Methods.DELETE; import static org.asynchttpclient.util.HttpConstants.Methods.GET; @@ -294,7 +294,7 @@ private ListenableFuture execute(Request request, final AsyncHandler a private FilterContext preProcessRequest(FilterContext fc) throws FilterException { for (RequestFilter asyncFilter : config.getRequestFilters()) { fc = asyncFilter.filter(fc); - assertNotNull(fc, "filterContext"); + requireNonNull(fc, "filterContext"); } Request request = fc.getRequest(); diff --git a/client/src/main/java/org/asynchttpclient/Realm.java b/client/src/main/java/org/asynchttpclient/Realm.java index 2006bd8b8..c6b70a7de 100644 --- a/client/src/main/java/org/asynchttpclient/Realm.java +++ b/client/src/main/java/org/asynchttpclient/Realm.java @@ -29,7 +29,7 @@ import static java.nio.charset.StandardCharsets.ISO_8859_1; import static java.nio.charset.StandardCharsets.UTF_8; -import static org.asynchttpclient.util.Assertions.assertNotNull; +import static java.util.Objects.requireNonNull; import static org.asynchttpclient.util.HttpConstants.Methods.GET; import static org.asynchttpclient.util.MessageDigestUtils.pooledMd5MessageDigest; import static org.asynchttpclient.util.MiscUtils.isNonEmpty; @@ -92,7 +92,7 @@ private Realm(@Nullable AuthScheme scheme, @Nullable Map customLoginConfig, @Nullable String loginContextName) { - this.scheme = assertNotNull(scheme, "scheme"); + this.scheme = requireNonNull(scheme, "scheme"); this.principal = principal; this.password = password; this.realmName = realmName; diff --git a/client/src/main/java/org/asynchttpclient/channel/NoopChannelPool.java b/client/src/main/java/org/asynchttpclient/channel/NoopChannelPool.java index 8ea39e6bd..3a5b2e93d 100644 --- a/client/src/main/java/org/asynchttpclient/channel/NoopChannelPool.java +++ b/client/src/main/java/org/asynchttpclient/channel/NoopChannelPool.java @@ -22,38 +22,69 @@ import java.util.Map; import java.util.function.Predicate; +/** + * A {@link ChannelPool} implementation that doesn't pool anything. + */ public enum NoopChannelPool implements ChannelPool { INSTANCE; + /** + * + * @return always false since this is a {@link NoopChannelPool} + */ @Override public boolean offer(Channel channel, Object partitionKey) { return false; } + /** + * + * @return always null since this is a {@link NoopChannelPool} + */ @Override public @Nullable Channel poll(Object partitionKey) { return null; } + /** + * + * @return always false since this is a {@link NoopChannelPool} + */ @Override public boolean removeAll(Channel channel) { return false; } + /** + * + * @return always true since this is a {@link NoopChannelPool} + */ @Override public boolean isOpen() { return true; } + /** + * + * Does nothing since this is a {@link NoopChannelPool} + */ @Override public void destroy() { } + /** + * + * Does nothing since this is a {@link NoopChannelPool} + */ @Override public void flushPartitions(Predicate predicate) { } + /** + * + * @return always {@link Collections#emptyMap()} since this is a {@link NoopChannelPool} + */ @Override public Map getIdleChannelCountPerHost() { return Collections.emptyMap(); diff --git a/client/src/main/java/org/asynchttpclient/config/AsyncHttpClientConfigHelper.java b/client/src/main/java/org/asynchttpclient/config/AsyncHttpClientConfigHelper.java index 3922a6d60..7bb87afb3 100644 --- a/client/src/main/java/org/asynchttpclient/config/AsyncHttpClientConfigHelper.java +++ b/client/src/main/java/org/asynchttpclient/config/AsyncHttpClientConfigHelper.java @@ -64,18 +64,29 @@ public void reload() { propsCache.clear(); } + /** + * Parse a property file. + * + * @param file the file to parse + * @param required if true, the file must be present + * @return the parsed properties + * @throws RuntimeException if the file is required and not present or if the file can't be parsed + */ private Properties parsePropertiesFile(String file, boolean required) { Properties props = new Properties(); - InputStream is = getClass().getResourceAsStream(file); - if (is != null) { - try { - props.load(is); - } catch (IOException e) { - throw new IllegalArgumentException("Can't parse config file " + file, e); + try (InputStream is = getClass().getResourceAsStream(file)) { + if (is != null) { + try { + props.load(is); + } catch (IOException e) { + throw new IllegalArgumentException("Can't parse config file " + file, e); + } + } else if (required) { + throw new IllegalArgumentException("Can't locate config file " + file); } - } else if (required) { - throw new IllegalArgumentException("Can't locate config file " + file); + } catch (IOException e) { + throw new RuntimeException(e); } return props; diff --git a/client/src/main/java/org/asynchttpclient/cookie/ThreadSafeCookieStore.java b/client/src/main/java/org/asynchttpclient/cookie/ThreadSafeCookieStore.java index 44cb4e260..35a620e31 100644 --- a/client/src/main/java/org/asynchttpclient/cookie/ThreadSafeCookieStore.java +++ b/client/src/main/java/org/asynchttpclient/cookie/ThreadSafeCookieStore.java @@ -17,7 +17,6 @@ import io.netty.handler.codec.http.cookie.Cookie; import org.asynchttpclient.uri.Uri; -import org.asynchttpclient.util.Assertions; import org.asynchttpclient.util.MiscUtils; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -34,6 +33,8 @@ import java.util.function.Predicate; import java.util.stream.Collectors; +import static java.util.Objects.requireNonNull; + public final class ThreadSafeCookieStore implements CookieStore { private final Map> cookieJar = new ConcurrentHashMap<>(); @@ -88,7 +89,6 @@ public void evictExpired() { removeExpired(); } - @Override public int incrementAndGet() { return counter.incrementAndGet(); @@ -226,8 +226,11 @@ private List getStoredCookies(String domain, String path, boolean secure private void removeExpired() { final boolean[] removed = {false}; - cookieJar.values().forEach(cookieMap -> removed[0] |= cookieMap.entrySet().removeIf( - v -> hasCookieExpired(v.getValue().cookie, v.getValue().createdAt))); + + cookieJar.values() + .forEach(cookieMap -> removed[0] |= cookieMap.entrySet() + .removeIf(v -> hasCookieExpired(v.getValue().cookie, v.getValue().createdAt))); + if (removed[0]) { cookieJar.entrySet().removeIf(entry -> entry.getValue() == null || entry.getValue().isEmpty()); } @@ -243,11 +246,12 @@ private static class CookieKey implements Comparable { } @Override - public int compareTo(@NotNull CookieKey o) { - Assertions.assertNotNull(o, "Parameter can't be null"); + public int compareTo(@NotNull CookieKey cookieKey) { + requireNonNull(cookieKey, "Parameter can't be null"); + int result; - if ((result = name.compareTo(o.name)) == 0) { - result = path.compareTo(o.path); + if ((result = name.compareTo(cookieKey.name)) == 0) { + result = path.compareTo(cookieKey.path); } return result; } diff --git a/client/src/main/java/org/asynchttpclient/exception/ChannelClosedException.java b/client/src/main/java/org/asynchttpclient/exception/ChannelClosedException.java index 3d1101291..4b63997aa 100644 --- a/client/src/main/java/org/asynchttpclient/exception/ChannelClosedException.java +++ b/client/src/main/java/org/asynchttpclient/exception/ChannelClosedException.java @@ -19,7 +19,11 @@ import static org.asynchttpclient.util.ThrowableUtil.unknownStackTrace; +/** + * This exception is thrown when a channel is closed. + */ public final class ChannelClosedException extends IOException { + private static final long serialVersionUID = -2528693697240456658L; public static final ChannelClosedException INSTANCE = unknownStackTrace(new ChannelClosedException(), ChannelClosedException.class, "INSTANCE"); diff --git a/client/src/main/java/org/asynchttpclient/exception/PoolAlreadyClosedException.java b/client/src/main/java/org/asynchttpclient/exception/PoolAlreadyClosedException.java index d832bc40a..d66c3b76a 100644 --- a/client/src/main/java/org/asynchttpclient/exception/PoolAlreadyClosedException.java +++ b/client/src/main/java/org/asynchttpclient/exception/PoolAlreadyClosedException.java @@ -19,7 +19,11 @@ import static org.asynchttpclient.util.ThrowableUtil.unknownStackTrace; +/** + * This exception is thrown when a channel pool is already closed. + */ public class PoolAlreadyClosedException extends IOException { + private static final long serialVersionUID = -3883404852005245296L; public static final PoolAlreadyClosedException INSTANCE = unknownStackTrace(new PoolAlreadyClosedException(), PoolAlreadyClosedException.class, "INSTANCE"); diff --git a/client/src/main/java/org/asynchttpclient/exception/RemotelyClosedException.java b/client/src/main/java/org/asynchttpclient/exception/RemotelyClosedException.java index 8b8165589..2b1977a6f 100644 --- a/client/src/main/java/org/asynchttpclient/exception/RemotelyClosedException.java +++ b/client/src/main/java/org/asynchttpclient/exception/RemotelyClosedException.java @@ -19,7 +19,11 @@ import static org.asynchttpclient.util.ThrowableUtil.unknownStackTrace; +/** + * This exception is thrown when a channel is closed by remote host. + */ public final class RemotelyClosedException extends IOException { + private static final long serialVersionUID = 5634105738124356785L; public static final RemotelyClosedException INSTANCE = unknownStackTrace(new RemotelyClosedException(), RemotelyClosedException.class, "INSTANCE"); diff --git a/client/src/main/java/org/asynchttpclient/exception/TooManyConnectionsException.java b/client/src/main/java/org/asynchttpclient/exception/TooManyConnectionsException.java index 2a0add003..6797c68c7 100644 --- a/client/src/main/java/org/asynchttpclient/exception/TooManyConnectionsException.java +++ b/client/src/main/java/org/asynchttpclient/exception/TooManyConnectionsException.java @@ -17,6 +17,9 @@ import java.io.IOException; +/** + * This exception is thrown when too many connections are opened. + */ public class TooManyConnectionsException extends IOException { private static final long serialVersionUID = 8645586459539317237L; diff --git a/client/src/main/java/org/asynchttpclient/exception/TooManyConnectionsPerHostException.java b/client/src/main/java/org/asynchttpclient/exception/TooManyConnectionsPerHostException.java index 47f5be7e2..e7959bb37 100644 --- a/client/src/main/java/org/asynchttpclient/exception/TooManyConnectionsPerHostException.java +++ b/client/src/main/java/org/asynchttpclient/exception/TooManyConnectionsPerHostException.java @@ -17,6 +17,9 @@ import java.io.IOException; +/** + * This exception is thrown when too many connections are opened to a remote host. + */ public class TooManyConnectionsPerHostException extends IOException { private static final long serialVersionUID = 5702859695179937503L; diff --git a/client/src/main/java/org/asynchttpclient/netty/channel/ChannelState.java b/client/src/main/java/org/asynchttpclient/netty/channel/ChannelState.java index 6dd824466..1b550983e 100644 --- a/client/src/main/java/org/asynchttpclient/netty/channel/ChannelState.java +++ b/client/src/main/java/org/asynchttpclient/netty/channel/ChannelState.java @@ -16,5 +16,23 @@ package org.asynchttpclient.netty.channel; public enum ChannelState { - NEW, POOLED, RECONNECTED, CLOSED, + /** + * The channel is new + */ + NEW, + + /** + * The channel is open and pooled + */ + POOLED, + + /** + * The channel is reconnected + */ + RECONNECTED, + + /** + * The channel is closed + */ + CLOSED, } diff --git a/client/src/main/java/org/asynchttpclient/netty/channel/DefaultChannelPool.java b/client/src/main/java/org/asynchttpclient/netty/channel/DefaultChannelPool.java index 2c1916faf..0ae2f68f7 100755 --- a/client/src/main/java/org/asynchttpclient/netty/channel/DefaultChannelPool.java +++ b/client/src/main/java/org/asynchttpclient/netty/channel/DefaultChannelPool.java @@ -42,7 +42,7 @@ import java.util.function.Predicate; import java.util.stream.Collectors; -import static org.asynchttpclient.util.Assertions.assertNotNull; +import static java.util.Objects.requireNonNull; import static org.asynchttpclient.util.DateUtils.unpreciseMillisTime; /** @@ -260,7 +260,7 @@ private static final class IdleChannel { private volatile int owned; IdleChannel(Channel channel, long start) { - this.channel = assertNotNull(channel, "channel"); + this.channel = requireNonNull(channel, "channel"); this.start = start; } diff --git a/client/src/main/java/org/asynchttpclient/netty/handler/intercept/ResponseFiltersInterceptor.java b/client/src/main/java/org/asynchttpclient/netty/handler/intercept/ResponseFiltersInterceptor.java index d3f33d49f..19b41f502 100644 --- a/client/src/main/java/org/asynchttpclient/netty/handler/intercept/ResponseFiltersInterceptor.java +++ b/client/src/main/java/org/asynchttpclient/netty/handler/intercept/ResponseFiltersInterceptor.java @@ -50,7 +50,7 @@ public boolean exitAfterProcessingFilters(Channel channel, try { fc = asyncFilter.filter(fc); // FIXME Is it worth protecting against this? -// assertNotNull(fc, "filterContext"); +// requireNonNull(fc, "filterContext"); } catch (FilterException fe) { requestSender.abort(channel, future, fe); } diff --git a/client/src/main/java/org/asynchttpclient/netty/request/NettyRequestSender.java b/client/src/main/java/org/asynchttpclient/netty/request/NettyRequestSender.java index bb3628123..2c0314325 100755 --- a/client/src/main/java/org/asynchttpclient/netty/request/NettyRequestSender.java +++ b/client/src/main/java/org/asynchttpclient/netty/request/NettyRequestSender.java @@ -67,7 +67,7 @@ import static io.netty.handler.codec.http.HttpHeaderNames.EXPECT; import static java.util.Collections.singletonList; -import static org.asynchttpclient.util.Assertions.assertNotNull; +import static java.util.Objects.requireNonNull; import static org.asynchttpclient.util.AuthenticatorUtils.perConnectionAuthorizationHeader; import static org.asynchttpclient.util.AuthenticatorUtils.perConnectionProxyAuthorizationHeader; import static org.asynchttpclient.util.HttpConstants.Methods.CONNECT; @@ -506,7 +506,7 @@ public boolean applyIoExceptionFiltersAndReplayRequest(NettyResponseFuture fu for (IOExceptionFilter asyncFilter : config.getIoExceptionFilters()) { try { fc = asyncFilter.filter(fc); - assertNotNull(fc, "filterContext"); + requireNonNull(fc, "filterContext"); } catch (FilterException efe) { abort(channel, future, efe); } diff --git a/client/src/main/java/org/asynchttpclient/netty/request/body/BodyChunkedInput.java b/client/src/main/java/org/asynchttpclient/netty/request/body/BodyChunkedInput.java index e6dbd8c7e..cd0434146 100755 --- a/client/src/main/java/org/asynchttpclient/netty/request/body/BodyChunkedInput.java +++ b/client/src/main/java/org/asynchttpclient/netty/request/body/BodyChunkedInput.java @@ -21,7 +21,7 @@ import io.netty.handler.stream.ChunkedInput; import org.asynchttpclient.request.body.Body; -import static org.asynchttpclient.util.Assertions.assertNotNull; +import static java.util.Objects.requireNonNull; /** * Adapts a {@link Body} to Netty's {@link ChunkedInput}. @@ -37,7 +37,7 @@ public class BodyChunkedInput implements ChunkedInput { private long progress; BodyChunkedInput(Body body) { - this.body = assertNotNull(body, "body"); + this.body = requireNonNull(body, "body"); contentLength = body.getContentLength(); if (contentLength <= 0) { chunkSize = DEFAULT_CHUNK_SIZE; diff --git a/client/src/main/java/org/asynchttpclient/netty/request/body/BodyFileRegion.java b/client/src/main/java/org/asynchttpclient/netty/request/body/BodyFileRegion.java index 5542f4dd5..9326d717d 100755 --- a/client/src/main/java/org/asynchttpclient/netty/request/body/BodyFileRegion.java +++ b/client/src/main/java/org/asynchttpclient/netty/request/body/BodyFileRegion.java @@ -22,7 +22,7 @@ import java.io.IOException; import java.nio.channels.WritableByteChannel; -import static org.asynchttpclient.util.Assertions.assertNotNull; +import static java.util.Objects.requireNonNull; import static org.asynchttpclient.util.MiscUtils.closeSilently; /** @@ -34,7 +34,7 @@ class BodyFileRegion extends AbstractReferenceCounted implements FileRegion { private long transferred; BodyFileRegion(RandomAccessBody body) { - this.body = assertNotNull(body, "body"); + this.body = requireNonNull(body, "body"); } @Override diff --git a/client/src/main/java/org/asynchttpclient/proxy/ProxyServer.java b/client/src/main/java/org/asynchttpclient/proxy/ProxyServer.java index c7d1d6106..9cb33362c 100644 --- a/client/src/main/java/org/asynchttpclient/proxy/ProxyServer.java +++ b/client/src/main/java/org/asynchttpclient/proxy/ProxyServer.java @@ -26,7 +26,7 @@ import java.util.List; import java.util.function.Function; -import static org.asynchttpclient.util.Assertions.assertNotNull; +import static java.util.Objects.requireNonNull; import static org.asynchttpclient.util.MiscUtils.isNonEmpty; /** @@ -100,7 +100,7 @@ public ProxyType getProxyType() { * Properties */ public boolean isIgnoredForHost(String hostname) { - assertNotNull(hostname, "hostname"); + requireNonNull(hostname, "hostname"); if (isNonEmpty(nonProxyHosts)) { for (String nonProxyHost : nonProxyHosts) { if (matchNonProxyHost(hostname, nonProxyHost)) { diff --git a/client/src/main/java/org/asynchttpclient/request/body/generator/FileBodyGenerator.java b/client/src/main/java/org/asynchttpclient/request/body/generator/FileBodyGenerator.java index ae8869486..82bc02111 100644 --- a/client/src/main/java/org/asynchttpclient/request/body/generator/FileBodyGenerator.java +++ b/client/src/main/java/org/asynchttpclient/request/body/generator/FileBodyGenerator.java @@ -16,7 +16,7 @@ import java.io.File; -import static org.asynchttpclient.util.Assertions.assertNotNull; +import static java.util.Objects.requireNonNull; /** * Creates a request body from the contents of a file. @@ -32,7 +32,7 @@ public FileBodyGenerator(File file) { } public FileBodyGenerator(File file, long regionSeek, long regionLength) { - this.file = assertNotNull(file, "file"); + this.file = requireNonNull(file, "file"); this.regionLength = regionLength; this.regionSeek = regionSeek; } diff --git a/client/src/main/java/org/asynchttpclient/request/body/multipart/ByteArrayPart.java b/client/src/main/java/org/asynchttpclient/request/body/multipart/ByteArrayPart.java index 6ef4b8d79..97ed6cc61 100644 --- a/client/src/main/java/org/asynchttpclient/request/body/multipart/ByteArrayPart.java +++ b/client/src/main/java/org/asynchttpclient/request/body/multipart/ByteArrayPart.java @@ -17,7 +17,7 @@ import java.nio.charset.Charset; -import static org.asynchttpclient.util.Assertions.assertNotNull; +import static java.util.Objects.requireNonNull; public class ByteArrayPart extends FileLikePart { @@ -45,7 +45,7 @@ public ByteArrayPart(String name, byte[] bytes, String contentType, Charset char public ByteArrayPart(String name, byte[] bytes, String contentType, Charset charset, String fileName, String contentId, String transferEncoding) { super(name, contentType, charset, fileName, contentId, transferEncoding); - this.bytes = assertNotNull(bytes, "bytes"); + this.bytes = requireNonNull(bytes, "bytes"); } public byte[] getBytes() { diff --git a/client/src/main/java/org/asynchttpclient/request/body/multipart/InputStreamPart.java b/client/src/main/java/org/asynchttpclient/request/body/multipart/InputStreamPart.java index 048105973..aa14c979a 100644 --- a/client/src/main/java/org/asynchttpclient/request/body/multipart/InputStreamPart.java +++ b/client/src/main/java/org/asynchttpclient/request/body/multipart/InputStreamPart.java @@ -18,7 +18,7 @@ import java.io.InputStream; import java.nio.charset.Charset; -import static org.asynchttpclient.util.Assertions.assertNotNull; +import static java.util.Objects.requireNonNull; public class InputStreamPart extends FileLikePart { @@ -48,7 +48,7 @@ public InputStreamPart(String name, InputStream inputStream, String fileName, lo public InputStreamPart(String name, InputStream inputStream, String fileName, long contentLength, String contentType, Charset charset, String contentId, String transferEncoding) { super(name, contentType, charset, fileName, contentId, transferEncoding); - this.inputStream = assertNotNull(inputStream, "inputStream"); + this.inputStream = requireNonNull(inputStream, "inputStream"); this.contentLength = contentLength; } diff --git a/client/src/main/java/org/asynchttpclient/request/body/multipart/MultipartBody.java b/client/src/main/java/org/asynchttpclient/request/body/multipart/MultipartBody.java index 4100fc128..a1fbb6087 100644 --- a/client/src/main/java/org/asynchttpclient/request/body/multipart/MultipartBody.java +++ b/client/src/main/java/org/asynchttpclient/request/body/multipart/MultipartBody.java @@ -28,7 +28,7 @@ import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; -import static org.asynchttpclient.util.Assertions.assertNotNull; +import static java.util.Objects.requireNonNull; import static org.asynchttpclient.util.MiscUtils.closeSilently; public class MultipartBody implements RandomAccessBody { @@ -46,7 +46,7 @@ public class MultipartBody implements RandomAccessBody { public MultipartBody(List> parts, String contentType, byte[] boundary) { this.boundary = boundary; this.contentType = contentType; - this.parts = assertNotNull(parts, "parts"); + this.parts = requireNonNull(parts, "parts"); contentLength = computeContentLength(); } diff --git a/client/src/main/java/org/asynchttpclient/request/body/multipart/MultipartUtils.java b/client/src/main/java/org/asynchttpclient/request/body/multipart/MultipartUtils.java index 8f55fa2ae..eb7314f4b 100644 --- a/client/src/main/java/org/asynchttpclient/request/body/multipart/MultipartUtils.java +++ b/client/src/main/java/org/asynchttpclient/request/body/multipart/MultipartUtils.java @@ -29,7 +29,7 @@ import static io.netty.handler.codec.http.HttpHeaderNames.CONTENT_TYPE; import static java.nio.charset.StandardCharsets.US_ASCII; -import static org.asynchttpclient.util.Assertions.assertNotNull; +import static java.util.Objects.requireNonNull; import static org.asynchttpclient.util.HttpUtils.computeMultipartBoundary; import static org.asynchttpclient.util.HttpUtils.patchContentTypeWithBoundaryAttribute; import static org.asynchttpclient.util.MiscUtils.isNonEmpty; @@ -48,7 +48,7 @@ private MultipartUtils() { * @return a MultipartBody */ public static MultipartBody newMultipartBody(List parts, HttpHeaders requestHeaders) { - assertNotNull(parts, "parts"); + requireNonNull(parts, "parts"); byte[] boundary; String contentType; diff --git a/client/src/main/java/org/asynchttpclient/request/body/multipart/StringPart.java b/client/src/main/java/org/asynchttpclient/request/body/multipart/StringPart.java index 4f853bfb9..2427913ea 100644 --- a/client/src/main/java/org/asynchttpclient/request/body/multipart/StringPart.java +++ b/client/src/main/java/org/asynchttpclient/request/body/multipart/StringPart.java @@ -18,7 +18,7 @@ import java.nio.charset.Charset; import static java.nio.charset.StandardCharsets.UTF_8; -import static org.asynchttpclient.util.Assertions.assertNotNull; +import static java.util.Objects.requireNonNull; import static org.asynchttpclient.util.MiscUtils.withDefault; public class StringPart extends PartBase { @@ -51,7 +51,7 @@ public StringPart(String name, String value, String contentType, Charset charset public StringPart(String name, String value, String contentType, Charset charset, String contentId, String transferEncoding) { super(name, contentType, charsetOrDefault(charset), contentId, transferEncoding); - assertNotNull(value, "value"); + requireNonNull(value, "value"); // See RFC 2048, 2.8. "8bit Data" if (value.indexOf(0) != -1) { diff --git a/client/src/main/java/org/asynchttpclient/uri/UriParser.java b/client/src/main/java/org/asynchttpclient/uri/UriParser.java index ae347277e..40c195630 100644 --- a/client/src/main/java/org/asynchttpclient/uri/UriParser.java +++ b/client/src/main/java/org/asynchttpclient/uri/UriParser.java @@ -17,7 +17,7 @@ import org.jetbrains.annotations.Nullable; -import static org.asynchttpclient.util.Assertions.assertNotNull; +import static java.util.Objects.requireNonNull; import static org.asynchttpclient.util.MiscUtils.isNonEmpty; final class UriParser { @@ -369,7 +369,7 @@ private void parse(@Nullable Uri context) { } public static UriParser parse(@Nullable Uri context, final String originalUrl) { - assertNotNull(originalUrl, "originalUrl"); + requireNonNull(originalUrl, "originalUrl"); final UriParser parser = new UriParser(originalUrl); parser.parse(context); return parser; diff --git a/client/src/main/java/org/asynchttpclient/util/Assertions.java b/client/src/main/java/org/asynchttpclient/util/Assertions.java index 5a5f29c06..0b2e38a7c 100644 --- a/client/src/main/java/org/asynchttpclient/util/Assertions.java +++ b/client/src/main/java/org/asynchttpclient/util/Assertions.java @@ -18,23 +18,16 @@ import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.Nullable; +import static java.util.Objects.requireNonNull; + public final class Assertions { private Assertions() { } - @Contract(value = "null, _ -> fail", pure = true) - public static T assertNotNull(@Nullable T value, String name) { - if (value == null) { - throw new NullPointerException(name); - } - return value; - - } - @Contract(value = "null, _ -> fail", pure = true) public static String assertNotEmpty(@Nullable String value, String name) { - assertNotNull(value, name); + requireNonNull(value, name); if (value.length() == 0) { throw new IllegalArgumentException("empty " + name); } From f48c40464ec42d420afae452e6565bf04d1c0e54 Mon Sep 17 00:00:00 2001 From: Aayush Atharva Date: Thu, 7 Sep 2023 02:04:14 +0530 Subject: [PATCH 025/167] Remove Deprecated Methods (#1906) --- client/src/main/java/org/asynchttpclient/Request.java | 1 - .../main/java/org/asynchttpclient/RequestBuilder.java | 11 +---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/client/src/main/java/org/asynchttpclient/Request.java b/client/src/main/java/org/asynchttpclient/Request.java index ecb40678c..64977cf71 100644 --- a/client/src/main/java/org/asynchttpclient/Request.java +++ b/client/src/main/java/org/asynchttpclient/Request.java @@ -186,7 +186,6 @@ public interface Request { /** * @return a new request builder using this request as a prototype */ - @SuppressWarnings("deprecation") default RequestBuilder toBuilder() { return new RequestBuilder(this); } diff --git a/client/src/main/java/org/asynchttpclient/RequestBuilder.java b/client/src/main/java/org/asynchttpclient/RequestBuilder.java index fed545a6f..9b4491ffc 100644 --- a/client/src/main/java/org/asynchttpclient/RequestBuilder.java +++ b/client/src/main/java/org/asynchttpclient/RequestBuilder.java @@ -39,16 +39,7 @@ public RequestBuilder(String method, boolean disableUrlEncoding, boolean validat super(method, disableUrlEncoding, validateHeaders); } - /** - * @deprecated Use request.toBuilder() instead - */ - @Deprecated - public RequestBuilder(Request prototype) { + RequestBuilder(Request prototype) { super(prototype); } - - @Deprecated - public RequestBuilder(Request prototype, boolean disableUrlEncoding, boolean validateHeaders) { - super(prototype, disableUrlEncoding, validateHeaders); - } } From 67325d3609052f6615ce271188773a08750beaba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 16 Sep 2023 10:50:03 +0530 Subject: [PATCH 026/167] Bump org.eclipse.jetty:jetty-servlets from 11.0.15 to 11.0.16 in /client (#1909) Bumps [org.eclipse.jetty:jetty-servlets](https://github.com/eclipse/jetty.project) from 11.0.15 to 11.0.16. - [Release notes](https://github.com/eclipse/jetty.project/releases) - [Commits](https://github.com/eclipse/jetty.project/compare/jetty-11.0.15...jetty-11.0.16) --- updated-dependencies: - dependency-name: org.eclipse.jetty:jetty-servlets dependency-type: direct:development ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- client/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/pom.xml b/client/pom.xml index eaab71582..051fd8312 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -30,7 +30,7 @@ org.asynchttpclient.client - 11.0.15 + 11.0.16 10.1.8 2.11.0 4.11.0 From 2d1b227be35321f11f9b2a081625f6fff15bebc7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 14:47:05 +0530 Subject: [PATCH 027/167] Bump org.apache.tomcat.embed:tomcat-embed-core in /client (#1910) Bumps org.apache.tomcat.embed:tomcat-embed-core from 10.1.8 to 10.1.13. --- updated-dependencies: - dependency-name: org.apache.tomcat.embed:tomcat-embed-core dependency-type: direct:development ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- client/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/pom.xml b/client/pom.xml index 051fd8312..3e7e65444 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -31,7 +31,7 @@ org.asynchttpclient.client 11.0.16 - 10.1.8 + 10.1.13 2.11.0 4.11.0 2.2 From d73630e7431fdc1434a40e6ce7f33388f25bb2f3 Mon Sep 17 00:00:00 2001 From: Aayush Atharva Date: Wed, 25 Oct 2023 10:32:34 +0530 Subject: [PATCH 028/167] Dependencies Upgrade (#1911) * Bump org.eclipse.jetty:jetty-servlets from 11.0.15 to 11.0.16 in /client (#1909) Bumps [org.eclipse.jetty:jetty-servlets](https://github.com/eclipse/jetty.project) from 11.0.15 to 11.0.16. - [Release notes](https://github.com/eclipse/jetty.project/releases) - [Commits](https://github.com/eclipse/jetty.project/compare/jetty-11.0.15...jetty-11.0.16) --- updated-dependencies: - dependency-name: org.eclipse.jetty:jetty-servlets dependency-type: direct:development ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> (cherry picked from commit 67325d3609052f6615ce271188773a08750beaba) * Bump org.apache.tomcat.embed:tomcat-embed-core in /client (#1910) Bumps org.apache.tomcat.embed:tomcat-embed-core from 10.1.8 to 10.1.13. --- updated-dependencies: - dependency-name: org.apache.tomcat.embed:tomcat-embed-core dependency-type: direct:development ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> (cherry picked from commit 2d1b227be35321f11f9b2a081625f6fff15bebc7) * Dependencies Upgrade --------- Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../intercept/ProxyUnauthorized407Interceptor.java | 2 +- .../handler/intercept/Unauthorized401Interceptor.java | 2 +- pom.xml | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/client/src/main/java/org/asynchttpclient/netty/handler/intercept/ProxyUnauthorized407Interceptor.java b/client/src/main/java/org/asynchttpclient/netty/handler/intercept/ProxyUnauthorized407Interceptor.java index d937ff8cf..b30f6bbd9 100644 --- a/client/src/main/java/org/asynchttpclient/netty/handler/intercept/ProxyUnauthorized407Interceptor.java +++ b/client/src/main/java/org/asynchttpclient/netty/handler/intercept/ProxyUnauthorized407Interceptor.java @@ -205,7 +205,7 @@ private static void ntlmProxyChallenge(String authenticateHeader, HttpHeaders re future.setInProxyAuth(false); } else { String serverChallenge = authenticateHeader.substring("NTLM ".length()).trim(); - String challengeHeader = NtlmEngine.INSTANCE.generateType3Msg(proxyRealm.getPrincipal(), proxyRealm.getPassword(), proxyRealm.getNtlmDomain(), + String challengeHeader = NtlmEngine.generateType3Msg(proxyRealm.getPrincipal(), proxyRealm.getPassword(), proxyRealm.getNtlmDomain(), proxyRealm.getNtlmHost(), serverChallenge); // FIXME we might want to filter current NTLM and add (leave other // Authorization headers untouched) diff --git a/client/src/main/java/org/asynchttpclient/netty/handler/intercept/Unauthorized401Interceptor.java b/client/src/main/java/org/asynchttpclient/netty/handler/intercept/Unauthorized401Interceptor.java index d622a4675..cb89f70b8 100644 --- a/client/src/main/java/org/asynchttpclient/netty/handler/intercept/Unauthorized401Interceptor.java +++ b/client/src/main/java/org/asynchttpclient/netty/handler/intercept/Unauthorized401Interceptor.java @@ -188,7 +188,7 @@ private static void ntlmChallenge(String authenticateHeader, } else { String serverChallenge = authenticateHeader.substring("NTLM ".length()).trim(); - String challengeHeader = NtlmEngine.INSTANCE.generateType3Msg(realm.getPrincipal(), realm.getPassword(), + String challengeHeader = NtlmEngine.generateType3Msg(realm.getPrincipal(), realm.getPassword(), realm.getNtlmDomain(), realm.getNtlmHost(), serverChallenge); // FIXME we might want to filter current NTLM and add (leave other // Authorization headers untouched) diff --git a/pom.xml b/pom.xml index 42c96fc06..0856473af 100644 --- a/pom.xml +++ b/pom.xml @@ -58,11 +58,11 @@ 11 UTF-8 - 4.1.94.Final - 0.0.20.Final - 2.0.5 + 4.1.100.Final + 0.0.23.Final + 2.0.9 2.0.1 - 1.4.5 + 1.4.11 24.0.1 From 25e12bfd03f6375a91ca264a32588fbba7ab900c Mon Sep 17 00:00:00 2001 From: Aayush Atharva Date: Fri, 3 Nov 2023 17:24:18 +0530 Subject: [PATCH 029/167] Prepare for 3.0.0.Beta3 Release (#1914) * Prepare for 3.0.0.Beta3 release --- README.md | 4 ++-- client/pom.xml | 2 +- pom.xml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 44555f076..111dc9643 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Maven: org.asynchttpclient async-http-client - 3.0.0.Beta2 + 3.0.0.Beta3 ``` @@ -28,7 +28,7 @@ Maven: Gradle: ```groovy dependencies { - implementation 'org.asynchttpclient:async-http-client:3.0.0.Beta2' + implementation 'org.asynchttpclient:async-http-client:3.0.0.Beta3' } ``` diff --git a/client/pom.xml b/client/pom.xml index 3e7e65444..f3b042da8 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -19,7 +19,7 @@ org.asynchttpclient async-http-client-project - 3.0.0.Beta2 + 3.0.0.Beta3 4.0.0 diff --git a/pom.xml b/pom.xml index 0856473af..a6ec8ed66 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ org.asynchttpclient async-http-client-project - 3.0.0.Beta2 + 3.0.0.Beta3 pom AHC/Project @@ -316,7 +316,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.8 + 1.6.13 true ossrh From 3777b4086c6565f49ab314f38489bc037a380e96 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Dec 2023 23:35:32 +0530 Subject: [PATCH 030/167] Bump org.apache.tomcat.embed:tomcat-embed-core in /client (#1919) Bumps org.apache.tomcat.embed:tomcat-embed-core from 10.1.13 to 10.1.16. --- updated-dependencies: - dependency-name: org.apache.tomcat.embed:tomcat-embed-core dependency-type: direct:development ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- client/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/pom.xml b/client/pom.xml index f3b042da8..e618b05cf 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -31,7 +31,7 @@ org.asynchttpclient.client 11.0.16 - 10.1.13 + 10.1.16 2.11.0 4.11.0 2.2 From 3d45e88f3dd43dd4d3dd11bd815605a84cb00e59 Mon Sep 17 00:00:00 2001 From: sullis Date: Thu, 22 Feb 2024 12:58:45 -0800 Subject: [PATCH 031/167] netty 4.1.107 (#1929) --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index a6ec8ed66..f944c48ed 100644 --- a/pom.xml +++ b/pom.xml @@ -58,8 +58,8 @@ 11 UTF-8 - 4.1.100.Final - 0.0.23.Final + 4.1.107.Final + 0.0.25.Final 2.0.9 2.0.1 1.4.11 From d573ac7871418baf7b32f1957d0ac7e28b15393c Mon Sep 17 00:00:00 2001 From: sullis Date: Thu, 22 Feb 2024 12:59:16 -0800 Subject: [PATCH 032/167] junit 5.10.2 (#1930) --- client/pom.xml | 3 --- pom.xml | 12 ++++++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/client/pom.xml b/client/pom.xml index e618b05cf..039e5d662 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -79,7 +79,6 @@ org.junit.jupiter junit-jupiter-api - 5.9.0 test @@ -87,7 +86,6 @@ org.junit.jupiter junit-jupiter-engine - 5.9.0 test @@ -95,7 +93,6 @@ org.junit.jupiter junit-jupiter-params - 5.9.0 test diff --git a/pom.xml b/pom.xml index f944c48ed..e4aeb5388 100644 --- a/pom.xml +++ b/pom.xml @@ -103,6 +103,18 @@ client + + + + org.junit + junit-bom + 5.10.2 + pom + import + + + + io.netty From 84a4e368bec3b17b5013335ee180b7faef5f22f1 Mon Sep 17 00:00:00 2001 From: sullis Date: Thu, 22 Feb 2024 13:05:10 -0800 Subject: [PATCH 033/167] setup-java v4 (#1931) --- .github/workflows/builds.yml | 12 ++++++------ .github/workflows/maven.yml | 12 ++++++------ .github/workflows/release.yml | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index b55e0465d..6a59bde6c 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -8,10 +8,10 @@ jobs: RunOnLinux: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Grant Permission run: sudo chmod +x ./mvnw - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: distribution: 'corretto' java-version: '11' @@ -21,10 +21,10 @@ jobs: RunOnMacOs: runs-on: macos-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Grant Permission run: sudo chmod +x ./mvnw - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: distribution: 'corretto' java-version: '11' @@ -34,8 +34,8 @@ jobs: RunOnWindows: runs-on: windows-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 with: distribution: 'corretto' java-version: '11' diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 9b57efa7f..1f49d3112 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -20,10 +20,10 @@ jobs: RunOnLinux: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Grant Permission run: sudo chmod +x ./mvnw - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: distribution: 'corretto' java-version: '11' @@ -33,10 +33,10 @@ jobs: RunOnMacOs: runs-on: macos-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Grant Permission run: sudo chmod +x ./mvnw - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: distribution: 'corretto' java-version: '11' @@ -46,8 +46,8 @@ jobs: RunOnWindows: runs-on: windows-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 with: distribution: 'corretto' java-version: '11' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3851c42e5..51dc38f90 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,12 +13,12 @@ jobs: Publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Grant Permission run: sudo chmod +x ./mvnw - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: distribution: 'corretto' java-version: '11' From 34523dbe04b744288d563ba4f426fd8d305cf9f9 Mon Sep 17 00:00:00 2001 From: sullis Date: Thu, 22 Feb 2024 21:32:46 -0800 Subject: [PATCH 034/167] update maven wrapper (#1936) --- .mvn/wrapper/maven-wrapper.jar | Bin 59925 -> 58727 bytes .mvn/wrapper/maven-wrapper.properties | 10 +- mvnw | 91 ++++--- mvnw.cmd | 375 +++++++++++++------------- 4 files changed, 253 insertions(+), 223 deletions(-) mode change 100644 => 100755 mvnw diff --git a/.mvn/wrapper/maven-wrapper.jar b/.mvn/wrapper/maven-wrapper.jar index bf82ff01c6cdae4a1bb754a6e062954d77ac5c11..c1dd12f17644411d6e840bd5a10c6ecda0175f18 100644 GIT binary patch delta 25941 zcmZ6yb8u$C_5~VGII(Tpwmq?JJDK21GO?2{wr$(CZDV5l&Hdd!-n*}>PSxrjZR*<9UbyQ?UI^NI}=Z-2>f15rUX! z@{oNZ!j^OQ^S11%_9E#t-Cb6Bu-bhK{a2HJIl1f0%O3Zos?|bNQYjm_);ZNxME}l( z7EvXwB#Ojv8gp?sCgYi&b_dlYnz0_6@x z|HnQ4CqC@|+XEtl5VYUry#=oXPj&mqQw9pG%6l|AFf{r-hYq3hos==lZ~Sz zYG2;2X&?84@pZ1QNcz*w4sBq?LI+=`V?i{lK$PlQE#;rc(}{UB{ElLNg7#t?r?4oC zqFZ1GUsoKnzS&d&pEMMfv9^+YKMzka-?YsxWC|fd=Plhh=-A#joX4D=qMM#f+35sL zUD>t<$PENjjd@rZ*dYY*gc76)J0OSr;ix{$jm=0Kw$~ZRtgFNn6NN>A z7Q_T7+a)O;bfk{3A|8`)($X|gX8Kd1+(|-;ImAw!9=+clrD0|X`}-z6Y6ZO$ls}?# z7RQ)MtPg$CNMC{(Rz=Q%N@}+lK9bmZyipzyM4Tu$#Uxdr5WwncDwmT_>q6cY>7RRwenDJkJbiIpT}&i+H!t$PU~359=YYu!9Z=dvhdw{ zY~!6odKygJ6LRKo5jB`)mu)#|s=Q8r`f!vt=2_=n*dG9;*~%*6+E~Y8wS_0i_K<8))T>pgP8;Pj~~CY{J`8q=ZSL|I)re^T8EyYX?K+cn#9wN;b|A7{2$5028W zqwcd8GFPl8m#rEs;#PrJmE-2LS2#T)%7xF!w8)CExp4^)*sd0`+LIM${8{cv;L6b~ zNFfbx-5?SCr#^~Pt(9oEI|3F%brS_3%7|e`SLO-lP~rLGnguUU6v%PfivAdp!l2_5 zPY~khH{nzjn9_V6w199-vpsN0bgjDJ8c$Qb@4Fd)8xVo$l#;=rA`~?=^af-C4 z3D41oCHJgX;?vI3t$vHpOV}n^j-oUD|8JY7W=p1-?wh%g-G+dqF1nubK>LjlamP6sq_QRU@>2c{Peh zsCdUz?-6it^}Wf4&y&;KlCkRnf9=OS50u=dTm(A~UppJ0syX-?uaG>Fn&r+ITFS}_ zapa4T&zL*JEUe0}j`Anm+Q%}YBWUs1m-TG=mkYrn)*=kx6w-4X! zn`4L|&xx!{?z2tQd<2T#ht$O?qHDut>Am4Ipbrx-l)662Ls0EV1h5AH<=3C|pT$$n zY1-&G2)9EVeda53vixOsSDu+M`Z~p3yPJh@zV+O4mx0wVDwsvfkz(wpSI|89eUvH} zKilM7Dco-L&uoiC#uKg78mK$VukcTE9%6X=m|&<` z>BFLp^QU8{*jGAG9g;u*g48?~Ob|?=rK%0osi+`7HWZVTdSjYfT$UV5je{XJF2yxz zBJj&U5e`8extb(FFF;q^6&p9S5S_}YEJEIix>&u=iwbXpMM-=FmZxU8d0Uc>6KSJ4 zs=A$uAjSXor&G7Sw>+}lI%2}8e&uCyO{xEVrhA@nz6$Xic$^*GOJj$m*Zv&Tt71M0^ ziDO`;!ZJ{00U_Q#l?+8%As+KL^0LbZt$5U|i|*{-*h^ST0e0paLo!$0^JMq$s4noW z`MEsD%!Fp%=8_1rE9u@87ybJEBIyNGK5YafbNC zuTEeIu;-Zh0LngI6wTX>U3N3JQrxqf(ecX^jtBUx>Bqe%gzSKPYb@q)k^Y-AIng?O#^cV0C#ttOyod44e%|r8L$HDeY}YT;ars@Ggg4= zr%-bR$$4pVaOWRLIu=iWnlAg?lata>fa|W|qVTY*{I@99fMt{NhTnU;{&qQfxfxt6 z9$nve(hl9?#Rg-G3`R13=>*!D}SXIelixk)^@oQ+)MPqj0p;i(jm(jSa%Oc$ebuBvM;LZl4KiU?T>Ics(`1l zhcg_o%4#{N$P1*@oS|mHKQM^*0e0MBmt~3{qs~iW`2k=vgad7pOqU$9)H%Sf@i?=4 zDIH0xv-{<>fvv$Cs#a1~jwZi9ApTb|0}_(Fj9?%j8xSBMD*qfc1JGuj3Q(n@r-&+y z#=nqkzlBj*(Y*hIh{&GSy{vR@F*ObaHKCl0Dtyn%a>RYgy(LY7`cvbLL<|++AFlY~ z9p%xCj%x`fzZ%-*amD|<$?9U^_x1V&-b<66E@eC{2FnU%j+)Bqgn17`M^;<9$D1yW5y{jq48rq;utr~1BZvDoWc!I#81#+pg3Znk%2BU@} zXyMSi-=jUDC9GEqlhA8KcI$vea~q%7oD zm540i#Cvlb6hX0)zo^N3&WpwbNR}?MlH4A$x*Ko=Dx0aZdp3TyI>s$WiZ0eg9sVqC z~+~_&u8Gx1icN|GfdZi}CxkMCxMgn9;D_sDa6q$yKvsD+E01Qjb+Ms4N zm26z4zVJ>E{H|t}MC6A26i1$G0ePUZI*Ka-H6{W0k77ELNG%8wKmqn(9~?zN=yWM@ zMWNP&Z=uB97~b*c5Y_)8p{j4P{EUBzkp00VNVp)ctg##RrtnpKS3taOo0BXAOeL5V zpv1+tG%jE_d-D&VxZE17s{QL8*7L{4l>RPZbdN@E6WZwo?tf)fnY7yyj_^-bI3OTQ z|71lEU@);Ya&bx0f-yu}@%qYcT*r=v!iR&VN79@mch%n1hvq;*8C?!&l2RQ;z^{U` zx?GwxcgM&pv`b%}zAUucB(=90u|h?8?w9V&ABK@WFr>7bf0xV1K8s)Oifxn^>3Mc< zTu;In=Q) zfbs+HDcfsd`)CfBdcg^gCmYDE-jrI~A&_aDd0BBOW%lBpg z@QwR30vgtGXY$cOW=U{#?ch#kXKT4roP@+jVI=|Gm2|k-Fn(w z+4mN9BZ}noJC6{P!XtHE-Hl08>skSC3nm4WBX6kT_r4{=l2@omf52?sbSW=%Vg!wf zT-=-BlZ5oHUwVbUS6>Hr!9SOJuOtGXXo1qQL)0tSb;q^=qqCyR;uXAh+yK@sm>pSe zR!J#3qm0@vIzq6$0&2=5Le$l*c5QQZvzZ{F(wVH{=#acbli0)KV%zH|_9S)nt-_@2 z+RntxAA@m%8T(MYA-WF58{?W|S{>fg?UuY-_XPO$U00}2khCdJimmqw>rKUWvEB9x z?bE@Fa?=eOP>No9TQvAuK)_Aa;lO}81yfTVRbzrd&d)?RTZE^xRlnz#Rm0km#0~y9 znGI_|Iy?X6npRqpvpN)Defo`>a#q`bf!6TBKxQ4gO=@qLJmXJ{gLh1ld2NX^Cd2Ba z-%^|Yx|6euN%KP)@j)BwylGAba8mBO%T#7=_$@zLm=buO2DOo104THOJb`1w)R1)X zTXUY4t+@e&9U_s6715iys;8My7OfnX&Y0Oe&ai-AgEz z=Xk)EY|K=~lJ>S$n1?H-#w>Bi_A|W_mVacyRZ}cCNETOC`Z@x7fU1x!6(Ye`WvZvq ztjz{UcOiCwWwRhoK=O^(Q!pEXJLdAJ!+L~QxCX6U*Bu8=*6%P87Lf#Z!^Ml1PFES{ zD#kq;j9!$3Jd|O_yiToBauisw5LmaGaC4GaA=C}3G+CW)euBY2rS&Am=pNIJC4p2t zu+R_iO*0(?E$GxL<-h1^tDEu({$yzdL5s4;txh)%R<-w&0W__(^|d9?ICVhsv^jNT z_^!w;%INlvI}7P?Lm(T=A3F*~FlOodj5VjHF(?Mq$C;U<8)4v7C=#4KH5Kqj&vPC> z-0kT4zL!eGdAQaidp%B)lJPpNM zK@-JXbXO>zhktMD;``!(b+>dA9Pa0nX$#E3l6B5P5p9@ujON^RiNGcxAA#{iD(d~# zDvHtw6`BepMuvjf8k`FE*gQIKR&%)6FPe;fKjXIiF0mBq{rphuWC}gT$6^pL&dR^# z+qyJWfOJ7!$2l~~L1onIk%MB-uFZL7rxxlf^1YbZ)4b)Lrj9X=wAADJ`MT@bL?Fx{p zFO2;?%$eXEEAyDLbc!wQn=AaApmxSblSMk^c^kHP8|s#`)=1BVFqWzwTV-AHWJisjbwxuwAuPc;`xTaKGQC!-7&i7 z#_kZE-53HlLCx*a2;9c_rca?TVFqseiI>C}rmotoNU*J%p@6_r-|(VjHI3;XtH;iQ z$&!!3rJM{|ITI9*8MN_^0X3EFQtxp4Ih{qP}4fa&U5 ztj$@|bdmdHN(cOT`Ox3I21`rK{+1F#&ymn&3)SV$?xJgE(#WxBU^>fCb4#|OvODZe z^^IU|ygh$ZWT6hHQ?81iRpYo@WXxwS?K|jOv`spHO^ZJpLA_MNI`L}|FD6}$uo!m1 zb$^uGRX2*ho-Me)$4=c%I@n)!0Q9QK2I&ld1DLuF({~!Sc_M{0w#2*r9D}nz0@H{W+N%z@ zgSaa8dTttI#^6Vyp=;(rMVVi-A_G|smu+5CH&RHzLq-)3wWeJ(6~i( z=nhy@cAjW*L%yVWz%A_wS(mPZKA<@-oU%4+&_CmY!hbfT|DA;2K!mxPrqXFlpTsME zG$!;K6Xu0(V{a&1sL!8~RF_g%7b1OCT{o#2qyrB1!WWJKZ_GO^1Ap~zdzK}JiJhJV zg`co^#d~M@1|l+ZhdpL;30P}>iV?5WX`X|Br7dchWg3&u5+!X|oXk}Fxr@682|C$d zQr6oXgJ&S3%Ok!&M9x^gBXWc+gl9iv@+oCOFmRT}UoADan1X(2ltupcye1`QEk@=FLfqzCY)-YgMrLkKmlG@q;3E+Ke?q};$Lz4r~j##U4 z>=gbkl^gnjn7|Q6>WR8N$s!O@GWzaI*V$EBem$aNDj7K-3pvt~yZfR})rwPxDCpnf zjOmt-Di}s+ywnti<(syzuNjm7)5c+b5CbfLwE3NG=T4C zvm3)cQjQm%c?ZM62*w*I1=*x2mYgX5_VE1g9~=i;L4f_|QV~m9P1=2_&M;D^4<;3< z>pDWgel&Gju`=-`PUR7NHVn?20@Hm915kxv#R8OfLYs+$YQFse{CH9?yy(vEHx;hr zku6gEc<;jx&#?Qkb18?wLC;bZ$1cWLR20vAcHO@jmG-d@C(J@2s5yOOw263$3D3#0 z5~BGi9soX9glBn)5VCv(gA|xytIZk9*fL`Q^g&BTS$spoTUOh8%DQl~onS;30Y%`u z#h5Sl!3&kiBYcrxz}yEpddm;&a17^9EYRF^l#N?dAGrAWz?{J!sY6=B?LywPc64er(7R_n-4AGR?VEdaoVnM=b%F3% zCBPw@;>OMJPv4qTI5W4GM72l8d=a zylJp-J3iGG-ots9SsdM>2CatNgX&LC(ca8l4dz_X466Y=!rpI8eRJEM+$Sz|N4ixL zgoaP$q&yzETG1nd3{Cl&QvUIU?~_-IeDP#`^)QGIy~%sVJ9@e3cP(ZW+X$ME`nv;I z0;T6rn$hpZ^q`Mes>l29|Bd9}^i*7H|79x<{yo(HA~}2@_XZ+BJX#+1U%nyOpt1S! z2O6J09A~=|2E$f45p-bwdmTbk(R5HuY_E4xk z#7DIv?U0~t!?e*zv^GTh0$2t}sEc5k#R%!6t3y zWu?{fGf(I*4*zSE*33mW0tyJoA2JXSs((h|0b@5{fHxaZfFeyeAJwBIK}uGj_sQ|G zFi~%5uYayIw3v7xd>9l85eG~>l8D%xv@|>J-^Ais;bJaPaB0L_P0yo4+rvh$qQjj~VD!EL*#FikdOms&V3TBjixZf) zgo?J3b5%8iqCb&7P+Bdkhl|Wa45^eVu>NZoIqe36?zpxG%gd=QCKwDD}x7hb!uk+5@Tz zXze*GSBMM*+?%Ns(J>_JCymRZ>6g!0|JG^MkadZu%%ou}DeIKmTR_*Zc8(sWHGPDS zUcQyF^1-RuU!ut=yTJ*bNtj#1VRx#Mi0)M1bHmA^wZ&~yIQk9m*)@rmv<(%^Y26r& zYl{5`;DYuQCGqT1FfPwT&sotaeT2akFynS_Zl8o|tK259x?1koA<@+-pB@7y5ZfZ_ z(%p|~iFT+`NR8f)FXEWjk4gP^Wi$aH#j#{qZ?medkAL1aZV!q$2&YRfyZ!C4$u3%l zq0+{3tG><1ZX-EFehRaB(SB`Ib=|WLkkZ2gI7NI^Z;_}HD)m5D+2dhF3x5-xtNJpW zRBDTrzU25JBD}CO)mS>$_`BlM2%wRpymh@}7F7O&4!~urx#T8IGJwKh1Zb?`Kw*C4 z{Sz{zD)88yEGJ_-Wq=P2nQxP-Enuz^QfqRgTbDG}HvN|)H3Ao$xPW_k$4XP@LlaE} zkgE5!tKNei=j1$(eF-O)ilIQCCoG39cUtA96(VT82uY$`+#n$F{4|K^eg*R|Ob1{y z3{h7j^Fd~+SoskMwMzZjA>s_e6!R210~chLT}G8MJ%{h_3)jKY#;gXAxviDvL~8-d zV#aRK>T4{GL$0#l*aS%cD`l%)gU$#Cm;oGn1<}f6N1%+89|lczpc6b;$JEh|0*EG$D1#HI&;xy!LQ|Ht=p}1K{Mp=I5&Y?#} zw9|(y5r&D0QF~ISWRNK#rTxK+7VDV8+V7+j?f<=S{w!JG&T=TdKdEqSfO~PqOjqFD z5I-2&=}5WYg#EH$oTev1R?mR}fTp10nq>1O38=)fYI~AdkJEJ7$g7|G`y<-^c_r=h z^9u>D1~=JETYh)%pZm4xZH)IL&E0zP=S8wY3__w++EUgJu$<;3o$@m}y5a~7Ic#PR z*AglfGuF$;PZafZ0pDC(3I%FH@v-^7i)E^va>`X}T6%ztWTp%_<*(fXcwVWbVDZML4a z7u}UZe)B&(s*J*a%+u_Nhe9&*pxH5(KeWyf+heNc(Y1j!$geG$C5(frGM_wWN!U#u zUMT7pF5$- z^WiqgyFbA`zXEMNv@X9-@=2ODIIPIirsyWIEkEjA{UHCXd}4D75D%_N0yh|8&Vp<)0# z&*XP-xqwx!M5O!UWwjLGerIs_-7S+%4lMoDb z*dXg3s1K34laQwae8l+04idJ!A8S(KoN~@{PrCMz{owObJ~VY`u@dVfW<4L$!wh!l z`kI|>oh{ma>vQZkLt6YJ_Js52tJ>0W)Y}>gU6+NyN9ANFb@{c!r((M0_L7HR#3}3f z9$)T6u}I?AZwO;K2SD*psW_8m<2TQUMeSsO)UMVE?<+$V;2LA&=RH497g4t|4|tyS zX6NW~*)Ge4Qn*w|O2^xq{BE|%(A^QwPUNcpKu^iNuMfy<$^G+D;|EP~3*HA1Wb z$Tq>kU7r&xG>@l-qZ-BkW(!wZEqR{g>FVwk3(}IbbfS35gwaKw~?Gr+{vCj|GVpM1T zBro#9e#-D4X|nr;B>`hRf&(*PscwETITqSCV`hxwS&Nxuu$>;m-%YkA+IM9#>YEsA zLkJNsx8WhBx^l%y=nB}(DxLf-G1(l%ZS}f|PAg`^MpOgctP~yLm%qR`J)LThrv&V! zy~OPU09k26qVc5xTd%93I-zHUcj0PcL#Bva}hnCy`5q4_eN0-Xk`Q?AFCf zrV_7(BFFM)6%q|C8ejw1(2uE1d#3qDh#HH7!90Di(G~SILlWGIr5jkAi>#20x|vr} zm8=PiEtQ={zk+4K;@2~uWt6RH9<{m8R*h4v04F7YtxrLH)*|ja6OBBpj%dl+AWb`q zLHOZ(iMyk)vdGAL<+V-o|ZCfF%k_7s_J|>RC>~>Fa{$*hahn)ivach*xKTzj++NZ zj6(_2J3&m#1KFqC`$#(icJlsR1ozZwPDta4>8VKs1rW9C%V|SYYawyclAhNapfyZT z>LGb8jHD!7_Y|UjZbd)YI6s!uKL@n{iYsU>C3=gIFs!442QXrY89&$3Y!`}x=yg#@ zUr~Zopgu5eT7~BOS&(A_v&gYiA`i(<@7A>!deY43!blLw=?L2CXkU`5rv4n+8LyEOFt>dyrt`-gvh56>CO^rQ-Mlm0 z?t#2LWb`T=tJ#}`3h~qCjK>E+JnRHMh=Fn|8F_GMOEV=XCUc)qQsyh2x#+vdB6Agk zJTC*cUuYr|tFlK-Qy!t>lqut*fcTZ95UFC7S^S<^z*a!oCTuA?G3%Kbu1Ct&07GKF z#5Ffv?WFeQk9X?j^Gc080^{bF856qzVb|ZH}Gq{CVaL z%qS8x5Mz*%=AAovYCUMI5~>t(* zlCwArCn0V8HR>BSqXT@Xa6V%lB@}bzx-4yv$H>jC$4i!Ze7q~N!z7(nJEd_SQX#UD!KQ9y4-bc z593s#d@qZ9FU{~s=;Qo_cwL~st?29H&ma-JGt)x`G$@vR!H-y1{zM;qcGi|LkbvbT zHpAA7<>vI9D#4vyAP-Stj@{Ncvk7y->}tSyfah|yS0<2V`s&Bijeu>K5r>Fcse+i#>?bFX>L9C zN$f`Lnj+#6+xN>pI0U_&lDV&PwhPu5vFru32_OYGt8v<0P)Ost>#O|=YDa(9AGQx$ z{GRs!{$NNVf5!PjLt>byPU=3LsGA-+J76JypFnAy8G{4RNUNA^%juLI*DZOyBTtxF zkBoahBrI;YFa4CkM2!8cv)){Au?rC`1j~&uN^=&PrxuDxI?aK^LaERQY|bp66V4Ra z5io#Nv$l)eod)aDBx5v-Kb*u*MUKQ%jA3SbZ6-c!h2HH}?GHPCIxpxzpsDrl@G{dOw9a7o6jTf)_rv@GaV z&cyLyh^19H`CH&s#`i8q@;Jh3le$ek39)i>zH%MY zXIhK_;jA_CI}X7XAnP`SZI`ulWP652O(&F*6;ZAG+p;J^J1#qiD>@{`(z zqkeCTz5;#jc;Ul2jy%=BDt>=q;psIH(v}A3J`)+#6mhc!YOeI&I`agnl%w^v5fmv0 z?Xu_##m*gs0SE~d6=#tR$GlPj3E2tWDbIy<=7^uO(?Mr=#e{h&p$);OBOJ>_;GP&$ zzefDS&d_>ywqQTS@=C&oPsQdb7^ohiL}q9n@U-&_*j9#tS~*g%L0-*<;OWsXf=~d~ z^PF1Zt}$+?p{26Y@ad@|T{iYAy$RDhH}iRvDz#HDGl64+Tuk7S0-=Q03xUSDpjZ~7 zvPNb*E@lc275&{6S<1ctfxn(;G^PL|F&E+R;{)_m2<}iBD=J<>%$$?a$6|F0M2PBs z0h>J&G^=%2`rVQTcS38!6| zP!MV<%$SNs5HRT5e4<~jgX8dGV2MecOIztP@_Q<7vMmvJytu}!0j>!Oi z%DEc5xKI|WC_SSc+i-BSgagsKR|l_YZ^Qn(3a9#@2BJ=gfM&bI-@F*HN(KOu0q`l= zp9d`B5|t7bC5x1O5FAg}MOx0SG}u9oom^=kjRq%^US>Gx1Qh+!ww(~ER&J(q(MqO4 z`5gKRF7qZdaSR5tjLXU@j;u+Zs)^WURD>P~v7h9)v_B~N#slao7aRU%mV~O1aA8O4 zoO=sS43BonG`UlQlf>6Fxv2oQk#%{Vc(gzG#U(=of6M&kaz#RNBDCKR1+~!tam<$X z1Aw-4%GJ!;U zy%w;$&BB2}c@O$cpw&T~A{i@=u+bTLGd;wqzv$z~kpB-D>(p1vu{HRF9HwVv0fl)l@uVlMweC(HE56(wOvQr7=^UVd{8XXZ{ zk@mwHq|#iR)zn|S|9h}Bi2J>Q^RJwy3LGdbN(WF;R$Nd*`?}&-u68x~847!zdAeHs z3;hUk{|^Le0zwok>E6)hk`1-{W#@&&2lW>`lkfq!pg*A*UrPnN+hB^z)$8=xbJlwk z|NH9!S}&|Rg4}^S6qF41rtn&?9^H9s$zFF%gz#)a0F5=yISv7n<>eG7qlb0|ylpIT z*A?K+{w0uDtEvh67jB<-AJc-PZyo=sdyvlrF9C6|grQ5#R8hq_mR#_=eNNscbfL*D zLCbUS(vj$%PH4jOZxQY2UZ)`40_Bx&Bqp?qXmEkU)`pvEcT*|zfbt&cZxvb z4cNBNx-st_am2O<><71vNDWTyKB4vfqzb_L0_m99kSR$hHY!Cu4newSkQqX9_(-Zs z#{_8f3WHu(S^1Xo+#!Q>`qb0YRmZ9Ts^X36Kt#BO=d{vWEF}Ev?Up;wkN%(E{@OY3 zd8Y};ef~H@@yPauT@;uicOo|oUd+6p#hmLZNs_q5_{gw;QKhuQdoquEfC)snA~@jc zu?0^s&iK#s5P6LqqFJc}qG75A#R9ds#a*UxHccc;0iW78l)G3cM75HfE`GWdEEtl$jw6&L_PI3qQp|ogJ493Mnbi{1q(ois%F8=M$UHq&&bI>m%Xv;I!MHw~I2a^oTxp zytR|7*gjzEuC{%jw_2{geLbEJZY>CWuzJ<&7J|()osC$x88SRZkF)B%QUU=B3}^?5 zsMpD#-lq5ZnA@Sx9XFspN_Re^!4-}Yep?zM>z@pK{)n_MVSz!YK!!vUnLf#*k3S4_ zeT{JTK5~7c40J#q!rlSc>GoQb5;VU3ersvn@YsnO#nEG+^9wa(j`~e0YHV9AXpYlf zgQu>auL4I-$`oeiOFpWB^B!R0B?3?7OhfMlr~9g(^F|)CJJ_M)2H!`c?-|W!CwSrp z9Mdn1ko(r8?U+*GL$z<_@MPxb5Y_n(^Vck@!pASzx1>M=-dkME^_!r;9hn-%v11Q~ zP4ah2^pEXu!PecB$nP*g>X!yM{+GzW9-doH>W6EE57FUEY059^cK{%XiRRmVUr>RM zoT;az<6cP7!6UZDL$RYqvG-E2P~LJo4g>q~DQ(Wsv{5>@aVcz2j^6mEWnL>oZR1o+ zMbS>riIByFf6avuAgAWJ_v%U^r#AvmM&@ZY;O7n!=CQ(iJJet7CYM~Bn_mAK4-1c+ zneacV*2-iy8nTqq1Jr{@Tdz*^`svJ;8* zjFo7*b>ct2Oe_%go-KnUg^wkj)Hjq~+Ft8xkekgfK+_f&Y4iusQomT!k6+eu2ZnfP zFcrGEe|awM7Gf`&B#`8aAq?2U$!s6?gYx6R;VkwLx$~Ky?`1#0rkhSgX7t5zik58F z9~$p4^CNL0L{yAj-|fojTQy#53K4RaCCjMC*vzGFrxf^TEJC+v`qgBxGH4~cSsx^7 zp)ir4>Q*eIE`I=qAw+~7s;kvW@s>#joFjEqM5vsMh(xdBIey(0-^>x;^XqPp1Au_;|m_-=#W<9Jd9$^W10qyf2Z=|s5#ZZ z_YrH4xWPf5-&b#piJ-A^#|e`$n9i5=(~m=He_aFqqFZ{pdzD9s8`se!hZU8VA|;h; zQY53Iv7!J=#N7puf|GYcV$1o#gb^s#iL2A)s!jE(dTkuYgWl>Klr?;YU#kowmk>oLmnRr z9}EGk4ZqNJ3ddrQdCDWI_KgGZtF+0CQ?re-K!372XA4P14h^?`XCsrIOKV^3NgrYx zJw8ErIuk4!w_6;%tqwzl&=xem?-KJHmhYoDl`U!(Mobj)awi_ zltoC)6-Hd+muwcjp{T(?T#&=cflu zw6&Mzi?da5`TOz_H@x6&hukEq7L$W!)?1p}<$zLkG_s5oawBg)o>$xvG&b1O@vX~| zlAE|~i#^~L6sViQOGv zSq@J99jFe~W)0O_3fAwp1a)y|dR_#yTxcs!yAe-JV9<7=&_*3MwBFiflB&A=h#kKt z{B^caMlHAy1wMvScA8B5K*zQ6N!wHUFy=*&-8RiEThSR810h-Ey|aAJ#s1u-EJIad ze_#nXbPV$ID7l)@DW67t^+}l}xk#9T<$Z>H=)9vN9?<$ltth?S47vUlYSRGFuqes% zMN--oe`QXAjFIL#zrewWC6%&uiok32_SP>4u)NZr2gkOdye zM4ulJ%j^FvU{8EiMqgZ{`WT zJgV&iGU~irPlP_xm8EHoSBwHUM<(FOUl(Qq9}4;yw!VtfiZ&I=(nHkdUAT@=^GSGr zpNWnsP_#vEx?$fNe@f}X4LP4Xphz#R#0M17S32=B;BoGNmwe38~Aq-_T z(UIHwZ3<>ni#-LBsTp!nhY0r0P1CEOI_{FblhjHaxjj>t%uaClVz|uJd+WHYdE!ZC z!#94bxy%KP+4CA_j7u^!pmp3{iqoGjdjy6MUR z5vUg8t`G(7F?g zG4C8wGa_Z*Eb#{5EIU2L7Cf_ZNO4^x))u-H^~J_9n%d5(kZ%pUv>8NJM-iDAe&Zv% z*TlBZqsk16Eu^Yb2a0}+pRMXDjUs=4s&U77kP=;nTQ4@*Ai^NNnT|1+aHwOwmMBCI zaJ%~LAquuFZ99%$ViB&Bj)6I1C+&pjoC3Gn(!ohtOCA8Ig3-#EtA@P^VUTAwN&_clG@oCH z12KVIx%*RXF3KE=vdO{hqYJj?xHOZf1HUG(5WQ4!UVp-X8rB=V^NKo=s&!!Cl0OEu znUF*{hIsmZX`0({vo+xTpebl-eMhJwWW1m<& z2%+r4U;UN!j+9OS%%W|1q^*H zK|w(LfC|4P0spG2nmV$Tq8o{g0xF-`YEf(e++o3e{^!~i#{&Hq zm;izAqk)jI$^L)hP4P}vyD)JA9Kz%2PoC$@wzSBJof8m!V=q|LR)e6>AH&|3lca=^ z0@+9(A?L^5<)W$8SCQbz6?A?jD6iI<>&of7M*#XIJul%>Ro1O2amhs;7W+u>wBen` zQ`f>6!N|_X=8dFFZ4&l^t`!=!SKR*hI^hB^iGn7*z>X|-GNa=1U$1p5)zY78OmRr+ z4ee6y!RizQ6ndoTO3h99ei7mA?wcsQg z8^B77)}g?5LpawL?ON1JA{pk>0PIXvd zNB$Jsdx#ir7`t|NWwOMIp_tr(cCYyZ*aUHRoLPrlMo^d1^_q0Z7yRFluv+{FkJ1ki zko%uN1ywe{830!Uo!?{vM~i?m#+bM60%B;IM7CMn3Y@qM{B~Y!s9wdP%7h4C*2D|X zN+J#0D?o&r&1`2}+foZIaVuCImfcFT=Y|tha5^L2Oe^VK_9eIEeS6d6y6uF4_51BQ z!vWM2`Wt?qN<9O4AeyLt6p|X-n0Y86#YqKE$Jhig;TQ;Qtd@xu)QHjB{;~rtGF;5{ zm8vPgaBxQS^8i)Y=NDh(UK)r1`N0~IK=cg6jV@BlP3NkQx>OGE*6a2=m?-8T()cwY zigDsa2E+g%AJG7A_d?_qvd%|z^`khhoBUt{)JHOG2Vr*zq#JYa`8L7-&KX1ydN*|c zZUP1HQ$CfNows-+ric+8Z;OqL3T9xoa<0;PBb`2v)yvAy=k9HD^5x-?R%Pt=g0*2G zd~56UE(+}Xjyro7Jtd{c*#~6=(v0SuxN5n(2%54#qB1~dTcw@ zZhRaRXd%vd5PPl_jqwqC8giwZIE!_bld=oIWnWO`<;ufdHzjT<)M_~YrH*<9`QWuQ zKh*7W>Z0yy93z*iPEmclv>1Wmfj_)L&z`eV`J%R@)iyZlyx4MjrDVzovUhJN;qv6{ ze1K0Uu=mM&W5%yitLk(h^36}e_1X*pjiR#DOg4DE&=%C2U~K~|C*q1Lc2cyhlLG<* zw6+y65L;Q)gEMjvSg<4aw6x|OAG}2Xd1dSbisS9-a z5bJZ}D>6imrF}u7So>T`M*l#op_;9w+moV?h!4z`w@D7nfyv4_z$7ED-co?h+V-`*PY?n8W9uppai5mZ3 zY<9Rc*Hxyh8`wymO5E2#)TeQPwbZH~uv2MuI0t>RPY3o2R{sjxqvSdoGue0wN&N=% zBWX!ByZY}P80EQ=c8lqUeBX{ZPv|Y;a!YB!z0tC@X3GHNL5NW`uJ`{_)>(i>)qIbC z0qIWZ?hue}>F)0C29;(30qI(5N$F6!yFo%yq`N^Gt6|*kCfNj^Ek*uV|j%9;{Dl0ZbN+a-q@5gRP$1HpA`)+|Bes#n8cL* z3QJV>OL$HQY*;n&hTYk)Uhi^H^u*TD+)g+3)4NP+AooH@L1xYpf$Y~`OdMfuqP9H9 zcHhdY8pKcP+R7?z1@uO#PD?Fcu8eLAzuI;UT5*!T%A5^*(Tcv)`N?f20P1K=`|$nc zMrQ%>D!~rx40_{AN(S<8=ZIwTw(U~?IQzJ}PJ&B}E*iOrqF~IZGh=*wCL+(oG%+4} z6bWsB45Gf_LQwO3Ez`vNF)g0Cpw)az)ufI`Ej2q`4$#@~XTPyqry1 z6k5OBN%k*CaU+aaXc|suszwztWDm&MjT{(*W?zE{ULCQ8t3r|`ai7 z_s??;6%GGj%{MTvohJyyZCRap$F-7D^ssl60WAT_aS5o^jAE_pffd1?$SGd^XIEr(Y2;0(H=24(Q3e;$p)yRjl z4{VQyPoS=_b~C9AGhg6sU!_X+NWySJe(q|<)D+zwGA_Hl|J88j4AJeIybrW8&j!@S zDaR0A|4jd9@4X`QsTb|<39`wA7Qc)Gk-^|T;^Pa|EV>TLv>c>s3cSc&H$vW-nxkF#BrnYNx0JckRo~Z2lKi7Y>WQs zw;1%6Wee?%ymO6<8|T`yA4D^X5Ui->uVMF}xr}&xZ4yeRGgft~y&-l<$ z!6i2qe)da?V#bDSnXGSSLTJuW1NESjd==iYItYj?nCP2C*%Lt+ltJeGt;X2n6=(%~ z=4xJr!NGM&2|Y10QHhI;+SI~5L6URn*xC{d-ym@@#De9G-a=s?|JEjdP1C; z_RJMjQtgU$pm{5#1tlD+K%?60_Tk-__9ErBn~BRTcE=wXkHaY6NW1(0i$Ow z$y{&P&7~{zcEgHFWnsR^Z=s<3+rmfZb! z{4S_F?tUCN1Kw^l2XRNaE6^8rHU@3*cAd6DH&|q8bYdo>7i}KG#!L|dLB!TL4xNq9 z)z1W(1|t&`m{eRxBU5l%qqOtWw4wTI!%&*(}`J2z$A z3`|Z?_CuY}*)^^glsOvF(rSWoX!D88C^J(rzcDz{DrH>95lpNXamlBQeN;#xnNmk- zqnL_-tIfv?4}T@rLLb!$3@V@jbt46*sMX74R4RB^zKQ40C8%*Vg(cvY3^8Q1oZUzN zV*9)!O4SpU?`rlmzAsE> zzS%bJlbaFqU=*>f0Y@&B+Eg@sxTjbR12U8K;;BP;u@3cJj7e`gO10DL;Ueo;%o>!JqbQ=|GugVz_I+&3 zU+1#*Q3qd{*^I*bzjU1S7Q;bEm#ZOEIylwkb6JpL9rB37>qG{5S*4eFE9~E|J1V$C)UTz+dvUnZMOi+b=#h{_ ztFsRqe2%f6f{{uyYHqcN;!Sf*(2s4uuAZP3koRLH;cZ&7FeIqolnjvU~ozDwSW-puEpzS0jGDjn_(UpKY2&Ezf+f5L7n7f zjxxUf08+^x`4fO_w0>J16j8EJjPk}}^_ui(RG-NOyN9D4T39l<4cl;uKx3lA4SPR8 z-pIGSg=YfDUj_Zf4weX^t*V{&o!(2;6j8rljt! zc&VL*&6-;Lj!@D#JRLeWeprmVku3O;YQx2%yO52oh7;NBo}a!5pO@>jtkp6*+rAaZ zY*5*wo)t$tH%W279*>36P}i$Qu%3{4O;@lhjapy`eE&l1naszOMxSDo+x$BCG04Uy z(MexC(Q5@Wgq=#V6c>OtThvG1V0-*7)Tnj5n00GncO(JDJ_m6a-NQniAR7vMsAfZP zj=mq9w>m9iMm~G+S??Ww#%BxL!6c>oUQF%v#m>qL?;#V4#Qh?#+aexSp}zS%G;ViL zU3~l6M?Qwv@8nMie+J%2)i<%iIydk2(x8QPkgMf$FUDVDGd&N#HA>2Awrcps3Lc@2;$+njN8=-3-G& zx5vjofS?pr3`%=S6-mzzUZYo$=I|{%Y$3iVuujH9mlUDezRh$SZ%}T0^)`V$P-Jqx z^uxt6GWLC;7lremk{IWY{A*N7omFg|e>~**OXjk?^^NIU=C^X}MWN!l%Gc$l;M(JCtNn64 zfyF$KTHcMo$b@(~lKU9-=MF-k5D+xxYkUqiB|NGR-uuqqCGoaQeO?(4Rh{)`3th8c zuM$81-K&p%{BNv?d`Wnzj=*a&Dv`-cS_G%rdv+6kHfZ{NeCpfMZ=C|Qxt}g&jShnJz)X_ZwW2TY z)vn&?+!LfzqW$a|k3eVvnZUdeWwb4kF?a=5o&YGj8* z8v^@%YMaSBBrXmXjpN+Fdyw;o10yuKO;LiW18(3;8Y_2jlRR~+*JOIppOZ;{u?z`rvK&taDGk>e!Wygdhh_ z1=aJg1_tj4>78VRpGZK4Bd_eZ?UIzWWHMZfRSqK_|C3M*YC^aDclki{K%8K5#`Z?IYS-}B_?uj|7jyw9M7`+#!K|?4HKuXZ7@O?vSb-y< zqA@b+>456*hHt{1A`z%D;k>Axc~Qd228;SrD!M~|mIIt=AS6hkysHf+UkMXUFpcAw z#K(T61rz5SLSDiqqm6KuiBF9SS0%fl0MJE#RWJCZ2K{MIR{w^9>4XRXG~<8*EV+Q% zS3n$Vf;*+^^f_ki7*r@|+jO_YNoG^FU}crm4yF8J;) zwFwzym_5>cC&Bo_wD}@0LX{Dc>BK$dMwBB#*1h|47{UzO%HeBM6vPnUB<#Ml!DA6u z?q;4!eS;XntPaAg79AK;D69w-?eto#5z{GRp0b{T@*{aTcxCCUPjJ^E7+Y&no`K%vk3$IiLy+dz8|I2Tl7s5BK3-WIkV z;8aAQqC7gdnbFEfupg?>FGKf}Vo)c(a>%>3G)ibTNVz@pAv zV6n;2ZQEgqy^K@x<9n8Lr$a8RQK_kIo4NNm=iDRb1+{CM+O^+Y$7MEw#R;L%hgu1u zqkAu>q&%D)K3Cp^V7Ufri77kIII4ed6Nk##0R>5(PpHr82kUAsPGH~E?-3}MufOGR zKWOk6zmq~Ry{(`Q?3hszKMW~lOwpW^qglN&KdKzN`GNC4Rn0}o$@@uDHh}7 zJ{I0y!d|IX|6drYH3H_B>@`??!tN!dCFS%<%njGgwxjE8l?7IeC3}~zMn|?&v`n>!IFWqJ2q`^AQzb4TVCjSZnbGAi4h9nvCJI+8kCC1?{N% ziF)0#8I~9~QMObI+q$OLXLxUrALNF>s*X={PEK3+7KGO zJ6?&H&gCFl6p9&THybTP=pR5fX)&pt;OPBr{DkVaPS369s~(_o@B{&ITeJ9SHd0JB zV(!}xa5%PI5AJOf`EN70uB6KX^51e8rShB#(9=#^YO;u-yHY>luurF-YZfI*jpDQu_GsKD;*xh~G% zushbC%OZCA@V!9s4{H^d>7kq##g{Fiz}0NVKLu+mm$5;pOImFsm)9_b9C{sNyqiWo z+~(9Hrc*NC()SVqmFQ%KU!&o*2_q$6iieZQ30#YkrB2iESKZYP3bn%(4A+!iMFE>j5@VQ#{_uSiAU9C1#1QNN? z)+!`GN8xu@(dS39#7++Uk!icO33OE^(8yaat7R0hi!*!I5t&`b_7`jHH|Oe(=H49X zwh6W@3+eA?v4E_Hm2=Cv$SE4TLO!UzQXxw19da+)Jw+0XlICmfYA}5L zpYO6E%kiOJZc9+Hboh@iC@rAVBeULLrUF|YK-HcF7Zd^4jInCKcUnpp6lB>YQN!M# zb5X=4M8sT5ZA$Z@O}S3p7i*s+=U_{bi)TyLNpXLbYE%?^-cVMbec9PHg1G&7LFa&K z*y}cJUz`;Fns6FB>@0YOF!j}xr}>%_)g+iYlOr`QPhlbP*gwTb2@ZV3AKH3@D(VFz z57eZlhaX}}WWh#n*cprygh`%oqn;EDO#YF|6N0ba?1kkF?%j87(yI|?cuOr$=QgtT z?$faNB<2^*Exz@F8MExI%F9bv7A7WH4cR%a5F+^S9>s;kqy9p~#l_d89z5C7s51>2 zy@q9h+j^9)3$kjPvhwyHxW^5NcxMQy4}e^--(>71-5o-z$ z`s|#IK`uUqY%=JeiV9`Ja2v?-kKiNvq*Np_J%|Fo@)0lHqX?M3X8Edsz zNHtbEOYTBP!xe%|vWHsCNb|eXc^$Toq3g6q$ai#ySXJD?@}TFCjbZ&{BJQoiRlv}i zR|1>ghUeE~exx2ti7iLdSH_)gnrHc{e148BvWAVe9dc~G+^h?tM97tuNHaJnYt5H( zl|NA0;%ds=wOzjANPTbpBZOwsx;cYVfl^v8oGs}>{uLE(XCh;fL6~hFI7b<#GU&Cx zv^Ufzs@PTSylA9!Nmqmczk-}?)KZ{l(f1p%37D*0=|=1;W)EgX=3{=d#A+etJI|@f(s+a#r=`RUGkGAUp13>8hbhDwT{-yw0r5%$qD2BzK(?k#iv0)5%$l zx3db&gTvTSH)`02*oDU@sE1gg7Z~c^8SVRymOs*v*IiI3001Y%87)(dkB{Laz8C=g z09mlr^%z5**@_{16lEdMOOVwXVU0kL?PCtbA*heBrm*+V9&(U~9)*60;l0{tb?^5JS&ih3S1Juk6`zE{iWI&1irL0FW>~l%Kukq{0F7!CaFr5d1^z*Ju7mbGb%#A8nx+-Fv7VHfOe?gL}u%M=$Jc)XFI+cVNjsunn zU_4=d4|ohsO{12GOJ-;6z)bdbrQOhEZMBD1el1+C?^(xp)HYFc`dEn(Pq(?2bmOLD zA2O*J?BAQsqg;{n+MIAKuPW%H+_BawRG5FJ$slRx0$155b`h7OdOkJ;$TNz%>?0t8 zU&&B6COfFwaOM{Xkca1U<{2=dljncE&KlhYDI1#%s_pkGB&D;Rr|scFrv}x<#a2p) zP{)7~<zS?Ixd83{ZYRvLRY?=CM?00|rN3p{QsIl9O^{5*QbtNpk$J|=$Fmft4raF;DvHyO`Z<U<-Nk@^6BxVhp+&St#bwPv2~a>SRIQ?>i+@wa%F zEa`h?=H+hbD-HxXV`rt^g7R zO6_f4AEBaVd)ua7`Y?_nt~eIK4a!PM^T5IUqJeA2>eX$5>eY};*pk|Rfo9gqt|q!J zJWE($JI#^5N*_>Kw%v#URzWR@T*72ad8Qihy^gQr5MXH{7z6tYx6txYw1)%?W0NaXNDeu)5X?RpE0i zTANvkB(I9${uV>LZ}V3E;aEO4kccC z5g*RI7;goC-nRd(L*@UcNMo^e^VE^G?F{OKwLMR-(L771+ts8uhp$3f<_+8Ql@mDT z>L+j&-{)F#5AKg@QxJ{mp3E@xN3%P@;-MN`HtUk97pNP5qAtIPt5s-tk<6FYgnT<= z7k2vt^K?{NyAT!xX-`MLaDf7-$U{Nn!2HJvJY>N|9x?_%r2mHeKmbVg8rx`)4vyb_R%o0Ky{gv@D{kP82r6GRhAc>J7b%y(| z5&$4Suo~1pOHKASquSc_P)BqCz=#v-fMp1UGxd8LHY<|f)3`f?%^j6Y@WbO%=a+w0`Wcg#3{@Zkdoyd zeDD$Tp!I(TeE&JD$LkqW5szBIUga|8D4lOtgfbfX|ig zK_@jD=KnT;|7{Zj03e_5zac-6OXV>UD#&W-!S4SqZT>^&2aajq!+m-rpz);#yZ?Pp z59wzd|B#StexQ=!J)CU`4tttyK!R%mF+&Vfe^XBJ4DV1dg1vTw7l{tKZ3|#yt$Vzd!hg3?+tk} zoqb}+@LLGX{r^?qfJ5SLH3Wo$^q{}Xz5j&#Knq{c#Hz%-)+h7de+bAmKhVw(sN^Q{JgBrQfzw03y`ysI06L1i84+f+Xfsl6|Yj1yp z5PB#1UjBFLEVTL11pD4e1rI@#m_U?BK2d_2_6R?KPv+`RK>o~swK8mxJXDI@79q51 z_P=tpd=ya0*2CxZzj^$B%V(GS|0I9|u@qr|_SPQ~VPbJsV?xY)38}qTPjdGyxK9M! ze$4s9HX-yu5k#g8iraoHJJAjyH2+74j16>B0S9vYr%wDJ^4-?^78u?295nWid<7y0 z_CCrnK}@^&_Z9A)eR38GX*67r?ke-dh_-=yIB1vWq4;gPgwQ2}_cEnX#($gYlgEZ9 w3X+E*U-p8ah&^pYiiN7iT4~3Z~R{#J2 delta 26989 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 \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="`dirname "$PRG"`/$link" + fi + done + + saveddir=`pwd` + + M2_HOME=`dirname "$PRG"`/.. + + # make it fully qualified + M2_HOME=`cd "$M2_HOME" && pwd` + + cd "$saveddir" + # echo Using m2 at $M2_HOME +fi + # For Cygwin, ensure paths are in UNIX format before anything is touched if $cygwin ; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --unix "$M2_HOME"` [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` [ -n "$CLASSPATH" ] && @@ -85,6 +114,8 @@ fi # For Mingw, ensure paths are in UNIX format before anything is touched if $mingw ; then + [ -n "$M2_HOME" ] && + M2_HOME="`(cd "$M2_HOME"; pwd)`" [ -n "$JAVA_HOME" ] && JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" fi @@ -132,9 +163,12 @@ if [ -z "$JAVA_HOME" ] ; then echo "Warning: JAVA_HOME environment variable is not set." fi +CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher + # traverses directory structure from process work directory to filesystem root # first directory with .mvn subdirectory is considered project base directory find_maven_basedir() { + if [ -z "$1" ] then echo "Path not specified to find_maven_basedir" @@ -154,7 +188,7 @@ find_maven_basedir() { fi # end of workaround done - printf '%s' "$(cd "$basedir"; pwd)" + echo "${basedir}" } # concatenates all lines of a file @@ -164,16 +198,11 @@ concat_lines() { fi } -BASE_DIR=$(find_maven_basedir "$(dirname $0)") +BASE_DIR=`find_maven_basedir "$(pwd)"` if [ -z "$BASE_DIR" ]; then exit 1; fi -MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}; export MAVEN_PROJECTBASEDIR -if [ "$MVNW_VERBOSE" = true ]; then - echo $MAVEN_PROJECTBASEDIR -fi - ########################################################################################## # Extension to allow automatically downloading the maven-wrapper.jar from Maven-central # This allows using the maven wrapper in projects that prohibit checking in binary data. @@ -187,16 +216,16 @@ else echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." fi if [ -n "$MVNW_REPOURL" ]; then - wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" + jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" else - wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" + jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" fi while IFS="=" read key value; do - case "$key" in (wrapperUrl) wrapperUrl="$value"; break ;; + case "$key" in (wrapperUrl) jarUrl="$value"; break ;; esac done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" if [ "$MVNW_VERBOSE" = true ]; then - echo "Downloading from: $wrapperUrl" + echo "Downloading from: $jarUrl" fi wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" if $cygwin; then @@ -204,49 +233,42 @@ else fi if command -v wget > /dev/null; then - QUIET="--quiet" if [ "$MVNW_VERBOSE" = true ]; then echo "Found wget ... using wget" - QUIET="" fi if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - wget $QUIET "$wrapperUrl" -O "$wrapperJarPath" + wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" else - wget $QUIET --http-user="$MVNW_USERNAME" --http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapperJarPath" + wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" fi - [ $? -eq 0 ] || rm -f "$wrapperJarPath" elif command -v curl > /dev/null; then - QUIET="--silent" if [ "$MVNW_VERBOSE" = true ]; then echo "Found curl ... using curl" - QUIET="" fi if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - curl $QUIET -o "$wrapperJarPath" "$wrapperUrl" -f -L + curl -o "$wrapperJarPath" "$jarUrl" -f else - curl $QUIET --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o "$wrapperJarPath" "$wrapperUrl" -f -L + curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f fi - [ $? -eq 0 ] || rm -f "$wrapperJarPath" + else if [ "$MVNW_VERBOSE" = true ]; then echo "Falling back to using Java to download" fi - javaSource="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" - javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" + javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" # For Cygwin, switch paths to Windows format before running javac if $cygwin; then - javaSource=`cygpath --path --windows "$javaSource"` javaClass=`cygpath --path --windows "$javaClass"` fi - if [ -e "$javaSource" ]; then - if [ ! -e "$javaClass" ]; then + if [ -e "$javaClass" ]; then + if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then if [ "$MVNW_VERBOSE" = true ]; then echo " - Compiling MavenWrapperDownloader.java ..." fi # Compiling the Java class - ("$JAVA_HOME/bin/javac" "$javaSource") + ("$JAVA_HOME/bin/javac" "$javaClass") fi - if [ -e "$javaClass" ]; then + if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then # Running the downloader if [ "$MVNW_VERBOSE" = true ]; then echo " - Running MavenWrapperDownloader.java ..." @@ -260,10 +282,16 @@ fi # End of extension ########################################################################################## +export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} +if [ "$MVNW_VERBOSE" = true ]; then + echo $MAVEN_PROJECTBASEDIR +fi MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" # For Cygwin, switch paths to Windows format before running java if $cygwin; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --path --windows "$M2_HOME"` [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` [ -n "$CLASSPATH" ] && @@ -283,5 +311,6 @@ exec "$JAVACMD" \ $MAVEN_OPTS \ $MAVEN_DEBUG_OPTS \ -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.home=${M2_HOME}" \ "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/mvnw.cmd b/mvnw.cmd index 474c9d6b7..23b7079a3 100644 --- a/mvnw.cmd +++ b/mvnw.cmd @@ -1,187 +1,188 @@ -@REM ---------------------------------------------------------------------------- -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. -@REM ---------------------------------------------------------------------------- - -@REM ---------------------------------------------------------------------------- -@REM Apache Maven Wrapper startup batch script, version 3.1.1 -@REM -@REM Required ENV vars: -@REM JAVA_HOME - location of a JDK home dir -@REM -@REM Optional ENV vars -@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands -@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending -@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven -@REM e.g. to debug Maven itself, use -@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files -@REM ---------------------------------------------------------------------------- - -@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' -@echo off -@REM set title of command window -title %0 -@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' -@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% - -@REM set %HOME% to equivalent of $HOME -if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") - -@REM Execute a user defined script before this one -if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre -@REM check for pre script, once with legacy .bat ending and once with .cmd ending -if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %* -if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %* -:skipRcPre - -@setlocal - -set ERROR_CODE=0 - -@REM To isolate internal variables from possible post scripts, we use another setlocal -@setlocal - -@REM ==== START VALIDATION ==== -if not "%JAVA_HOME%" == "" goto OkJHome - -echo. -echo Error: JAVA_HOME not found in your environment. >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -:OkJHome -if exist "%JAVA_HOME%\bin\java.exe" goto init - -echo. -echo Error: JAVA_HOME is set to an invalid directory. >&2 -echo JAVA_HOME = "%JAVA_HOME%" >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -@REM ==== END VALIDATION ==== - -:init - -@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". -@REM Fallback to current working directory if not found. - -set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% -IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir - -set EXEC_DIR=%CD% -set WDIR=%EXEC_DIR% -:findBaseDir -IF EXIST "%WDIR%"\.mvn goto baseDirFound -cd .. -IF "%WDIR%"=="%CD%" goto baseDirNotFound -set WDIR=%CD% -goto findBaseDir - -:baseDirFound -set MAVEN_PROJECTBASEDIR=%WDIR% -cd "%EXEC_DIR%" -goto endDetectBaseDir - -:baseDirNotFound -set MAVEN_PROJECTBASEDIR=%EXEC_DIR% -cd "%EXEC_DIR%" - -:endDetectBaseDir - -IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig - -@setlocal EnableExtensions EnableDelayedExpansion -for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a -@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% - -:endReadAdditionalConfig - -SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" -set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" -set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain - -set WRAPPER_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" - -FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( - IF "%%A"=="wrapperUrl" SET WRAPPER_URL=%%B -) - -@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central -@REM This allows using the maven wrapper in projects that prohibit checking in binary data. -if exist %WRAPPER_JAR% ( - if "%MVNW_VERBOSE%" == "true" ( - echo Found %WRAPPER_JAR% - ) -) else ( - if not "%MVNW_REPOURL%" == "" ( - SET WRAPPER_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" - ) - if "%MVNW_VERBOSE%" == "true" ( - echo Couldn't find %WRAPPER_JAR%, downloading it ... - echo Downloading from: %WRAPPER_URL% - ) - - powershell -Command "&{"^ - "$webclient = new-object System.Net.WebClient;"^ - "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ - "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ - "}"^ - "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%WRAPPER_URL%', '%WRAPPER_JAR%')"^ - "}" - if "%MVNW_VERBOSE%" == "true" ( - echo Finished downloading %WRAPPER_JAR% - ) -) -@REM End of extension - -@REM Provide a "standardized" way to retrieve the CLI args that will -@REM work with both Windows and non-Windows executions. -set MAVEN_CMD_LINE_ARGS=%* - -%MAVEN_JAVA_EXE% ^ - %JVM_CONFIG_MAVEN_PROPS% ^ - %MAVEN_OPTS% ^ - %MAVEN_DEBUG_OPTS% ^ - -classpath %WRAPPER_JAR% ^ - "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^ - %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* -if ERRORLEVEL 1 goto error -goto end - -:error -set ERROR_CODE=1 - -:end -@endlocal & set ERROR_CODE=%ERROR_CODE% - -if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost -@REM check for post script, once with legacy .bat ending and once with .cmd ending -if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat" -if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd" -:skipRcPost - -@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' -if "%MAVEN_BATCH_PAUSE%"=="on" pause - -if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE% - -cmd /C exit /B %ERROR_CODE% +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Maven Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM M2_HOME - location of maven2's installed home dir +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %* +if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %* +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" + +FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( + IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + if "%MVNW_VERBOSE%" == "true" ( + echo Found %WRAPPER_JAR% + ) +) else ( + if not "%MVNW_REPOURL%" == "" ( + SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" + ) + if "%MVNW_VERBOSE%" == "true" ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %DOWNLOAD_URL% + ) + + powershell -Command "&{"^ + "$webclient = new-object System.Net.WebClient;"^ + "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ + "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ + "}"^ + "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ + "}" + if "%MVNW_VERBOSE%" == "true" ( + echo Finished downloading %WRAPPER_JAR% + ) +) +@REM End of extension + +@REM Provide a "standardized" way to retrieve the CLI args that will +@REM work with both Windows and non-Windows executions. +set MAVEN_CMD_LINE_ARGS=%* + +%MAVEN_JAVA_EXE% ^ + %JVM_CONFIG_MAVEN_PROPS% ^ + %MAVEN_OPTS% ^ + %MAVEN_DEBUG_OPTS% ^ + -classpath %WRAPPER_JAR% ^ + "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^ + %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat" +if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%"=="on" pause + +if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE% + +cmd /C exit /B %ERROR_CODE% From c780a86ff1bd30b1af0a271f30a1e949dc598476 Mon Sep 17 00:00:00 2001 From: sullis Date: Thu, 22 Feb 2024 21:33:54 -0800 Subject: [PATCH 035/167] fix Netty dependencies (#1935) --- .../org/asynchttpclient/netty/NettyTest.java | 23 +++++++++++++++++++ pom.xml | 16 +++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 client/src/test/java/org/asynchttpclient/netty/NettyTest.java diff --git a/client/src/test/java/org/asynchttpclient/netty/NettyTest.java b/client/src/test/java/org/asynchttpclient/netty/NettyTest.java new file mode 100644 index 000000000..05e82708d --- /dev/null +++ b/client/src/test/java/org/asynchttpclient/netty/NettyTest.java @@ -0,0 +1,23 @@ +package org.asynchttpclient.netty; + +import io.netty.channel.epoll.Epoll; +import io.netty.channel.kqueue.KQueue; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.EnabledOnOs; +import org.junit.jupiter.api.condition.OS; + +import static org.junit.jupiter.api.Assertions.assertTrue; + +public class NettyTest { + @Test + @EnabledOnOs(value = OS.LINUX) + public void epollIsAvailableOnLinux() { + assertTrue(Epoll.isAvailable()); + } + + @Test + @EnabledOnOs(value = OS.MAC) + public void kqueueIsAvailableOnMac() { + assertTrue(KQueue.isAvailable()); + } +} diff --git a/pom.xml b/pom.xml index e4aeb5388..1fcf89b5d 100644 --- a/pom.xml +++ b/pom.xml @@ -178,6 +178,14 @@ true + + io.netty + netty-transport-native-epoll + linux-aarch_64 + ${netty.version} + true + + io.netty netty-transport-native-kqueue @@ -186,6 +194,14 @@ true + + io.netty + netty-transport-native-kqueue + osx-aarch_64 + ${netty.version} + true + + io.netty.incubator netty-incubator-transport-native-io_uring From 347d68f7dcb2f2796bf1bec9bdd75d02f0cc0372 Mon Sep 17 00:00:00 2001 From: sullis Date: Thu, 22 Feb 2024 21:34:08 -0800 Subject: [PATCH 036/167] maven surefire 3.2.5 (#1934) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1fcf89b5d..d97648c71 100644 --- a/pom.xml +++ b/pom.xml @@ -285,7 +285,7 @@ org.apache.maven.plugins maven-surefire-plugin - 2.22.2 + 3.2.5 @{argLine} --add-exports java.base/jdk.internal.misc=ALL-UNNAMED From b80595e5b83467b464ccf4ed86dec1131b7c3c5c Mon Sep 17 00:00:00 2001 From: sullis Date: Thu, 22 Feb 2024 21:34:20 -0800 Subject: [PATCH 037/167] slf4j 2.0.12 (#1933) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d97648c71..7fa222947 100644 --- a/pom.xml +++ b/pom.xml @@ -60,7 +60,7 @@ 4.1.107.Final 0.0.25.Final - 2.0.9 + 2.0.12 2.0.1 1.4.11 24.0.1 From 314578852f5b8a33579f46cb95b8deffc64f0d23 Mon Sep 17 00:00:00 2001 From: sullis Date: Sat, 24 Feb 2024 09:56:18 -0800 Subject: [PATCH 038/167] use Netty leak detector extension (#1932) --- client/pom.xml | 6 ++++++ .../test/java/org/asynchttpclient/AbstractBasicTest.java | 3 +++ .../netty/NettyConnectionResetByPeerTest.java | 3 +++ .../test/java/org/asynchttpclient/testserver/HttpTest.java | 3 +++ pom.xml | 5 +++++ 5 files changed, 20 insertions(+) diff --git a/client/pom.xml b/client/pom.xml index 039e5d662..7a28070c4 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -96,6 +96,12 @@ test + + io.github.nettyplus + netty-leak-detector-junit-extension + test + + org.eclipse.jetty jetty-servlet diff --git a/client/src/test/java/org/asynchttpclient/AbstractBasicTest.java b/client/src/test/java/org/asynchttpclient/AbstractBasicTest.java index f556d7486..993f87905 100644 --- a/client/src/test/java/org/asynchttpclient/AbstractBasicTest.java +++ b/client/src/test/java/org/asynchttpclient/AbstractBasicTest.java @@ -15,6 +15,7 @@ */ package org.asynchttpclient; +import io.github.nettyplus.leakdetector.junit.NettyLeakDetectorExtension; import org.asynchttpclient.test.EchoHandler; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.ServerConnector; @@ -24,12 +25,14 @@ import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.TestInstance; +import org.junit.jupiter.api.extension.ExtendWith; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import static org.asynchttpclient.test.TestUtils.addHttpConnector; @TestInstance(TestInstance.Lifecycle.PER_CLASS) +@ExtendWith(NettyLeakDetectorExtension.class) public abstract class AbstractBasicTest { protected static final Logger logger = LoggerFactory.getLogger(AbstractBasicTest.class); protected static final int TIMEOUT = 30; diff --git a/client/src/test/java/org/asynchttpclient/netty/NettyConnectionResetByPeerTest.java b/client/src/test/java/org/asynchttpclient/netty/NettyConnectionResetByPeerTest.java index a315017a1..484b074a3 100644 --- a/client/src/test/java/org/asynchttpclient/netty/NettyConnectionResetByPeerTest.java +++ b/client/src/test/java/org/asynchttpclient/netty/NettyConnectionResetByPeerTest.java @@ -16,11 +16,13 @@ package org.asynchttpclient.netty; import io.github.artsok.RepeatedIfExceptionsTest; +import io.github.nettyplus.leakdetector.junit.NettyLeakDetectorExtension; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.DefaultAsyncHttpClient; import org.asynchttpclient.DefaultAsyncHttpClientConfig; import org.asynchttpclient.RequestBuilder; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.extension.ExtendWith; import java.io.IOException; import java.io.InputStream; @@ -34,6 +36,7 @@ import static org.junit.jupiter.api.Assertions.assertInstanceOf; +@ExtendWith(NettyLeakDetectorExtension.class) public class NettyConnectionResetByPeerTest { private String resettingServerAddress; diff --git a/client/src/test/java/org/asynchttpclient/testserver/HttpTest.java b/client/src/test/java/org/asynchttpclient/testserver/HttpTest.java index 44d31269f..b41b6ab1b 100644 --- a/client/src/test/java/org/asynchttpclient/testserver/HttpTest.java +++ b/client/src/test/java/org/asynchttpclient/testserver/HttpTest.java @@ -15,15 +15,18 @@ */ package org.asynchttpclient.testserver; +import io.github.nettyplus.leakdetector.junit.NettyLeakDetectorExtension; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.DefaultAsyncHttpClientConfig; +import org.junit.jupiter.api.extension.ExtendWith; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import static org.asynchttpclient.Dsl.asyncHttpClient; import static org.asynchttpclient.Dsl.config; +@ExtendWith(NettyLeakDetectorExtension.class) public abstract class HttpTest { protected static final String COMPLETED_EVENT = "Completed"; diff --git a/pom.xml b/pom.xml index 7fa222947..1e50f5d0c 100644 --- a/pom.xml +++ b/pom.xml @@ -112,6 +112,11 @@ pom import + + io.github.nettyplus + netty-leak-detector-junit-extension + 0.0.2 + From a30ffcad840db44ad170cabdd6cc4afbeccf1827 Mon Sep 17 00:00:00 2001 From: sullis Date: Sun, 25 Feb 2024 12:46:42 -0800 Subject: [PATCH 039/167] unit test for io_uring (#1937) --- .../src/test/java/org/asynchttpclient/netty/NettyTest.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/client/src/test/java/org/asynchttpclient/netty/NettyTest.java b/client/src/test/java/org/asynchttpclient/netty/NettyTest.java index 05e82708d..6f7e034b9 100644 --- a/client/src/test/java/org/asynchttpclient/netty/NettyTest.java +++ b/client/src/test/java/org/asynchttpclient/netty/NettyTest.java @@ -2,6 +2,7 @@ import io.netty.channel.epoll.Epoll; import io.netty.channel.kqueue.KQueue; +import io.netty.incubator.channel.uring.IOUring; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.EnabledOnOs; import org.junit.jupiter.api.condition.OS; @@ -15,6 +16,12 @@ public void epollIsAvailableOnLinux() { assertTrue(Epoll.isAvailable()); } + @Test + @EnabledOnOs(value = OS.LINUX) + public void ioUringIsAvailableOnLinux() { + assertTrue(IOUring.isAvailable()); + } + @Test @EnabledOnOs(value = OS.MAC) public void kqueueIsAvailableOnMac() { From 631c3b00658dd73374fed2cae9142d0c6a784d3e Mon Sep 17 00:00:00 2001 From: sullis Date: Fri, 1 Mar 2024 08:19:49 -0800 Subject: [PATCH 040/167] support brotli (#1938) --- .../netty/request/NettyRequestFactory.java | 12 +++-- .../org/asynchttpclient/netty/NettyTest.java | 13 ++++++ pom.xml | 46 ++++++++++++++++++- 3 files changed, 67 insertions(+), 4 deletions(-) diff --git a/client/src/main/java/org/asynchttpclient/netty/request/NettyRequestFactory.java b/client/src/main/java/org/asynchttpclient/netty/request/NettyRequestFactory.java index 317c4522f..07d1f76a2 100755 --- a/client/src/main/java/org/asynchttpclient/netty/request/NettyRequestFactory.java +++ b/client/src/main/java/org/asynchttpclient/netty/request/NettyRequestFactory.java @@ -17,6 +17,7 @@ import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; +import io.netty.handler.codec.compression.Brotli; import io.netty.handler.codec.http.DefaultFullHttpRequest; import io.netty.handler.codec.http.DefaultHttpRequest; import io.netty.handler.codec.http.HttpHeaderValues; @@ -173,13 +174,18 @@ public NettyRequest newNettyRequest(Request request, boolean performConnectReque String userDefinedAcceptEncoding = headers.get(ACCEPT_ENCODING); if (userDefinedAcceptEncoding != null) { if (config.isEnableAutomaticDecompression()) { - // we don't support Brotli ATM, for automatic decompression. - // For manual decompression by user, any encoding may suite, so leave untouched - headers.set(ACCEPT_ENCODING, filterOutBrotliFromAcceptEncoding(userDefinedAcceptEncoding)); + if (!Brotli.isAvailable()) { + // Brotli is not available. + // For manual decompression by user, any encoding may suite, so leave untouched + headers.set(ACCEPT_ENCODING, filterOutBrotliFromAcceptEncoding(userDefinedAcceptEncoding)); + } } } else if (config.isCompressionEnforced()) { // Add Accept Encoding header if compression is enforced headers.set(ACCEPT_ENCODING, GZIP_DEFLATE); + if (Brotli.isAvailable()) { + headers.add(ACCEPT_ENCODING, HttpHeaderValues.BR); + } } } diff --git a/client/src/test/java/org/asynchttpclient/netty/NettyTest.java b/client/src/test/java/org/asynchttpclient/netty/NettyTest.java index 6f7e034b9..9a0293be3 100644 --- a/client/src/test/java/org/asynchttpclient/netty/NettyTest.java +++ b/client/src/test/java/org/asynchttpclient/netty/NettyTest.java @@ -2,6 +2,7 @@ import io.netty.channel.epoll.Epoll; import io.netty.channel.kqueue.KQueue; +import io.netty.handler.codec.compression.Brotli; import io.netty.incubator.channel.uring.IOUring; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.EnabledOnOs; @@ -27,4 +28,16 @@ public void ioUringIsAvailableOnLinux() { public void kqueueIsAvailableOnMac() { assertTrue(KQueue.isAvailable()); } + + @Test + @EnabledOnOs(value = OS.LINUX) + public void brotliIsAvailableOnLinux() { + assertTrue(Brotli.isAvailable()); + } + + @Test + @EnabledOnOs(value = OS.MAC) + public void brotliIsAvailableOnMac() { + assertTrue(Brotli.isAvailable()); + } } diff --git a/pom.xml b/pom.xml index 1e50f5d0c..9849139fd 100644 --- a/pom.xml +++ b/pom.xml @@ -1,6 +1,6 @@ From a2118018c8e0618a92f9fd0affebc5773b4e355f Mon Sep 17 00:00:00 2001 From: sullis Date: Wed, 21 Aug 2024 10:00:04 -0700 Subject: [PATCH 067/167] brotli 1.17.0 (#1974) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ed8466618..1e10b9566 100644 --- a/pom.xml +++ b/pom.xml @@ -47,7 +47,7 @@ 4.1.112.Final 0.0.25.Final - 1.16.0 + 1.17.0 2.0.13 1.5.6-4 2.0.1 From fca9c6732838b3817a5ecca2b0aadcd6a62bd385 Mon Sep 17 00:00:00 2001 From: Aayush Atharva Date: Wed, 21 Aug 2024 22:37:31 +0530 Subject: [PATCH 068/167] Enable Dependabot (#1975) --- .github/dependabot.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..f4538d3c7 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,17 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file + +version: 2 +updates: + - package-ecosystem: "maven" + directories: + - "/" + schedule: + interval: "daily" + - package-ecosystem: "github-actions" + directories: + - "/" + schedule: + interval: "daily" From db5116baf58d01a72d1417af11b0fbff99b0877a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2024 22:45:03 +0530 Subject: [PATCH 069/167] Bump org.apache.maven.plugins:maven-surefire-plugin from 3.2.5 to 3.4.0 (#1979) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.2.5 to 3.4.0.

Release notes

Sourced from org.apache.maven.plugins:maven-surefire-plugin's releases.

3.3.0

Release Notes - Maven Surefire - Version 3.3.0

What's Changed

... (truncated)

Commits
  • 3ae062d [maven-release-plugin] prepare release surefire-3.4.0
  • f0de8c0 Bump org.htmlunit:htmlunit from 4.3.0 to 4.4.0
  • 817695a Bump org.apache.commons:commons-lang3 from 3.14.0 to 3.16.0
  • 675c02a Bump org.apache.commons:commons-compress from 1.26.2 to 1.27.0
  • 4bd36a1 [SUREFIRE-1385] Add new parameter "promoteUserPropertiesToSystemProperties" (...
  • 1d19ec8 [Doc] Failsafe Verify goal should mention failsafe
  • a93783a [SUREFIRE-2251] [REGRESSION] java.lang.NoSuchMethodException: org.apache.mave...
  • daa011b Bump org.assertj:assertj-core from 3.26.0 to 3.26.3
  • 805f6b7 Improve internal field order
  • 26ae10d Remove outdated invoker conditions
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.apache.maven.plugins:maven-surefire-plugin&package-manager=maven&previous-version=3.2.5&new-version=3.4.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1e10b9566..b847f2923 100644 --- a/pom.xml +++ b/pom.xml @@ -337,7 +337,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.2.5 + 3.4.0 @{argLine} --add-exports java.base/jdk.internal.misc=ALL-UNNAMED From a1caeeec385133309b3942a4bd60d2ace17c2aac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2024 22:45:48 +0530 Subject: [PATCH 070/167] Bump s4u/maven-settings-action from 2.2.0 to 3.0.0 (#1976) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [s4u/maven-settings-action](https://github.com/s4u/maven-settings-action) from 2.2.0 to 3.0.0.
Release notes

Sourced from s4u/maven-settings-action's releases.

v3.0.0

What's Changed

:fire: New features

  • Add support for custom repositories #319
  • Upgrade Node runtime to 20 #320
  • Use Node 20 by Action #322

:toolbox: Dependency updates

  • Bump eslint from 8.27.0 to 8.28.0 #259
  • Bump eslint from 8.28.0 to 8.29.0 #261
  • Bump eslint from 8.29.0 to 8.30.0 #262
  • Bump json5 from 2.2.1 to 2.2.3 #264
  • Bump eslint from 8.30.0 to 8.32.0 #265
  • Bump eslint from 8.32.0 to 8.33.0 #268
  • Bump eslint from 8.33.0 to 8.34.0 #271
  • Bump eslint from 8.34.0 to 8.35.0 #273
  • Bump eslint from 8.35.0 to 8.36.0 #275
  • Bump eslint from 8.36.0 to 8.37.0 #276
  • Bump @​xmldom/xmldom from 0.8.6 to 0.8.7 #277
  • Bump eslint from 8.37.0 to 8.38.0 #280
  • Bump eslint from 8.38.0 to 8.39.0 #281
  • Bump eslint from 8.39.0 to 8.40.0 #282
  • Bump eslint from 8.40.0 to 8.41.0 #284
  • Bump @​xmldom/xmldom from 0.8.7 to 0.8.8 #285
  • Bump eslint from 8.41.0 to 8.42.0 #286
  • Bump eslint from 8.42.0 to 8.43.0 #287
  • Fix npm audit - update semver and word-wrap #298
  • Bump eslint from 8.43.0 to 8.45.0 #295
  • Bump @​xmldom/xmldom from 0.8.8 to 0.8.10 #297
  • Bump eslint from 8.45.0 to 8.46.0 #300
  • Bump eslint from 8.46.0 to 8.47.0 #301
  • Bump eslint from 8.47.0 to 8.48.0 #304
  • Bump actions/checkout from 3 to 4 #305
  • Bump eslint from 8.48.0 to 8.49.0 #306
  • Bump @​actions/core from 1.10.0 to 1.10.1 #308
  • Bump eslint from 8.49.0 to 8.50.0 #309
  • Bump eslint from 8.50.0 to 8.51.0 #310
  • Bump @​babel/traverse from 7.20.1 to 7.23.2 #311
  • Bump eslint from 8.51.0 to 8.52.0 #312
  • Bump eslint from 8.52.0 to 8.53.0 #314
  • Bump eslint from 8.53.0 to 8.54.0 #315
  • Bump eslint from 8.54.0 to 8.55.0 #317
  • Bump eslint from 8.55.0 to 8.56.0 #318
  • Bump actions/setup-node from 3 to 4 #313
  • Bump actions/setup-java from 3 to 4 #316
  • Bump jest from 28.1.3 to 29.7.0 #307
  • Refresh dependencies by npm updates #321

... (truncated)

Commits
  • 7802f6a Update packages for release branch
  • 2300ba8 prepare release 3.0.0
  • d7a1cbd Use Node 20 by Action
  • ac4057b Refresh dependencies by npm updates
  • 89310fb Bump jest from 28.1.3 to 29.7.0
  • d8e9709 Upgrade Node runtime to 20
  • 879f94d Add support for custom repositories
  • 25432ff Bump actions/setup-java from 3 to 4
  • fa97405 Bump actions/setup-node from 3 to 4
  • b09cecc Bump eslint from 8.55.0 to 8.56.0
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=s4u/maven-settings-action&package-manager=github_actions&previous-version=2.2.0&new-version=3.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 51dc38f90..fbc5f03d0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,7 +27,7 @@ jobs: run: rm -f /home/runner/.m2/settings.xml - name: Maven Settings - uses: s4u/maven-settings-action@v2.2.0 + uses: s4u/maven-settings-action@v3.0.0 with: servers: | [{ From d5701ca89b4e140438ce3f77664c721d3938a217 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2024 22:46:04 +0530 Subject: [PATCH 071/167] Bump crazy-max/ghaction-import-gpg from 5.2.0 to 6.1.0 (#1977) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [crazy-max/ghaction-import-gpg](https://github.com/crazy-max/ghaction-import-gpg) from 5.2.0 to 6.1.0.
Release notes

Sourced from crazy-max/ghaction-import-gpg's releases.

v6.1.0

Full Changelog: https://github.com/crazy-max/ghaction-import-gpg/compare/v6.0.0...v6.1.0

v6.0.0

Full Changelog: https://github.com/crazy-max/ghaction-import-gpg/compare/v5.4.0...v6.0.0

v5.4.0

Full Changelog: https://github.com/crazy-max/ghaction-import-gpg/compare/v5.3.0...v5.4.0

v5.3.0

Full Changelog: https://github.com/crazy-max/ghaction-import-gpg/compare/v5.2.0...v5.3.0

Commits
  • 01dd5d3 Merge pull request #186 from crazy-max/dependabot/npm_and_yarn/actions/core-1...
  • ab787ac chore: update generated content
  • c63a019 build(deps): bump @​actions/core from 1.10.0 to 1.10.1
  • 81f63a8 Merge pull request #191 from crazy-max/dependabot/npm_and_yarn/babel/traverse...
  • 98ff7fb Merge pull request #190 from crazy-max/dependabot/npm_and_yarn/debug-4.3.4
  • e83a2ea Merge pull request #193 from crazy-max/dependabot/github_actions/actions/gith...
  • 2e40814 Merge pull request #192 from crazy-max/dependabot/npm_and_yarn/openpgp-5.11.0
  • 480319b chore: update generated content
  • 019a31d build(deps): bump actions/github-script from 6 to 7
  • 24f4ba9 build(deps): bump openpgp from 5.10.1 to 5.11.0
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=crazy-max/ghaction-import-gpg&package-manager=github_actions&previous-version=5.2.0&new-version=6.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fbc5f03d0..d6d171da6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,7 +37,7 @@ jobs: }] - name: Import GPG - uses: crazy-max/ghaction-import-gpg@v5.2.0 + uses: crazy-max/ghaction-import-gpg@v6.1.0 with: gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} passphrase: ${{ secrets.GPG_PASSPHRASE }} From 65c8aa43dc970481ddfda746de091f702b757fe4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2024 22:50:25 +0530 Subject: [PATCH 072/167] Bump com.google.errorprone:error_prone_core from 2.25.0 to 2.30.0 (#1978) Bumps [com.google.errorprone:error_prone_core](https://github.com/google/error-prone) from 2.25.0 to 2.30.0.
Release notes

Sourced from com.google.errorprone:error_prone_core's releases.

Error Prone 2.30.0

New checks:

Closed issues: #632, #4487

Full changelog: https://github.com/google/error-prone/compare/v2.29.2...v2.30.0

Error Prone 2.29.2

This release contains all of the changes in 2.29.0 and 2.29.1, plus:

Full Changelog: https://github.com/google/error-prone/compare/v2.29.1...v2.29.2

Error Prone 2.29.1

This release contains all of the changes in 2.29.0, plus:

Full Changelog: https://github.com/google/error-prone/compare/v2.29.0...v2.29.1

Error Prone 2.29.0

New checks:

Closed issues: #4318, #4429, #4467

Full Changelog: https://github.com/google/error-prone/compare/v2.28.0...v2.29.0

Error Prone 2.28.0

Error Prone nows supports the latest JDK 23 EA builds (#4412, #4415).

Closed issues:

  • Improved errors for invalid check severities (#4306).
  • Fix a crash with nested instanceof patterns (#4349).
  • Fix a crash in JUnitIncompatibleType (#4377).
  • In ObjectEqualsForPrimitives, don't suggest replacing equal with == for floating-point values (#4392).

New checks:

... (truncated)

Commits
  • 5ada179 Release Error Prone 2.30.0
  • af175b0 Don't fire the CanIgnoreReturnValueSuggester for `dagger.producers.Producti...
  • ba8f9a2 Do not update getters that override methods from a superclass.
  • a706e8d Add ability to suppress warning for the entire AutoValue class
  • 86df5cf Convert some simple blocks to return switches using yield
  • 474554a Remove // fall out comments, which are sometimes used to document an empty ...
  • ac7ebf5 Handle var in MustBeClosedChecker
  • ccd3ca6 Add handling of toBuilder()
  • d887307 Omit some unnecessary break statements when translating to -> switches
  • fe07236 Add Error Prone check for unnecessary boxed types in AutoValue classes.
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.google.errorprone:error_prone_core&package-manager=maven&previous-version=2.25.0&new-version=2.30.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b847f2923..d5478a05a 100644 --- a/pom.xml +++ b/pom.xml @@ -322,7 +322,7 @@ com.google.errorprone error_prone_core - 2.25.0 + 2.30.0 com.uber.nullaway From fb20095a7066c709b5f71a194bd263131b994987 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2024 23:06:20 +0530 Subject: [PATCH 073/167] Bump org.apache.maven.plugins:maven-source-plugin from 3.2.1 to 3.3.1 (#1981) Bumps [org.apache.maven.plugins:maven-source-plugin](https://github.com/apache/maven-source-plugin) from 3.2.1 to 3.3.1.
Commits
  • f80596e [maven-release-plugin] prepare release maven-source-plugin-3.3.1
  • 7626998 Bump apache/maven-gh-actions-shared from 3 to 4
  • 83c963c Bump org.apache.maven.plugins:maven-plugins from 39 to 41 (#18)
  • 40ae495 Bump org.codehaus.plexus:plexus-archiver from 4.8.0 to 4.9.1 (#20)
  • 073462b Bump org.apache.maven:maven-archiver from 3.6.0 to 3.6.1 (#21)
  • 0b1c823 Fix typos in AbstractSourceJarMojo exception
  • 099c65a [MSOURCES-142] Bump org.codehaus.plexus:plexus-archiver from 4.7.1 to 4.8.0 (...
  • 1edeea4 [MSOURCES-139] Fix typo in AbstractSourceJarMojo exception
  • 436966e [maven-release-plugin] prepare for next development iteration
  • 02a9847 [maven-release-plugin] prepare release maven-source-plugin-3.3.0
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.apache.maven.plugins:maven-source-plugin&package-manager=maven&previous-version=3.2.1&new-version=3.3.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d5478a05a..ffb0ffbed 100644 --- a/pom.xml +++ b/pom.xml @@ -368,7 +368,7 @@ org.apache.maven.plugins maven-source-plugin - 3.2.1 + 3.3.1 attach-sources From 5e3ff99012331b0889f5e378735c63af8345803a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2024 23:06:30 +0530 Subject: [PATCH 074/167] Bump com.uber.nullaway:nullaway from 0.10.10 to 0.11.2 (#1980) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [com.uber.nullaway:nullaway](https://github.com/uber/NullAway) from 0.10.10 to 0.11.2.
Release notes

Sourced from com.uber.nullaway:nullaway's releases.

NullAway 0.11.2

  • JSpecify: add another bailout check for raw types (#1021)
  • JSpecify: handle intersection type in one place (#1015)
  • JSpecify: fix for crash with wildcard types (#1020)
  • Maintenance:

NullAway 0.11.1

  • Fix issue 1008 (#1009)
  • JSpecify: read upper bound annotations from bytecode and add tests (#1004)
  • Fix crash with suggested suppressions in JSpecify mode (#1001)
  • Update to JSpecify 1.0 and use JSpecify annotations in NullAway code (#1000)
  • Expose @​EnsuresNonNull and @​RequiresNonNull in annotations package (#999)
  • Don't report initializer warnings on @​NullUnmarked constructors / methods (#997)
  • Strip annotations from MethodSymbol strings (#993)
  • JSpecify: fix crashes where declared parameter / return types were raw (#989)
  • JSpecify: Handle @​nullable elements for enhanced-for-loops on arrays (#986)
  • Features/944 tidy stream nullability propagator (#985)
  • Tests for loops over arrays (#982)
  • Bug fixes for array subtyping at returns / parameter passing (#980)
  • JSpecify: Handle @​nonnull elements in @​nullable content arrays (#963)
  • Don't report @​nullable type argument errors for unmarked classes (#958)
  • External Library Models: Adding support for Nullable upper bounds of Generic Type parameters (#949)
  • Refactoring / code cleanups:
    • Test on JDK 22 (#992)
    • Add test case for @​nullable Void with override in JSpecify mode (#990)
    • Enable UnnecessaryFinal and PreferredInterfaceType EP checks (#991)
    • Add missing @​test annotation (#988)
    • Fix typo in variable name (#987)
    • Remove AbstractConfig class (#974)
    • Fix Javadoc for MethodRef (#973)
    • Refactored data clumps with the help of LLMs (research project) (#960)
  • Build / CI tooling maintenance:
    • Various cleanups enabled by bumping minimum Java and Error Prone versions (#962)
    • Disable publishing of snapshot builds from CI (#967)
    • Update Gradle action usage in CI workflow (#969)
    • Update Gradle config to always compile Java code using JDK 17 (#971)
    • Update JavaParser to 3.26.0 (#970)
    • Reenable JMH benchmarking in a safer manner (#975)
    • Updated JMH Benchmark Comment Action (#976)
    • Update to Gradle 8.8 (#981)
    • Update to Error Prone 2.28.0 (#984)
    • Update to Gradle 8.9 (#998)
    • Update to WALA 1.6.6 (#1003)

NullAway 0.11.0

IMPORTANT: Support for JDK 8 is dropped and NullAway now requires ErrorProne 2.14.0 or higher.

  • Delete OptionalEmptinessHandler method that is no longer needed (#954)

... (truncated)

Changelog

Sourced from com.uber.nullaway:nullaway's changelog.

Version 0.11.2

  • JSpecify: add another bailout check for raw types (#1021)
  • JSpecify: handle intersection type in one place (#1015)
  • JSpecify: fix for crash with wildcard types (#1020)
  • Maintenance:

Version 0.11.1

  • Fix issue 1008 (#1009)
  • JSpecify: read upper bound annotations from bytecode and add tests (#1004)
  • Fix crash with suggested suppressions in JSpecify mode (#1001)
  • Update to JSpecify 1.0 and use JSpecify annotations in NullAway code (#1000)
  • Expose @​EnsuresNonNull and @​RequiresNonNull in annotations package (#999)
  • Don't report initializer warnings on @​NullUnmarked constructors / methods (#997)
  • Strip annotations from MethodSymbol strings (#993)
  • JSpecify: fix crashes where declared parameter / return types were raw (#989)
  • JSpecify: Handle @​nullable elements for enhanced-for-loops on arrays (#986)
  • Features/944 tidy stream nullability propagator (#985)
  • Tests for loops over arrays (#982)
  • Bug fixes for array subtyping at returns / parameter passing (#980)
  • JSpecify: Handle @​nonnull elements in @​nullable content arrays (#963)
  • Don't report @​nullable type argument errors for unmarked classes (#958)
  • External Library Models: Adding support for Nullable upper bounds of Generic Type parameters (#949)
  • Refactoring / code cleanups:
    • Test on JDK 22 (#992)
    • Add test case for @​nullable Void with override in JSpecify mode (#990)
    • Enable UnnecessaryFinal and PreferredInterfaceType EP checks (#991)
    • Add missing @​test annotation (#988)
    • Fix typo in variable name (#987)
    • Remove AbstractConfig class (#974)
    • Fix Javadoc for MethodRef (#973)
    • Refactored data clumps with the help of LLMs (research project) (#960)
  • Build / CI tooling maintenance:
    • Various cleanups enabled by bumping minimum Java and Error Prone versions (#962)
    • Disable publishing of snapshot builds from CI (#967)
    • Update Gradle action usage in CI workflow (#969)
    • Update Gradle config to always compile Java code using JDK 17 (#971)
    • Update JavaParser to 3.26.0 (#970)
    • Reenable JMH benchmarking in a safer manner (#975)
    • Updated JMH Benchmark Comment Action (#976)
    • Update to Gradle 8.8 (#981)
    • Update to Error Prone 2.28.0 (#984)
    • Update to Gradle 8.9 (#998)
    • Update to WALA 1.6.6 (#1003)

Version 0.11.0

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.uber.nullaway:nullaway&package-manager=maven&previous-version=0.10.10&new-version=0.11.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ffb0ffbed..d57dd2841 100644 --- a/pom.xml +++ b/pom.xml @@ -327,7 +327,7 @@ com.uber.nullaway nullaway - 0.10.10 + 0.11.2 From 2dad24f1e7b816421361a57409ead11b0733c793 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2024 23:35:51 +0530 Subject: [PATCH 075/167] Bump jetty.version from 11.0.16 to 11.0.23 (#1982) Bumps `jetty.version` from 11.0.16 to 11.0.23. Updates `org.eclipse.jetty:jetty-servlet` from 11.0.16 to 11.0.23 Updates `org.eclipse.jetty:jetty-servlets` from 11.0.16 to 11.0.23 Updates `org.eclipse.jetty:jetty-security` from 11.0.16 to 11.0.23 Updates `org.eclipse.jetty:jetty-proxy` from 11.0.16 to 11.0.23 Updates `org.eclipse.jetty.websocket:websocket-jetty-server` from 11.0.16 to 11.0.23 Updates `org.eclipse.jetty.websocket:websocket-servlet` from 11.0.16 to 11.0.23 Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- client/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/pom.xml b/client/pom.xml index 7530b50f1..776c7720e 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -30,7 +30,7 @@ org.asynchttpclient.client - 11.0.16 + 11.0.23 10.1.25 2.11.0 4.11.0 From a3fc50d93b2596b1b1c2364b834b32c789ba5816 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 29 Aug 2024 01:27:45 +0530 Subject: [PATCH 076/167] Bump org.jacoco:jacoco-maven-plugin from 0.8.9 to 0.8.12 (#1987) Bumps [org.jacoco:jacoco-maven-plugin](https://github.com/jacoco/jacoco) from 0.8.9 to 0.8.12.
Release notes

Sourced from org.jacoco:jacoco-maven-plugin's releases.

0.8.12

New Features

  • JaCoCo now officially supports Java 22 (GitHub #1596).
  • Experimental support for Java 23 class files (GitHub #1553).

Fixed bugs

  • Branches added by the Kotlin compiler for functions with default arguments and having more than 32 parameters are filtered out during generation of report (GitHub #1556).
  • Branch added by the Kotlin compiler version 1.5.0 and above for reading from lateinit property is filtered out during generation of report (GitHub #1568).

Non-functional Changes

  • JaCoCo now depends on ASM 9.7 (GitHub #1600).

0.8.11

New Features

  • JaCoCo now officially supports Java 21 (GitHub #1520).
  • Experimental support for Java 22 class files (GitHub #1479).
  • Part of bytecode generated by the Java compilers for exhaustive switch expressions is filtered out during generation of report (GitHub #1472).
  • Part of bytecode generated by the Java compilers for record patterns is filtered out during generation of report (GitHub #1473).

Fixed bugs

  • Instrumentation should not cause VerifyError when the last local variable of method parameters is overridden in the method body to store a value of type long or double (GitHub #893).
  • Restore exec file compatibility with versions from 0.7.5 to 0.8.8 in case of class files with zero line numbers (GitHub #1492).

Non-functional Changes

  • jacoco-maven-plugin now requires at least Java 8 (GitHub #1466, #1468).
  • JaCoCo build now requires at least Maven 3.5.4 (GitHub #1467).
  • Maven 3.9.2 should not produce warnings for jacoco-maven-plugin (GitHub #1468).
  • JaCoCo build now requires JDK 17 (GitHub #1482).
  • JaCoCo now depends on ASM 9.6 (GitHub #1518).

0.8.10

Fixed bugs

  • Agent should not require configuration of permissions for SecurityManager outside of its codeBase (GitHub #1425).
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.jacoco:jacoco-maven-plugin&package-manager=maven&previous-version=0.8.9&new-version=0.8.12)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d57dd2841..4e9a728cc 100644 --- a/pom.xml +++ b/pom.xml @@ -348,7 +348,7 @@ org.jacoco jacoco-maven-plugin - 0.8.9 + 0.8.12 From 2d1316452354fd4e638255a34d2d8638b7258150 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Sep 2024 00:36:22 +0530 Subject: [PATCH 077/167] Bump org.hamcrest:hamcrest from 2.2 to 3.0 (#1990) Bumps [org.hamcrest:hamcrest](https://github.com/hamcrest/JavaHamcrest) from 2.2 to 3.0.
Release notes

Sourced from org.hamcrest:hamcrest's releases.

Hamcrest v3.0

Breaking Changes

  • From version 3.0, the jar distributed to Maven Central is now compiled to Java 1.8 bytecode, and is not compatible with previous versions of Java. See [Issue #331](hamcrest/JavaHamcrest#331) and [PR #411](hamcrest/JavaHamcrest#411) for details. Developers who use Java 1.7 earlier can still depend upon hamcrest-2.2.jar.

Improvements

Hamcrest v3.0-rc1

Breaking Changes

  • From version 3.0, the jar distributed to Maven Central is now compiled to Java 1.8 bytecode, and is not compatible with previous versions of Java. See [Issue #331](hamcrest/JavaHamcrest#331) and [PR #411](hamcrest/JavaHamcrest#411) for details. Developers who use Java 1.7 earlier can still depend upon hamcrest-2.2.jar.

Improvements

Changelog

Sourced from org.hamcrest:hamcrest's changelog.

Version 3.0 (1st August 2024)

Breaking Changes

  • From version 3.0, the jar distributed to Maven Central is now compiled to Java 1.8 bytecode, and is not compatible with previous versions of Java. See [Issue #331](hamcrest/JavaHamcrest#331) and [PR #411](hamcrest/JavaHamcrest#411) for details. Developers who use Java 1.7 earlier can still depend upon hamcrest-2.2.jar.

Improvements

Commits
  • 68984b8 Version 3.0
  • 1adc351 Fix javadoc title
  • 4e2b71c Add instructions for releasing to Maven Central
  • 3fa841d Revert version to 3.0-SNAPSHOT
  • 750dc36 Prepare for version 3.0-rc1
  • 1703e95 Fix broken tutorial link in README
  • c4578ef Upgrade Gradle 8.8 -> 8.9
  • a9923af Remove old, unused build definitions
  • cf25e14 Cleanup README, fix broken links
  • bc4769e Upgrade to GitHub-native Dependabot (#342)
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.hamcrest:hamcrest&package-manager=maven&previous-version=2.2&new-version=3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- client/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/pom.xml b/client/pom.xml index 776c7720e..9d856540f 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -34,7 +34,7 @@ 10.1.25 2.11.0 4.11.0 - 2.2 + 3.0 2.0.2
From 970fa08bdf8ea1fba150ab398c2f28bad35a5eca Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Sep 2024 00:44:34 +0530 Subject: [PATCH 078/167] Bump commons-io:commons-io from 2.11.0 to 2.16.1 (#1986) Bumps commons-io:commons-io from 2.11.0 to 2.16.1. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=commons-io:commons-io&package-manager=maven&previous-version=2.11.0&new-version=2.16.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- client/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/pom.xml b/client/pom.xml index 9d856540f..cb689bbd8 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -32,7 +32,7 @@ 11.0.23 10.1.25 - 2.11.0 + 2.16.1 4.11.0 3.0 2.0.2 From eb90b5fddb2f53a904ed3507124727216f515085 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Sep 2024 00:51:03 +0530 Subject: [PATCH 079/167] Bump org.apache.tomcat.embed:tomcat-embed-core from 10.1.25 to 10.1.28 (#1983) Bumps org.apache.tomcat.embed:tomcat-embed-core from 10.1.25 to 10.1.28. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.apache.tomcat.embed:tomcat-embed-core&package-manager=maven&previous-version=10.1.25&new-version=10.1.28)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- client/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/pom.xml b/client/pom.xml index cb689bbd8..353ffb275 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -31,7 +31,7 @@ org.asynchttpclient.client 11.0.23 - 10.1.25 + 10.1.28 2.16.1 4.11.0 3.0 From 2f59949da8b2f452a1244da9d3db72b696767660 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Sep 2024 01:03:37 +0530 Subject: [PATCH 080/167] Bump org.apache.maven.plugins:maven-gpg-plugin from 3.1.0 to 3.2.5 (#1985) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [org.apache.maven.plugins:maven-gpg-plugin](https://github.com/apache/maven-gpg-plugin) from 3.1.0 to 3.2.5.
Release notes

Sourced from org.apache.maven.plugins:maven-gpg-plugin's releases.

3.2.5

Release Notes - Maven GPG Plugin - Version 3.2.5


📦 Dependency updates

3.2.4

Release Notes - Maven GPG Plugin - Version 3.2.4

... (truncated)

Commits
  • 737d4ee [maven-release-plugin] prepare release maven-gpg-plugin-3.2.5
  • 7747063 [MGPG-134] Update maven-invoker (#110)
  • 3df5f83 [MGPG-133] Bump org.simplify4u.plugins:pgpverify-maven-plugin from 1.17.0 to ...
  • 58a2069 [MGPG-132] Bump com.kohlschutter.junixsocket:junixsocket-core from 2.9.1 to 2...
  • e911b43 [MGPG-131] Bump org.apache.maven.plugins:maven-plugins from 42 to 43 (#108)
  • d2b60d3 [MGPG-130] Update sigstore extension for exclusion (#109)
  • 091f388 Bump org.apache.maven.plugins:maven-invoker-plugin from 3.6.1 to 3.7.0
  • 899f410 [MGPG-128] Parent POM 42, prerequisite 3.6.3 (#100)
  • f0be6f3 [MGPG-127] Bump bouncycastleVersion from 1.78 to 1.78.1 (#98)
  • 7dd5166 [maven-release-plugin] prepare for next development iteration
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.apache.maven.plugins:maven-gpg-plugin&package-manager=maven&previous-version=3.1.0&new-version=3.2.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4e9a728cc..e19e5f855 100644 --- a/pom.xml +++ b/pom.xml @@ -409,7 +409,7 @@ org.apache.maven.plugins maven-gpg-plugin - 3.1.0 + 3.2.5 sign-artifacts From dcf83510c0b65a4e85ffb645f76b0d06904e6dab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Sep 2024 23:26:14 +0530 Subject: [PATCH 081/167] Bump org.jetbrains:annotations from 24.0.1 to 24.1.0 (#1994) Bumps [org.jetbrains:annotations](https://github.com/JetBrains/java-annotations) from 24.0.1 to 24.1.0.
Release notes

Sourced from org.jetbrains:annotations's releases.

24.1.0

  • @CheckReturnValue is not experimental anymore.
Changelog

Sourced from org.jetbrains:annotations's changelog.

Version 24.1.0

  • @CheckReturnValue is not experimental anymore.
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.jetbrains:annotations&package-manager=maven&previous-version=24.0.1&new-version=24.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e19e5f855..5219e29aa 100644 --- a/pom.xml +++ b/pom.xml @@ -52,7 +52,7 @@ 1.5.6-4 2.0.1 1.4.11 - 24.0.1 + 24.1.0 From 619bf9b08a00c303105fa84844ce253b7defd928 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Sep 2024 23:35:56 +0530 Subject: [PATCH 082/167] Bump com.github.luben:zstd-jni from 1.5.6-4 to 1.5.6-5 (#1992) Bumps [com.github.luben:zstd-jni](https://github.com/luben/zstd-jni) from 1.5.6-4 to 1.5.6-5.
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.github.luben:zstd-jni&package-manager=maven&previous-version=1.5.6-4&new-version=1.5.6-5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5219e29aa..b088d238a 100644 --- a/pom.xml +++ b/pom.xml @@ -49,7 +49,7 @@ 0.0.25.Final 1.17.0 2.0.13 - 1.5.6-4 + 1.5.6-5 2.0.1 1.4.11 24.1.0 From 1dda55ab360a8e4fb92434951ac2dcda5d407cc8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 Sep 2024 21:44:02 +0530 Subject: [PATCH 083/167] Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.6.3 to 3.10.0 (#1996) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.6.3 to 3.10.0.
Release notes

Sourced from org.apache.maven.plugins:maven-javadoc-plugin's releases.

3.7.0

📦 Dependency updates

📝 Documentation updates

👻 Maintenance

  • Bump org.springframework:spring-context from 4.3.29.RELEASE to 5.2.21.RELEASE in /src/it/projects/MJAVADOC-434_fixcompile (#280) @​dependabot
  • Exclude JDK 8 - temurin, adopt-openj9 on macos (#279) @​slawekjaranowski

🔧 Build

Commits
  • 487e479 [maven-release-plugin] prepare release maven-javadoc-plugin-3.10.0
  • 9638a6a [MJAVADOC-785] Align plugin implementation with AbstractMavenReport (maven-re...
  • 9d33925 [MJAVADOC-784] Upgrade to Doxia 2.0.0 Milestone Stack
  • a11b921 [MJAVADOC-809] Align Mojo class names
  • 7c4b467 Bump org.apache.maven.plugins:maven-plugins from 42 to 43
  • 636442b Improve ITs
  • dbca15a Bump org.hamcrest:hamcrest-core from 2.2 to 3.0
  • d02bb88 Bump org.apache.commons:commons-lang3 from 3.15.0 to 3.16.0
  • 0a850a1 [MJAVADOC-807] Simplify IT for MJAVADOC-498
  • 43e901f Improve URL handling
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.apache.maven.plugins:maven-javadoc-plugin&package-manager=maven&previous-version=3.6.3&new-version=3.10.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b088d238a..e8904126f 100644 --- a/pom.xml +++ b/pom.xml @@ -382,7 +382,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.6.3 + 3.10.0 attach-javadocs From 2c9398a577c4832362d709017ff28c011df93c10 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 Sep 2024 21:53:50 +0530 Subject: [PATCH 084/167] Bump com.google.errorprone:error_prone_core from 2.30.0 to 2.31.0 (#1995) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [com.google.errorprone:error_prone_core](https://github.com/google/error-prone) from 2.30.0 to 2.31.0.
Release notes

Sourced from com.google.errorprone:error_prone_core's releases.

Error Prone 2.31.0

This is the last planned minor release of Error Prone that will support running on JDK 11, see #3803. Using Error Prone to compile code that is deployed to earlier versions will continue to be fully supported, but will require using JDK 17 or newer for compilation and setting --release or -source/-target/-bootclasspath.

Changes:

New checks:

  • AutoValueBoxedValues: AutoValue instances should not usually contain boxed types that are not Nullable. We recommend removing the unnecessary boxing.

Full changelog: https://github.com/google/error-prone/compare/v2.30.0...v2.31.0

Commits
  • 4294aac Release Error Prone 2.31.0
  • 5bf91fb Replace {@link ThreadSafeTypeParameter} with {@code ThreadSafeTypeParameter}
  • a5a7189 Replace ComparisonChain with a Comparator chain.
  • 7e9a100 Make ThreadSafeTypeParameter useful in the open-source version of ErrorProne.
  • b4cebef Fix typo noted by @​Stephan202.
  • 354104e Remove ThreadSafe.TypeParameter now that it's been replaced by `ThreadSafeT...
  • 7542d36 Don't fire CanIgnoreReturnValueSuggester for simple return param; impleme...
  • 0a5a5b8 Migrate CollectionIncompatibleType from the deprecated withSignature to `...
  • 78218f2 Write more about withSignature.
  • 90d9390 Mark some Kotlin ranges as Immutable.
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.google.errorprone:error_prone_core&package-manager=maven&previous-version=2.30.0&new-version=2.31.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e8904126f..23c315c97 100644 --- a/pom.xml +++ b/pom.xml @@ -322,7 +322,7 @@ com.google.errorprone error_prone_core - 2.30.0 + 2.31.0 com.uber.nullaway From c2683b0507d510a0afeb553071b44edd807e2192 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 Sep 2024 21:54:05 +0530 Subject: [PATCH 085/167] Bump org.apache.maven.plugins:maven-surefire-plugin from 3.4.0 to 3.5.0 (#1993) Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.4.0 to 3.5.0.
Commits
  • c78365f [maven-release-plugin] prepare release surefire-3.5.0
  • 05e4681 [SUREFIRE-2227] Dynamically calculate xrefTestLocation
  • f1a419a [SUREFIRE-2228] Upgrade to Doxia 2.0.0 Milestone Stack
  • 5e14d4f [SUREFIRE-2161] Align Mojo class names and output names
  • c0784ab Bump org.apache.commons:commons-compress from 1.27.0 to 1.27.1
  • 79ea717 [SUREFIRE-2256] Upgrade to Parent 43
  • 4648b47 add Reproducible Builds badge
  • f64c1b3 [maven-release-plugin] prepare for next development iteration
  • See full diff in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.apache.maven.plugins:maven-surefire-plugin&package-manager=maven&previous-version=3.4.0&new-version=3.5.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 23c315c97..633143668 100644 --- a/pom.xml +++ b/pom.xml @@ -337,7 +337,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.4.0 + 3.5.0 @{argLine} --add-exports java.base/jdk.internal.misc=ALL-UNNAMED From 419cc3102b0b8d82e35edc301b4727490adb93e8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 Sep 2024 21:54:16 +0530 Subject: [PATCH 086/167] Bump org.apache.kerby:kerb-simplekdc from 2.0.2 to 2.1.0 (#1991) Bumps org.apache.kerby:kerb-simplekdc from 2.0.2 to 2.1.0. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.apache.kerby:kerb-simplekdc&package-manager=maven&previous-version=2.0.2&new-version=2.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- client/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/pom.xml b/client/pom.xml index 353ffb275..369aaab1a 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -35,7 +35,7 @@ 2.16.1 4.11.0 3.0 - 2.0.2 + 2.1.0 From 1da01267909ba13f6b4a903d9e97d8cd2e9d2ab2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 6 Sep 2024 23:30:33 +0530 Subject: [PATCH 087/167] Bump netty.version from 4.1.112.Final to 4.1.113.Final (#1999) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps `netty.version` from 4.1.112.Final to 4.1.113.Final. Updates `io.netty:netty-buffer` from 4.1.112.Final to 4.1.113.Final
Commits
  • d0a109e [maven-release-plugin] prepare release netty-4.1.113.Final
  • e1d6384 Cleanup fields on AdaptiveByteBuf::deallocate (#14273)
  • 8a02f45 Upload hidden files for staging (#14275)
  • c0fdb8e adjust continuation frame header length (#14245)
  • 95d86bb chore: clean code DefaultChannelPipeline add method (#14249)
  • 1c1da9f Fix netty-all artifact snapshot deployments (#14264)
  • 235eb6f Upgrade to netty-tcnative 2.0.66.Final (#14254)
  • ceade95 Ensure flushes are not discarded by ChunkedWriteHandler for passed th… (#14248)
  • dc30c33 Add new SslHandler.isEncrypted(...) variant that will not produce fal… (#14243)
  • 31d1592 Remove reference to parent in recycled buffers for leak detection (#14250)
  • Additional commits viewable in compare view

Updates `io.netty:netty-codec-http` from 4.1.112.Final to 4.1.113.Final
Commits
  • d0a109e [maven-release-plugin] prepare release netty-4.1.113.Final
  • e1d6384 Cleanup fields on AdaptiveByteBuf::deallocate (#14273)
  • 8a02f45 Upload hidden files for staging (#14275)
  • c0fdb8e adjust continuation frame header length (#14245)
  • 95d86bb chore: clean code DefaultChannelPipeline add method (#14249)
  • 1c1da9f Fix netty-all artifact snapshot deployments (#14264)
  • 235eb6f Upgrade to netty-tcnative 2.0.66.Final (#14254)
  • ceade95 Ensure flushes are not discarded by ChunkedWriteHandler for passed th… (#14248)
  • dc30c33 Add new SslHandler.isEncrypted(...) variant that will not produce fal… (#14243)
  • 31d1592 Remove reference to parent in recycled buffers for leak detection (#14250)
  • Additional commits viewable in compare view

Updates `io.netty:netty-codec` from 4.1.112.Final to 4.1.113.Final
Commits
  • d0a109e [maven-release-plugin] prepare release netty-4.1.113.Final
  • e1d6384 Cleanup fields on AdaptiveByteBuf::deallocate (#14273)
  • 8a02f45 Upload hidden files for staging (#14275)
  • c0fdb8e adjust continuation frame header length (#14245)
  • 95d86bb chore: clean code DefaultChannelPipeline add method (#14249)
  • 1c1da9f Fix netty-all artifact snapshot deployments (#14264)
  • 235eb6f Upgrade to netty-tcnative 2.0.66.Final (#14254)
  • ceade95 Ensure flushes are not discarded by ChunkedWriteHandler for passed th… (#14248)
  • dc30c33 Add new SslHandler.isEncrypted(...) variant that will not produce fal… (#14243)
  • 31d1592 Remove reference to parent in recycled buffers for leak detection (#14250)
  • Additional commits viewable in compare view

Updates `io.netty:netty-codec-socks` from 4.1.112.Final to 4.1.113.Final
Commits
  • d0a109e [maven-release-plugin] prepare release netty-4.1.113.Final
  • e1d6384 Cleanup fields on AdaptiveByteBuf::deallocate (#14273)
  • 8a02f45 Upload hidden files for staging (#14275)
  • c0fdb8e adjust continuation frame header length (#14245)
  • 95d86bb chore: clean code DefaultChannelPipeline add method (#14249)
  • 1c1da9f Fix netty-all artifact snapshot deployments (#14264)
  • 235eb6f Upgrade to netty-tcnative 2.0.66.Final (#14254)
  • ceade95 Ensure flushes are not discarded by ChunkedWriteHandler for passed th… (#14248)
  • dc30c33 Add new SslHandler.isEncrypted(...) variant that will not produce fal… (#14243)
  • 31d1592 Remove reference to parent in recycled buffers for leak detection (#14250)
  • Additional commits viewable in compare view

Updates `io.netty:netty-handler-proxy` from 4.1.112.Final to 4.1.113.Final
Commits
  • d0a109e [maven-release-plugin] prepare release netty-4.1.113.Final
  • e1d6384 Cleanup fields on AdaptiveByteBuf::deallocate (#14273)
  • 8a02f45 Upload hidden files for staging (#14275)
  • c0fdb8e adjust continuation frame header length (#14245)
  • 95d86bb chore: clean code DefaultChannelPipeline add method (#14249)
  • 1c1da9f Fix netty-all artifact snapshot deployments (#14264)
  • 235eb6f Upgrade to netty-tcnative 2.0.66.Final (#14254)
  • ceade95 Ensure flushes are not discarded by ChunkedWriteHandler for passed th… (#14248)
  • dc30c33 Add new SslHandler.isEncrypted(...) variant that will not produce fal… (#14243)
  • 31d1592 Remove reference to parent in recycled buffers for leak detection (#14250)
  • Additional commits viewable in compare view

Updates `io.netty:netty-common` from 4.1.112.Final to 4.1.113.Final
Commits
  • d0a109e [maven-release-plugin] prepare release netty-4.1.113.Final
  • e1d6384 Cleanup fields on AdaptiveByteBuf::deallocate (#14273)
  • 8a02f45 Upload hidden files for staging (#14275)
  • c0fdb8e adjust continuation frame header length (#14245)
  • 95d86bb chore: clean code DefaultChannelPipeline add method (#14249)
  • 1c1da9f Fix netty-all artifact snapshot deployments (#14264)
  • 235eb6f Upgrade to netty-tcnative 2.0.66.Final (#14254)
  • ceade95 Ensure flushes are not discarded by ChunkedWriteHandler for passed th… (#14248)
  • dc30c33 Add new SslHandler.isEncrypted(...) variant that will not produce fal… (#14243)
  • 31d1592 Remove reference to parent in recycled buffers for leak detection (#14250)
  • Additional commits viewable in compare view

Updates `io.netty:netty-transport` from 4.1.112.Final to 4.1.113.Final
Commits
  • d0a109e [maven-release-plugin] prepare release netty-4.1.113.Final
  • e1d6384 Cleanup fields on AdaptiveByteBuf::deallocate (#14273)
  • 8a02f45 Upload hidden files for staging (#14275)
  • c0fdb8e adjust continuation frame header length (#14245)
  • 95d86bb chore: clean code DefaultChannelPipeline add method (#14249)
  • 1c1da9f Fix netty-all artifact snapshot deployments (#14264)
  • 235eb6f Upgrade to netty-tcnative 2.0.66.Final (#14254)
  • ceade95 Ensure flushes are not discarded by ChunkedWriteHandler for passed th… (#14248)
  • dc30c33 Add new SslHandler.isEncrypted(...) variant that will not produce fal… (#14243)
  • 31d1592 Remove reference to parent in recycled buffers for leak detection (#14250)
  • Additional commits viewable in compare view

Updates `io.netty:netty-handler` from 4.1.112.Final to 4.1.113.Final
Commits
  • d0a109e [maven-release-plugin] prepare release netty-4.1.113.Final
  • e1d6384 Cleanup fields on AdaptiveByteBuf::deallocate (#14273)
  • 8a02f45 Upload hidden files for staging (#14275)
  • c0fdb8e adjust continuation frame header length (#14245)
  • 95d86bb chore: clean code DefaultChannelPipeline add method (#14249)
  • 1c1da9f Fix netty-all artifact snapshot deployments (#14264)
  • 235eb6f Upgrade to netty-tcnative 2.0.66.Final (#14254)
  • ceade95 Ensure flushes are not discarded by ChunkedWriteHandler for passed th… (#14248)
  • dc30c33 Add new SslHandler.isEncrypted(...) variant that will not produce fal… (#14243)
  • 31d1592 Remove reference to parent in recycled buffers for leak detection (#14250)
  • Additional commits viewable in compare view

Updates `io.netty:netty-resolver-dns` from 4.1.112.Final to 4.1.113.Final
Commits
  • d0a109e [maven-release-plugin] prepare release netty-4.1.113.Final
  • e1d6384 Cleanup fields on AdaptiveByteBuf::deallocate (#14273)
  • 8a02f45 Upload hidden files for staging (#14275)
  • c0fdb8e adjust continuation frame header length (#14245)
  • 95d86bb chore: clean code DefaultChannelPipeline add method (#14249)
  • 1c1da9f Fix netty-all artifact snapshot deployments (#14264)
  • 235eb6f Upgrade to netty-tcnative 2.0.66.Final (#14254)
  • ceade95 Ensure flushes are not discarded by ChunkedWriteHandler for passed th… (#14248)
  • dc30c33 Add new SslHandler.isEncrypted(...) variant that will not produce fal… (#14243)
  • 31d1592 Remove reference to parent in recycled buffers for leak detection (#14250)
  • Additional commits viewable in compare view

Updates `io.netty:netty-transport-native-epoll` from 4.1.112.Final to 4.1.113.Final
Commits
  • d0a109e [maven-release-plugin] prepare release netty-4.1.113.Final
  • e1d6384 Cleanup fields on AdaptiveByteBuf::deallocate (#14273)
  • 8a02f45 Upload hidden files for staging (#14275)
  • c0fdb8e adjust continuation frame header length (#14245)
  • 95d86bb chore: clean code DefaultChannelPipeline add method (#14249)
  • 1c1da9f Fix netty-all artifact snapshot deployments (#14264)
  • 235eb6f Upgrade to netty-tcnative 2.0.66.Final (#14254)
  • ceade95 Ensure flushes are not discarded by ChunkedWriteHandler for passed th… (#14248)
  • dc30c33 Add new SslHandler.isEncrypted(...) variant that will not produce fal… (#14243)
  • 31d1592 Remove reference to parent in recycled buffers for leak detection (#14250)
  • Additional commits viewable in compare view

Updates `io.netty:netty-transport-native-kqueue` from 4.1.112.Final to 4.1.113.Final
Commits
  • d0a109e [maven-release-plugin] prepare release netty-4.1.113.Final
  • e1d6384 Cleanup fields on AdaptiveByteBuf::deallocate (#14273)
  • 8a02f45 Upload hidden files for staging (#14275)
  • c0fdb8e adjust continuation frame header length (#14245)
  • 95d86bb chore: clean code DefaultChannelPipeline add method (#14249)
  • 1c1da9f Fix netty-all artifact snapshot deployments (#14264)
  • 235eb6f Upgrade to netty-tcnative 2.0.66.Final (#14254)
  • ceade95 Ensure flushes are not discarded by ChunkedWriteHandler for passed th… (#14248)
  • dc30c33 Add new SslHandler.isEncrypted(...) variant that will not produce fal… (#14243)
  • 31d1592 Remove reference to parent in recycled buffers for leak detection (#14250)
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 633143668..6a44981a7 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ 11 UTF-8 - 4.1.112.Final + 4.1.113.Final 0.0.25.Final 1.17.0 2.0.13 From 15cc40d9d0edc8904c5fee1b377fdbd705b0252e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 6 Sep 2024 23:30:59 +0530 Subject: [PATCH 088/167] Bump org.sonatype.plugins:nexus-staging-maven-plugin from 1.6.13 to 1.7.0 (#2001) Bumps org.sonatype.plugins:nexus-staging-maven-plugin from 1.6.13 to 1.7.0. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.sonatype.plugins:nexus-staging-maven-plugin&package-manager=maven&previous-version=1.6.13&new-version=1.7.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6a44981a7..cef8f0568 100644 --- a/pom.xml +++ b/pom.xml @@ -396,7 +396,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.13 + 1.7.0 true ossrh From 9a079cbc6d431d9a9e7a7caf04e2c8d90f6dd44c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 7 Sep 2024 19:21:55 +0530 Subject: [PATCH 089/167] Bump org.slf4j:slf4j-api from 2.0.13 to 2.0.16 (#2000) Bumps org.slf4j:slf4j-api from 2.0.13 to 2.0.16. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.slf4j:slf4j-api&package-manager=maven&previous-version=2.0.13&new-version=2.0.16)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cef8f0568..d300f0fd4 100644 --- a/pom.xml +++ b/pom.xml @@ -48,7 +48,7 @@ 4.1.113.Final 0.0.25.Final 1.17.0 - 2.0.13 + 2.0.16 1.5.6-5 2.0.1 1.4.11 From 29e13f29e0d6223b91abce209a49fd1be99ae091 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 7 Sep 2024 19:28:24 +0530 Subject: [PATCH 090/167] Bump jetty.version from 11.0.23 to 11.0.24 (#1998) Bumps `jetty.version` from 11.0.23 to 11.0.24. Updates `org.eclipse.jetty:jetty-servlet` from 11.0.23 to 11.0.24 Updates `org.eclipse.jetty:jetty-servlets` from 11.0.23 to 11.0.24 Updates `org.eclipse.jetty:jetty-security` from 11.0.23 to 11.0.24 Updates `org.eclipse.jetty:jetty-proxy` from 11.0.23 to 11.0.24 Updates `org.eclipse.jetty.websocket:websocket-jetty-server` from 11.0.23 to 11.0.24 Updates `org.eclipse.jetty.websocket:websocket-servlet` from 11.0.23 to 11.0.24 Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- client/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/pom.xml b/client/pom.xml index 369aaab1a..169490f2d 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -30,7 +30,7 @@ org.asynchttpclient.client - 11.0.23 + 11.0.24 10.1.28 2.16.1 4.11.0 From 1a96c1c105748315abcc5899d5cc0bfd4108a273 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Sep 2024 23:58:10 +0530 Subject: [PATCH 091/167] Bump ch.qos.logback:logback-classic from 1.4.11 to 1.5.8 (#2003) Bumps [ch.qos.logback:logback-classic](https://github.com/qos-ch/logback) from 1.4.11 to 1.5.8.
Commits
  • 92e1a5e prepare release 1.5.8
  • 76d8dd8 Update README.md, comment out CI action results
  • d7e0d59 Merge branch 'master' of github.com:qos-ch/logback
  • fe3bf9d os.name property is expected to be Mac OS X on Apple computers
  • 9806273 Update README.md
  • c45f110 check for Mac OS X
  • 00c6f5e what is the os.name
  • 7d03a42 update actions/setup
  • edacb3b skip email sent termination test on MacOs
  • 3b5d041 allow more time for timetout
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ch.qos.logback:logback-classic&package-manager=maven&previous-version=1.4.11&new-version=1.5.8)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d300f0fd4..a1d53588f 100644 --- a/pom.xml +++ b/pom.xml @@ -51,7 +51,7 @@ 2.0.16 1.5.6-5 2.0.1 - 1.4.11 + 1.5.8 24.1.0
From b2c3d566ca9a7341d2743c38fef0c5693e6f556b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Sep 2024 00:03:29 +0530 Subject: [PATCH 092/167] Bump org.junit:junit-bom from 5.10.2 to 5.11.0 (#2002) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [org.junit:junit-bom](https://github.com/junit-team/junit5) from 5.10.2 to 5.11.0.
Release notes

Sourced from org.junit:junit-bom's releases.

JUnit 5.11.0 = Platform 1.11.0 + Jupiter 5.11.0 + Vintage 5.11.0

See Release Notes.

New Contributors

Full Changelog: https://github.com/junit-team/junit5/compare/r5.10.3...r5.11.0

JUnit 5.11.0-RC1 = Platform 1.11.0-RC1 + Jupiter 5.11.0-RC1 + Vintage 5.11.0-RC1

See Release Notes.

New Contributors

Full Changelog: https://github.com/junit-team/junit5/compare/r5.11.0-M2...r5.11.0-RC1

JUnit 5.11.0-M2 = Platform 1.11.0-M2 + Jupiter 5.11.0-M2 + Vintage 5.11.0-M2

See Release Notes.

New Contributors

Full Changelog: https://github.com/junit-team/junit5/compare/r5.11.0-M1...r5.11.0-M2

JUnit 5.11.0-M1 = Platform 1.11.0-M1 + Jupiter 5.11.0-M1 + Vintage 5.11.0-M1

... (truncated)

Commits
  • 6b8e42b Release 5.11
  • 9430ece Allow potentially unlimited maxCharsPerColumn in Csv{File}Source (#3924)
  • 0b10f86 Polish release notes
  • 4dbd0f9 Let @TempDir fail fast with File annotated element and non-default file s...
  • 57f1ad4 Fix syntax
  • d78730a Prioritize tasks on critical path of task graph
  • b6719e2 Remove obsolete directory
  • d8ec757 Apply Spotless formatting to Gradle script plugins
  • dae525d Disable caching of some Spotless tasks due to negative avoidance savings
  • c63d118 Re-enable caching verifyOSGi tasks (issue was fixed in bnd 7.0.0)
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.junit:junit-bom&package-manager=maven&previous-version=5.10.2&new-version=5.11.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a1d53588f..45b5cb835 100644 --- a/pom.xml +++ b/pom.xml @@ -105,7 +105,7 @@ org.junit junit-bom - 5.10.2 + 5.11.0 pom import From c4812b22a4a1c2e3e0e8bdba0f5103f60a54cc86 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Sep 2024 13:15:44 +0530 Subject: [PATCH 093/167] Bump org.apache.tomcat.embed:tomcat-embed-core from 10.1.28 to 10.1.29 (#2004) Bumps org.apache.tomcat.embed:tomcat-embed-core from 10.1.28 to 10.1.29. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.apache.tomcat.embed:tomcat-embed-core&package-manager=maven&previous-version=10.1.28&new-version=10.1.29)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- client/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/pom.xml b/client/pom.xml index 169490f2d..df2608930 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -31,7 +31,7 @@ org.asynchttpclient.client 11.0.24 - 10.1.28 + 10.1.29 2.16.1 4.11.0 3.0 From c0b73f1f74cf758bb1cf4882c5edff8a2608ae74 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2024 12:50:41 +0530 Subject: [PATCH 094/167] Bump org.apache.maven.plugins:maven-gpg-plugin from 3.2.5 to 3.2.7 (#2010) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [org.apache.maven.plugins:maven-gpg-plugin](https://github.com/apache/maven-gpg-plugin) from 3.2.5 to 3.2.7.
Release notes

Sourced from org.apache.maven.plugins:maven-gpg-plugin's releases.

3.2.7

Fixes a lingering issue affecting whole 3.2.x lineage, that resulted in "bad passphrase" on Windows OS with GPG signer (see MGPG-136 for details).

What's Changed

Full Changelog: https://github.com/apache/maven-gpg-plugin/compare/maven-gpg-plugin-3.2.6...maven-gpg-plugin-3.2.7

3.2.6

Release Notes - Maven GPG Plugin - Version 3.2.6


What's Changed

New Contributors

... (truncated)

Commits
  • 43af21c [maven-release-plugin] prepare release maven-gpg-plugin-3.2.7
  • 8c5a8d2 [MGPG-144] Bump commons-io:commons-io from 2.16.1 to 2.17.0 (#119)
  • cb5422f [MGPG-143] Bump com.kohlschutter.junixsocket:junixsocket-core from 2.10.0 to ...
  • 6b2a27f [MGPG-136] Windows passphrase corruption (#120)
  • 31e87e0 [maven-release-plugin] prepare for next development iteration
  • 1c9a14c [maven-release-plugin] prepare release maven-gpg-plugin-3.2.6
  • bbe6156 Add FAQ for "no pinentry" issue (#118)
  • 5b94273 [MGPG-141] Remove use of deprecated classes (#117)
  • afdfd28 [MGPG-138] Drop direct use of plexus-cipher and secdispatcher (#115)
  • 7516e7c [MGPG-140] Update Maven to 3.9.9 (#116)
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.apache.maven.plugins:maven-gpg-plugin&package-manager=maven&previous-version=3.2.5&new-version=3.2.7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 45b5cb835..b340c3879 100644 --- a/pom.xml +++ b/pom.xml @@ -409,7 +409,7 @@ org.apache.maven.plugins maven-gpg-plugin - 3.2.5 + 3.2.7 sign-artifacts From 240a9bf70772bc394f4cb20bff0120b0f9e3ce9c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2024 13:12:32 +0530 Subject: [PATCH 095/167] Bump org.apache.tomcat.embed:tomcat-embed-core from 10.1.29 to 10.1.30 (#2008) Bumps org.apache.tomcat.embed:tomcat-embed-core from 10.1.29 to 10.1.30. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.apache.tomcat.embed:tomcat-embed-core&package-manager=maven&previous-version=10.1.29&new-version=10.1.30)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- client/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/pom.xml b/client/pom.xml index df2608930..a31faffad 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -31,7 +31,7 @@ org.asynchttpclient.client 11.0.24 - 10.1.29 + 10.1.30 2.16.1 4.11.0 3.0 From 9ec517d808510c0a548e56a5e45cd4b18899d453 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2024 13:18:53 +0530 Subject: [PATCH 096/167] Bump com.uber.nullaway:nullaway from 0.11.2 to 0.11.3 (#2007) Bumps [com.uber.nullaway:nullaway](https://github.com/uber/NullAway) from 0.11.2 to 0.11.3.
Release notes

Sourced from com.uber.nullaway:nullaway's releases.

NullAway 0.11.3

IMPORTANT: We have cherry-picked one PR in master since 0.11.2 for this release, it does not contain all changes in master!

  • Add missing source files in android-jarinfer-models-sdk modules (#1033)
Changelog

Sourced from com.uber.nullaway:nullaway's changelog.

Version 0.11.3

IMPORTANT: We have cherry-picked one PR in master since 0.11.2 for this release, it does not contain all changes in master!

  • Add missing source files in android-jarinfer-models-sdk modules (#1033)
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.uber.nullaway:nullaway&package-manager=maven&previous-version=0.11.2&new-version=0.11.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b340c3879..d3577a2eb 100644 --- a/pom.xml +++ b/pom.xml @@ -327,7 +327,7 @@ com.uber.nullaway nullaway - 0.11.2 + 0.11.3 From 0498fb64a2a5717b5ddf000cca68b7a16c69b129 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Oct 2024 02:06:53 +0530 Subject: [PATCH 097/167] Bump crazy-max/ghaction-import-gpg from 6.1.0 to 6.2.0 (#2022) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [crazy-max/ghaction-import-gpg](https://github.com/crazy-max/ghaction-import-gpg) from 6.1.0 to 6.2.0.
Release notes

Sourced from crazy-max/ghaction-import-gpg's releases.

v6.2.0

Full Changelog: https://github.com/crazy-max/ghaction-import-gpg/compare/v6.1.0...v6.2.0

Commits
  • cb9bde2 Merge pull request #205 from crazy-max/dependabot/npm_and_yarn/openpgp-5.11.2
  • 652ac61 chore: update generated content
  • 0404dfd build(deps): bump openpgp from 5.11.0 to 5.11.2
  • 63a9470 Merge pull request #209 from crazy-max/dependabot/npm_and_yarn/actions/core-1...
  • e3a6456 chore: update generated content
  • f0d6155 Merge pull request #207 from crazy-max/dependabot/npm_and_yarn/micromatch-4.0.8
  • 8812250 build(deps): bump @​actions/core from 1.10.1 to 1.11.1
  • 35465df build(deps): bump micromatch from 4.0.4 to 4.0.8
  • ea88154 Merge pull request #204 from crazy-max/dependabot/github_actions/docker/bake-...
  • 871d8a5 build(deps): bump docker/bake-action from 4 to 5
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=crazy-max/ghaction-import-gpg&package-manager=github_actions&previous-version=6.1.0&new-version=6.2.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d6d171da6..8014135c2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,7 +37,7 @@ jobs: }] - name: Import GPG - uses: crazy-max/ghaction-import-gpg@v6.1.0 + uses: crazy-max/ghaction-import-gpg@v6.2.0 with: gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} passphrase: ${{ secrets.GPG_PASSPHRASE }} From 2cc75bc6d11ad496030ec4a6bb515fa48bd6763e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Oct 2024 02:07:19 +0530 Subject: [PATCH 098/167] Bump com.github.luben:zstd-jni from 1.5.6-5 to 1.5.6-7 (#2021) Bumps [com.github.luben:zstd-jni](https://github.com/luben/zstd-jni) from 1.5.6-5 to 1.5.6-7.
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.github.luben:zstd-jni&package-manager=maven&previous-version=1.5.6-5&new-version=1.5.6-7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d3577a2eb..8ff6ffda9 100644 --- a/pom.xml +++ b/pom.xml @@ -49,7 +49,7 @@ 0.0.25.Final 1.17.0 2.0.16 - 1.5.6-5 + 1.5.6-7 2.0.1 1.5.8 24.1.0 From 3f6d4ac2659fc3e92d8a0f527f54799b2f6bcee8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Oct 2024 02:07:36 +0530 Subject: [PATCH 099/167] Bump org.jetbrains:annotations from 24.1.0 to 26.0.1 (#2017) Bumps [org.jetbrains:annotations](https://github.com/JetBrains/java-annotations) from 24.1.0 to 26.0.1.
Release notes

Sourced from org.jetbrains:annotations's releases.

26.0.1

  • Fixed sources.jar build (regression after 25.0.0)

26.0.0

  • Added new experimental annotation: @NotNullByDefault

25.0.0

  • Added Kotlin Multiplatform artifact (multiplatform-annotations).
  • Removed Java 5 artifact.
Changelog

Sourced from org.jetbrains:annotations's changelog.

Version 26.0.1

  • Fixed sources.jar build (regression after 25.0.0)

Version 26.0.0

  • Added new experimental annotation: @NotNullByDefault

Version 25.0.0

  • Added Kotlin Multiplatform artifact (multiplatform-annotations).
  • Removed Java 5 artifact.
Commits
  • f79a61f Version 26.0.1
  • 546095e javaOnlySourcesJar: fix target
  • 9fd19c1 Merge pull request #115 from serjsysoev/fix_sources
  • b7311e2 Fix sources jar
  • 0d04181 Javadoc touch-up
  • 6894074 Version 26.0.0
  • 4f1401a Fix typo
  • 61bce51 NotNullByDefault: refine the behavior for type parameters
  • 0c06dec Fix javadoc links
  • 5a4e1b6 Contract: improved documentation for mutates parameter; unmark it as experime...
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.jetbrains:annotations&package-manager=maven&previous-version=24.1.0&new-version=26.0.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8ff6ffda9..aeb65d5f9 100644 --- a/pom.xml +++ b/pom.xml @@ -52,7 +52,7 @@ 1.5.6-7 2.0.1 1.5.8 - 24.1.0 + 26.0.1 From d79427d0450655d771a2a978d0e188eb9c6dd6d7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 9 Nov 2024 19:53:16 +0530 Subject: [PATCH 100/167] Bump s4u/maven-settings-action from 3.0.0 to 3.1.0 (#2025) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [s4u/maven-settings-action](https://github.com/s4u/maven-settings-action) from 3.0.0 to 3.1.0.
Release notes

Sourced from s4u/maven-settings-action's releases.

v3.1.0

What's Changed

:fire: New features

:hammer: Maintenance

:toolbox: Dependency updates

:heart: Thanks

Many thanks for collaboration on this release for: @​Gozke, @​pwoodworth and @​slawekjaranowski

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=s4u/maven-settings-action&package-manager=github_actions&previous-version=3.0.0&new-version=3.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8014135c2..4a462dc99 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,7 +27,7 @@ jobs: run: rm -f /home/runner/.m2/settings.xml - name: Maven Settings - uses: s4u/maven-settings-action@v3.0.0 + uses: s4u/maven-settings-action@v3.1.0 with: servers: | [{ From a3e7db3cf45539485e4ce542002d15fead39f88b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 9 Nov 2024 20:02:18 +0530 Subject: [PATCH 101/167] Bump ch.qos.logback:logback-classic from 1.5.8 to 1.5.12 (#2024) Bumps [ch.qos.logback:logback-classic](https://github.com/qos-ch/logback) from 1.5.8 to 1.5.12.
Commits
  • 3a64b51 prepare release 1.5.12
  • ecae664 fix issues/879
  • 85968fa logger call ends with two exceptions - fix issues/876
  • ea3cec8 Update README.md
  • 887cbba update README.md
  • df2a3b6 start work on 1.5.12-SNAPSHOT
  • 3aa0730 prepare release of version 1.5.11
  • 8bcfd9a allow for InsertFromJNDIModelHandler to be callable from logback-tyler
  • 75bee86 refactorings in support of logback-tyler
  • 8749edc start work on 1.5.11-SNAPSHOT
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ch.qos.logback:logback-classic&package-manager=maven&previous-version=1.5.8&new-version=1.5.12)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Aayush Atharva <24762260+hyperxpro@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index aeb65d5f9..ecab5943b 100644 --- a/pom.xml +++ b/pom.xml @@ -51,7 +51,7 @@ 2.0.16 1.5.6-7 2.0.1 - 1.5.8 + 1.5.12 26.0.1 From a2c1767fc6bf27325b7f03cfdf5f0f6fd13d4b6c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 9 Nov 2024 20:09:22 +0530 Subject: [PATCH 102/167] Bump com.uber.nullaway:nullaway from 0.11.3 to 0.12.1 (#2023) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [com.uber.nullaway:nullaway](https://github.com/uber/NullAway) from 0.11.3 to 0.12.1.
Release notes

Sourced from com.uber.nullaway:nullaway's releases.

NullAway 0.12.1

  • Add library model for Apache Commons CollectionUtils.isNotEmpty (#932) (#1062)
  • Handle records in targetTypeMatches (#1061)

NullAway 0.12.0

IMPORTANT:

  • We now by default check/enforce that pure type-use annotations from JSpecify are written in the "right place" on array types, varargs types, and nested types. More details can be found in the wiki. We also expose -XepOpt:NullAway:LegacyAnnotationLocations flag to disable this new behavior for now to ease the migration. We expect to remove this flag in a future version of NullAway.
  • We now support writing @​EnsuresNonNullIf on methods to capture cases where a method conditionally ensures that a field is @​NonNull. Thanks @​mauricioaniche for the contributions!

(The changelog below contains all changes from version 0.11.2, since version 0.11.3 contains only one cherry-picked PR from master).

  • Enforce Strict Interpretation Of Type Use Annotation Locations Outside of JSpecify mode (#1010)
  • Update handling of annotations on varargs argument (#1025)
  • Create basic unit tests for library model generation (#1031)
  • Partial handling for restrictive annotations on varargs in unannotated code (#1029)
  • Add missing source files in android-jarinfer-models-sdk modules (#1033)
  • External Library Models: Adding support for @​nullable Method parameters (#1006)
  • JDK 23 support (#1034)
  • Support @​EnsuresNonNullIf (#1044)
  • Update some Android astubx models (#1052)
  • Remove unused or unneeded JarInfer flags (#1050)
  • Enforce correct type-use annotation locations for nested types (#1045)
  • Update Android SDK 31 astubx models (#1054)
  • Fix bugs in reading varargs annotations from bytecodes (#1055)
  • General maintenance:
    • Update to Gradle 8.10 (#1023)
    • Update to Gradle 8.10.1 (#1036)
    • Update to Error Prone 2.32.0 (#1037)
    • Typo fix in README.md (#1041)
    • Fix Gradle config instructions (#1039)
    • Update to v4 of setup-gradle GitHub action (#1043)
    • Add extra JVM args needed for JMH on recent JDK versions (#1049)
    • Use HTTP instead of SSH for cloning repo for JMH Benchmarks (#1056)
    • Various version updates (#1051)
    • Update to Checker Framework 3.48.0 (#1030)
Changelog

Sourced from com.uber.nullaway:nullaway's changelog.

Version 0.12.1

  • Add library model for Apache Commons CollectionUtils.isNotEmpty (#932) (#1062)
  • Handle records in targetTypeMatches (#1061)

Version 0.12.0

IMPORTANT:

  • We now by default check/enforce that pure type-use annotations from JSpecify are written in the "right place" on array types, varargs types, and nested types. More details can be found in the wiki. We also expose -XepOpt:NullAway:LegacyAnnotationLocations flag to disable this new behavior for now to ease the migration. We expect to remove this flag in a future version of NullAway.
  • We now support writing @​EnsuresNonNullIf on methods to capture cases where a method conditionally ensures that a field is @​NonNull. Thanks @​mauricioaniche for the contributions!

(The changelog below contains all changes from version 0.11.2, since version 0.11.3 contains only one cherry-picked PR from master).

  • Enforce Strict Interpretation Of Type Use Annotation Locations Outside of JSpecify mode (#1010)
  • Update handling of annotations on varargs argument (#1025)
  • Create basic unit tests for library model generation (#1031)
  • Partial handling for restrictive annotations on varargs in unannotated code (#1029)
  • Add missing source files in android-jarinfer-models-sdk modules (#1033)
  • External Library Models: Adding support for @​nullable Method parameters (#1006)
  • JDK 23 support (#1034)
  • Support @​EnsuresNonNullIf (#1044)
  • Update some Android astubx models (#1052)
  • Remove unused or unneeded JarInfer flags (#1050)
  • Enforce correct type-use annotation locations for nested types (#1045)
  • Update Android SDK 31 astubx models (#1054)
  • Fix bugs in reading varargs annotations from bytecodes (#1055)
  • General maintenance:
    • Update to Gradle 8.10 (#1023)
    • Update to Gradle 8.10.1 (#1036)
    • Update to Error Prone 2.32.0 (#1037)
    • Typo fix in README.md (#1041)
    • Fix Gradle config instructions (#1039)
    • Update to v4 of setup-gradle GitHub action (#1043)
    • Add extra JVM args needed for JMH on recent JDK versions (#1049)
    • Use HTTP instead of SSH for cloning repo for JMH Benchmarks (#1056)
    • Various version updates (#1051)
    • Update to Checker Framework 3.48.0 (#1030)
Commits
  • e7a1bd1 Prepare for release 0.12.1.
  • dc9cf0e Handle records in targetTypeMatches (#1061)
  • 8f4b928 Add library model for Apache Commons CollectionUtils.isNotEmpty (#932) (#1062)
  • d6b7fa3 Prepare next development version.
  • 84273f6 Prepare for release 0.12.0.
  • 91cf25d Fix bugs in reading varargs annotations from bytecodes (#1055)
  • 2a9188b Update Android SDK 31 astubx models (#1054)
  • 0f6f3d2 Use HTTP instead of SSH for cloning repo for JMH Benchmarks (#1056)
  • cc5ef65 Enforce correct type-use annotation locations for nested types (#1045)
  • 9eea2be Remove unused or unneeded JarInfer flags (#1050)
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.uber.nullaway:nullaway&package-manager=maven&previous-version=0.11.3&new-version=0.12.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ecab5943b..a5f960a6e 100644 --- a/pom.xml +++ b/pom.xml @@ -327,7 +327,7 @@ com.uber.nullaway nullaway - 0.11.3 + 0.12.1 From c1ed191dc0bb3fbf5688a2d6298e73c13b75c3b0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 9 Nov 2024 20:51:01 +0530 Subject: [PATCH 103/167] Bump netty.version from 4.1.113.Final to 4.1.114.Final (#2013) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps `netty.version` from 4.1.113.Final to 4.1.114.Final. Updates `io.netty:netty-buffer` from 4.1.113.Final to 4.1.114.Final
Commits
  • 7679b9e [maven-release-plugin] prepare release netty-4.1.114.Final
  • d5f4bfb Refactor DnsNameResolver to be able to use different strategies when … (#14374)
  • 041eaed Re-add previous removed method to make revapi plugin happy again.
  • 232a5ab DnsResolverBuilder methods should make it clear that these are for Da… (#14379)
  • e87ce47 Initialize DnsNameResolverBuilder at runtime for native images (#14376)
  • 3f66dd2 Make it possible to notify the TrustManager of resumed sessions (#14358)
  • c036b99 DnsNameResolver: allow users to skip bind() during bootstrap (#14375)
  • 56a9101 Update small documentation typo (#14370)
  • 8362d9d Fix flaky BootstrapTest (#14369)
  • bbd3a4a Fix OpenSslClientSessionCache remove (#14366)
  • Additional commits viewable in compare view

Updates `io.netty:netty-codec-http` from 4.1.113.Final to 4.1.114.Final
Commits
  • 7679b9e [maven-release-plugin] prepare release netty-4.1.114.Final
  • d5f4bfb Refactor DnsNameResolver to be able to use different strategies when … (#14374)
  • 041eaed Re-add previous removed method to make revapi plugin happy again.
  • 232a5ab DnsResolverBuilder methods should make it clear that these are for Da… (#14379)
  • e87ce47 Initialize DnsNameResolverBuilder at runtime for native images (#14376)
  • 3f66dd2 Make it possible to notify the TrustManager of resumed sessions (#14358)
  • c036b99 DnsNameResolver: allow users to skip bind() during bootstrap (#14375)
  • 56a9101 Update small documentation typo (#14370)
  • 8362d9d Fix flaky BootstrapTest (#14369)
  • bbd3a4a Fix OpenSslClientSessionCache remove (#14366)
  • Additional commits viewable in compare view

Updates `io.netty:netty-codec` from 4.1.113.Final to 4.1.114.Final
Commits
  • 7679b9e [maven-release-plugin] prepare release netty-4.1.114.Final
  • d5f4bfb Refactor DnsNameResolver to be able to use different strategies when … (#14374)
  • 041eaed Re-add previous removed method to make revapi plugin happy again.
  • 232a5ab DnsResolverBuilder methods should make it clear that these are for Da… (#14379)
  • e87ce47 Initialize DnsNameResolverBuilder at runtime for native images (#14376)
  • 3f66dd2 Make it possible to notify the TrustManager of resumed sessions (#14358)
  • c036b99 DnsNameResolver: allow users to skip bind() during bootstrap (#14375)
  • 56a9101 Update small documentation typo (#14370)
  • 8362d9d Fix flaky BootstrapTest (#14369)
  • bbd3a4a Fix OpenSslClientSessionCache remove (#14366)
  • Additional commits viewable in compare view

Updates `io.netty:netty-codec-socks` from 4.1.113.Final to 4.1.114.Final
Commits
  • 7679b9e [maven-release-plugin] prepare release netty-4.1.114.Final
  • d5f4bfb Refactor DnsNameResolver to be able to use different strategies when … (#14374)
  • 041eaed Re-add previous removed method to make revapi plugin happy again.
  • 232a5ab DnsResolverBuilder methods should make it clear that these are for Da… (#14379)
  • e87ce47 Initialize DnsNameResolverBuilder at runtime for native images (#14376)
  • 3f66dd2 Make it possible to notify the TrustManager of resumed sessions (#14358)
  • c036b99 DnsNameResolver: allow users to skip bind() during bootstrap (#14375)
  • 56a9101 Update small documentation typo (#14370)
  • 8362d9d Fix flaky BootstrapTest (#14369)
  • bbd3a4a Fix OpenSslClientSessionCache remove (#14366)
  • Additional commits viewable in compare view

Updates `io.netty:netty-handler-proxy` from 4.1.113.Final to 4.1.114.Final
Commits
  • 7679b9e [maven-release-plugin] prepare release netty-4.1.114.Final
  • d5f4bfb Refactor DnsNameResolver to be able to use different strategies when … (#14374)
  • 041eaed Re-add previous removed method to make revapi plugin happy again.
  • 232a5ab DnsResolverBuilder methods should make it clear that these are for Da… (#14379)
  • e87ce47 Initialize DnsNameResolverBuilder at runtime for native images (#14376)
  • 3f66dd2 Make it possible to notify the TrustManager of resumed sessions (#14358)
  • c036b99 DnsNameResolver: allow users to skip bind() during bootstrap (#14375)
  • 56a9101 Update small documentation typo (#14370)
  • 8362d9d Fix flaky BootstrapTest (#14369)
  • bbd3a4a Fix OpenSslClientSessionCache remove (#14366)
  • Additional commits viewable in compare view

Updates `io.netty:netty-common` from 4.1.113.Final to 4.1.114.Final
Commits
  • 7679b9e [maven-release-plugin] prepare release netty-4.1.114.Final
  • d5f4bfb Refactor DnsNameResolver to be able to use different strategies when … (#14374)
  • 041eaed Re-add previous removed method to make revapi plugin happy again.
  • 232a5ab DnsResolverBuilder methods should make it clear that these are for Da… (#14379)
  • e87ce47 Initialize DnsNameResolverBuilder at runtime for native images (#14376)
  • 3f66dd2 Make it possible to notify the TrustManager of resumed sessions (#14358)
  • c036b99 DnsNameResolver: allow users to skip bind() during bootstrap (#14375)
  • 56a9101 Update small documentation typo (#14370)
  • 8362d9d Fix flaky BootstrapTest (#14369)
  • bbd3a4a Fix OpenSslClientSessionCache remove (#14366)
  • Additional commits viewable in compare view

Updates `io.netty:netty-transport` from 4.1.113.Final to 4.1.114.Final
Commits
  • 7679b9e [maven-release-plugin] prepare release netty-4.1.114.Final
  • d5f4bfb Refactor DnsNameResolver to be able to use different strategies when … (#14374)
  • 041eaed Re-add previous removed method to make revapi plugin happy again.
  • 232a5ab DnsResolverBuilder methods should make it clear that these are for Da… (#14379)
  • e87ce47 Initialize DnsNameResolverBuilder at runtime for native images (#14376)
  • 3f66dd2 Make it possible to notify the TrustManager of resumed sessions (#14358)
  • c036b99 DnsNameResolver: allow users to skip bind() during bootstrap (#14375)
  • 56a9101 Update small documentation typo (#14370)
  • 8362d9d Fix flaky BootstrapTest (#14369)
  • bbd3a4a Fix OpenSslClientSessionCache remove (#14366)
  • Additional commits viewable in compare view

Updates `io.netty:netty-handler` from 4.1.113.Final to 4.1.114.Final
Commits
  • 7679b9e [maven-release-plugin] prepare release netty-4.1.114.Final
  • d5f4bfb Refactor DnsNameResolver to be able to use different strategies when … (#14374)
  • 041eaed Re-add previous removed method to make revapi plugin happy again.
  • 232a5ab DnsResolverBuilder methods should make it clear that these are for Da… (#14379)
  • e87ce47 Initialize DnsNameResolverBuilder at runtime for native images (#14376)
  • 3f66dd2 Make it possible to notify the TrustManager of resumed sessions (#14358)
  • c036b99 DnsNameResolver: allow users to skip bind() during bootstrap (#14375)
  • 56a9101 Update small documentation typo (#14370)
  • 8362d9d Fix flaky BootstrapTest (#14369)
  • bbd3a4a Fix OpenSslClientSessionCache remove (#14366)
  • Additional commits viewable in compare view

Updates `io.netty:netty-resolver-dns` from 4.1.113.Final to 4.1.114.Final
Commits
  • 7679b9e [maven-release-plugin] prepare release netty-4.1.114.Final
  • d5f4bfb Refactor DnsNameResolver to be able to use different strategies when … (#14374)
  • 041eaed Re-add previous removed method to make revapi plugin happy again.
  • 232a5ab DnsResolverBuilder methods should make it clear that these are for Da… (#14379)
  • e87ce47 Initialize DnsNameResolverBuilder at runtime for native images (#14376)
  • 3f66dd2 Make it possible to notify the TrustManager of resumed sessions (#14358)
  • c036b99 DnsNameResolver: allow users to skip bind() during bootstrap (#14375)
  • 56a9101 Update small documentation typo (#14370)
  • 8362d9d Fix flaky BootstrapTest (#14369)
  • bbd3a4a Fix OpenSslClientSessionCache remove (#14366)
  • Additional commits viewable in compare view

Updates `io.netty:netty-transport-native-epoll` from 4.1.113.Final to 4.1.114.Final
Commits
  • 7679b9e [maven-release-plugin] prepare release netty-4.1.114.Final
  • d5f4bfb Refactor DnsNameResolver to be able to use different strategies when … (#14374)
  • 041eaed Re-add previous removed method to make revapi plugin happy again.
  • 232a5ab DnsResolverBuilder methods should make it clear that these are for Da… (#14379)
  • e87ce47 Initialize DnsNameResolverBuilder at runtime for native images (#14376)
  • 3f66dd2 Make it possible to notify the TrustManager of resumed sessions (#14358)
  • c036b99 DnsNameResolver: allow users to skip bind() during bootstrap (#14375)
  • 56a9101 Update small documentation typo (#14370)
  • 8362d9d Fix flaky BootstrapTest (#14369)
  • bbd3a4a Fix OpenSslClientSessionCache remove (#14366)
  • Additional commits viewable in compare view

Updates `io.netty:netty-transport-native-kqueue` from 4.1.113.Final to 4.1.114.Final
Commits
  • 7679b9e [maven-release-plugin] prepare release netty-4.1.114.Final
  • d5f4bfb Refactor DnsNameResolver to be able to use different strategies when … (#14374)
  • 041eaed Re-add previous removed method to make revapi plugin happy again.
  • 232a5ab DnsResolverBuilder methods should make it clear that these are for Da… (#14379)
  • e87ce47 Initialize DnsNameResolverBuilder at runtime for native images (#14376)
  • 3f66dd2 Make it possible to notify the TrustManager of resumed sessions (#14358)
  • c036b99 DnsNameResolver: allow users to skip bind() during bootstrap (#14375)
  • 56a9101 Update small documentation typo (#14370)
  • 8362d9d Fix flaky BootstrapTest (#14369)
  • bbd3a4a Fix OpenSslClientSessionCache remove (#14366)
  • Additional commits viewable in compare view

You can trigger a rebase of this PR by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
> **Note** > Automatic rebases have been disabled on this pull request as it has been open for over 30 days. Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Aayush Atharva <24762260+hyperxpro@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a5f960a6e..1fcc3439f 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ 11 UTF-8 - 4.1.113.Final + 4.1.114.Final 0.0.25.Final 1.17.0 2.0.16 From dee9f8f3838709e2e09275dc0ea2e31c02de504e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Nov 2024 00:09:21 +0530 Subject: [PATCH 104/167] Bump org.junit:junit-bom from 5.11.0 to 5.11.3 (#2029) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [org.junit:junit-bom](https://github.com/junit-team/junit5) from 5.11.0 to 5.11.3.
Release notes

Sourced from org.junit:junit-bom's releases.

JUnit 5.11.3 = Platform 1.11.3 + Jupiter 5.11.3 + Vintage 5.11.3

See Release Notes.

Full Changelog: https://github.com/junit-team/junit5/compare/r5.11.2...r5.11.3

JUnit 5.11.2 = Platform 1.11.2 + Jupiter 5.11.2 + Vintage 5.11.2

See Release Notes.

Full Changelog: https://github.com/junit-team/junit5/compare/r5.11.1...r5.11.2

JUnit 5.11.1 = Platform 1.11.1 + Jupiter 5.11.1 + Vintage 5.11.1

See Release Notes.

Full Changelog: https://github.com/junit-team/junit5/compare/r5.11.0...r5.11.1

Commits
  • b20991e Release 5.11.3
  • e57b508 Finalize 5.11.3 release notes
  • fb1254c Allow repeating ExtendWith annotation on fields and parameters
  • a3192bd Fix package name comparison on Java 8 (#4077)
  • fcb7b01 Remove useless Order annotation
  • 57dfcb5 Allow repeating @…Source annotations when used as meta annotations
  • 09cd8b3 Add ArchUnit test for consistency of repeatable annotations
  • fa46a92 Hard-wrap at 90 characters
  • 8f45eea Find repeatable @⁠ExtendWith meta-annotations on fields again
  • b451122 Introduce release notes for 5.11.3
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.junit:junit-bom&package-manager=maven&previous-version=5.11.0&new-version=5.11.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1fcc3439f..e538be35e 100644 --- a/pom.xml +++ b/pom.xml @@ -105,7 +105,7 @@ org.junit junit-bom - 5.11.0 + 5.11.3 pom import From b0676656eddcece472f7e92245c8e06ae7e21499 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Nov 2024 23:07:25 +0530 Subject: [PATCH 105/167] Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.10.0 to 3.11.1 (#2030) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.10.0 to 3.11.1.
Release notes

Sourced from org.apache.maven.plugins:maven-javadoc-plugin's releases.

maven-javadoc-plugin-3.10.1

What's Changed

Full Changelog: https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.10.0...maven-javadoc-plugin-3.10.1

Commits
  • 619650c [maven-release-plugin] prepare release maven-javadoc-plugin-3.11.1
  • e314da0 [MJAVADOC-821] Align toolchain discovery code with Maven Compiler Plugin
  • 62a6861 [MJAVADOC-820] [REGRESSION] MJAVADOC-787 was merged incompletely
  • d1090c5 [maven-release-plugin] prepare for next development iteration
  • ee030f7 [maven-release-plugin] prepare release maven-javadoc-plugin-3.11.0
  • 6c5fdc0 [MJAVADOC-819] Align archive generation code with Maven Source Plugin
  • 3a90de5 [MJAVADOC-787] Automatic detection of release option for JDK < 9
  • 373172d [MJAVADOC-817] Upgrade to Doxia 2.0.0 GA Stack
  • ba266c0 Fix SCM tag
  • 5775ce1 Fix typo
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.apache.maven.plugins:maven-javadoc-plugin&package-manager=maven&previous-version=3.10.0&new-version=3.11.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e538be35e..89dc79442 100644 --- a/pom.xml +++ b/pom.xml @@ -382,7 +382,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.10.0 + 3.11.1 attach-javadocs From 39b34c17d65fedfb7c41b72452043830393edff2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 21:47:22 +0530 Subject: [PATCH 106/167] Bump io.netty:netty-common from 4.1.114.Final to 4.1.115.Final (#2031) Bumps [io.netty:netty-common](https://github.com/netty/netty) from 4.1.114.Final to 4.1.115.Final.
Commits
  • 04f9b4a [maven-release-plugin] prepare release netty-4.1.115.Final
  • fbf7a70 Merge commit from fork
  • 7b4fe3d Specialize Adaptive's allocator Recycler based on magazine's owner (#14421)
  • 9f3699e Explicit specify the platform for Docker files (#14448)
  • 3520fc7 Ensure netty-all generation does not override other snapshot jars (#14450)
  • 925064e Preserve ordering of default named groups during conversation (#14447)
  • 837b738 Make JMH executor threads look like event loop threads (#14444)
  • a434eef AdaptiveByteBufAllocator: Make pooling of AdaptiveByteBuf magazine local (#14...
  • 16123be Allow to set used named groups per OpenSslContext (#14433)
  • dadbf58 Correctly detect if KeyManager is not supported by OpenSSL version (#14437)
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=io.netty:netty-common&package-manager=maven&previous-version=4.1.114.Final&new-version=4.1.115.Final)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/AsyncHttpClient/async-http-client/network/alerts).
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 89dc79442..89e92d57a 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ 11 UTF-8 - 4.1.114.Final + 4.1.115.Final 0.0.25.Final 1.17.0 2.0.16 From 2200b2477c84d2517fcbdf5d42f71d459c09066f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 21:47:37 +0530 Subject: [PATCH 107/167] Bump commons-io:commons-io from 2.16.1 to 2.17.0 (#2028) Bumps commons-io:commons-io from 2.16.1 to 2.17.0. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=commons-io:commons-io&package-manager=maven&previous-version=2.16.1&new-version=2.17.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- client/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/pom.xml b/client/pom.xml index a31faffad..cb76aec5a 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -32,7 +32,7 @@ 11.0.24 10.1.30 - 2.16.1 + 2.17.0 4.11.0 3.0 2.1.0 From 0fcb589eac3573dfb3fbf54eef34921c04c8dc5a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Nov 2024 02:12:24 +0530 Subject: [PATCH 108/167] Bump org.apache.maven.plugins:maven-surefire-plugin from 3.5.0 to 3.5.2 (#2032) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.5.0 to 3.5.2.
Release notes

Sourced from org.apache.maven.plugins:maven-surefire-plugin's releases.

3.5.2

🚀 New features and improvements

📦 Dependency updates

👻 Maintenance

Full Changelog: https://github.com/apache/maven-surefire/compare/surefire-3.5.1...surefire-3.5.2

3.5.1

🚀 New features and improvements

🐛 Bug Fixes

📦 Dependency updates

👻 Maintenance

Commits
  • ea9f049 [maven-release-plugin] prepare release surefire-3.5.2
  • e1f94a0 [SUREFIRE-2276] JUnit5's TestTemplate failures treated as flakes with retries
  • d24adb4 [SUREFIRE-2277] RunResult#getFlakes() is lost during serialisation/deserialis...
  • 4385e94 Remove links to non-existing report
  • 8881971 Remove outdated FAQ
  • 0121834 [SUREFIRE-2283] FAQ site contains broken link to failsafe-plugin
  • 91d16c3 Fix formatting of XML schema files
  • 6cb417a Add .xsd to .gitattributes
  • 9ce5221 [SUREFIRE-2282] surefire-report-plugin: Update Introduction documentation page
  • 620b983 [SUREFIRE-2281] Upgrade to Doxia 2.0.0 GA Stack
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.apache.maven.plugins:maven-surefire-plugin&package-manager=maven&previous-version=3.5.0&new-version=3.5.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 89e92d57a..557768f80 100644 --- a/pom.xml +++ b/pom.xml @@ -337,7 +337,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.5.0 + 3.5.2 @{argLine} --add-exports java.base/jdk.internal.misc=ALL-UNNAMED From c2755e71b2f59cb86b5f3158ab55ffc5b0bc902c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Nov 2024 01:08:10 +0530 Subject: [PATCH 109/167] Bump commons-io:commons-io from 2.17.0 to 2.18.0 (#2036) Bumps commons-io:commons-io from 2.17.0 to 2.18.0. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=commons-io:commons-io&package-manager=maven&previous-version=2.17.0&new-version=2.18.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- client/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/pom.xml b/client/pom.xml index cb76aec5a..062d866e5 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -32,7 +32,7 @@ 11.0.24 10.1.30 - 2.17.0 + 2.18.0 4.11.0 3.0 2.1.0 From 527e7fd7466881f53a732a7d84eaa9bc82781234 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2024 00:23:19 +0530 Subject: [PATCH 110/167] Bump org.apache.tomcat.embed:tomcat-embed-core from 10.1.30 to 10.1.31 in /client (#2034) Bumps org.apache.tomcat.embed:tomcat-embed-core from 10.1.30 to 10.1.31. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.apache.tomcat.embed:tomcat-embed-core&package-manager=maven&previous-version=10.1.30&new-version=10.1.31)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/AsyncHttpClient/async-http-client/network/alerts).
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- client/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/pom.xml b/client/pom.xml index 062d866e5..d2bd097d0 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -31,7 +31,7 @@ org.asynchttpclient.client 11.0.24 - 10.1.30 + 10.1.31 2.18.0 4.11.0 3.0 From 91a358c5c641da47d33f614a5435ff45933045d6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2024 23:15:52 +0530 Subject: [PATCH 111/167] Bump org.apache.tomcat.embed:tomcat-embed-core from 10.1.31 to 10.1.33 (#2038) Bumps org.apache.tomcat.embed:tomcat-embed-core from 10.1.31 to 10.1.33.
Most Recent Ignore Conditions Applied to This Pull Request | Dependency Name | Ignore Conditions | | --- | --- | | org.apache.tomcat.embed:tomcat-embed-core | [>= 11.a0, < 12] |
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.apache.tomcat.embed:tomcat-embed-core&package-manager=maven&previous-version=10.1.31&new-version=10.1.33)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- client/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/pom.xml b/client/pom.xml index d2bd097d0..71b945bdd 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -31,7 +31,7 @@ org.asynchttpclient.client 11.0.24 - 10.1.31 + 10.1.33 2.18.0 4.11.0 3.0 From 2af27154ba181c49b762c7a4a68c12b6831de093 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2024 23:22:56 +0530 Subject: [PATCH 112/167] Bump com.github.luben:zstd-jni from 1.5.6-7 to 1.5.6-8 (#2037) Bumps [com.github.luben:zstd-jni](https://github.com/luben/zstd-jni) from 1.5.6-7 to 1.5.6-8.
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.github.luben:zstd-jni&package-manager=maven&previous-version=1.5.6-7&new-version=1.5.6-8)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 557768f80..fb1a841a6 100644 --- a/pom.xml +++ b/pom.xml @@ -49,7 +49,7 @@ 0.0.25.Final 1.17.0 2.0.16 - 1.5.6-7 + 1.5.6-8 2.0.1 1.5.12 26.0.1 From d5a83362f7aed81b93ebca559746ac9be0f95425 Mon Sep 17 00:00:00 2001 From: Chris Earle Date: Sun, 1 Dec 2024 12:10:55 -0700 Subject: [PATCH 113/167] [CookieStore] Only set `Cookie`s if they are not already set (#2033) This changes the behavior of the automatic usage of the `CookieStore` to avoid overwriting already-set `Cookie`s and, instead only sets them if they do not exist yet. Closes https://github.com/AsyncHttpClient/async-http-client/issues/1964 Co-authored-by: Aayush Atharva --- .../DefaultAsyncHttpClient.java | 2 +- .../asynchttpclient/RequestBuilderBase.java | 21 ++++++++++-- .../intercept/Redirect30xInterceptor.java | 7 ++-- .../asynchttpclient/RequestBuilderTest.java | 34 +++++++++++++++++++ 4 files changed, 55 insertions(+), 9 deletions(-) diff --git a/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClient.java b/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClient.java index 1f616c328..3b417a5a3 100644 --- a/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClient.java +++ b/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClient.java @@ -235,7 +235,7 @@ public ListenableFuture executeRequest(Request request, AsyncHandler h if (!cookies.isEmpty()) { RequestBuilder requestBuilder = request.toBuilder(); for (Cookie cookie : cookies) { - requestBuilder.addOrReplaceCookie(cookie); + requestBuilder.addCookieIfUnset(cookie); } request = requestBuilder.build(); } diff --git a/client/src/main/java/org/asynchttpclient/RequestBuilderBase.java b/client/src/main/java/org/asynchttpclient/RequestBuilderBase.java index 9f5cf9e5e..dbc5e4144 100644 --- a/client/src/main/java/org/asynchttpclient/RequestBuilderBase.java +++ b/client/src/main/java/org/asynchttpclient/RequestBuilderBase.java @@ -323,6 +323,21 @@ public T addCookie(Cookie cookie) { * @return this */ public T addOrReplaceCookie(Cookie cookie) { + return maybeAddOrReplaceCookie(cookie, true); + } + + /** + * Add a cookie based on its name, if it does not exist yet. Cookies that + * are already set will be ignored. + * + * @param cookie the new cookie + * @return this + */ + public T addCookieIfUnset(Cookie cookie) { + return maybeAddOrReplaceCookie(cookie, false); + } + + private T maybeAddOrReplaceCookie(Cookie cookie, boolean allowReplace) { String cookieKey = cookie.name(); boolean replace = false; int index = 0; @@ -335,10 +350,10 @@ public T addOrReplaceCookie(Cookie cookie) { index++; } - if (replace) { - cookies.set(index, cookie); - } else { + if (!replace) { cookies.add(cookie); + } else if (allowReplace) { + cookies.set(index, cookie); } return asDerivedType(); } diff --git a/client/src/main/java/org/asynchttpclient/netty/handler/intercept/Redirect30xInterceptor.java b/client/src/main/java/org/asynchttpclient/netty/handler/intercept/Redirect30xInterceptor.java index 51e7c8a9b..e60495f80 100644 --- a/client/src/main/java/org/asynchttpclient/netty/handler/intercept/Redirect30xInterceptor.java +++ b/client/src/main/java/org/asynchttpclient/netty/handler/intercept/Redirect30xInterceptor.java @@ -142,11 +142,8 @@ public boolean exitAfterHandlingRedirect(Channel channel, NettyResponseFuture CookieStore cookieStore = config.getCookieStore(); if (cookieStore != null) { // Update request's cookies assuming that cookie store is already updated by Interceptors - List cookies = cookieStore.get(newUri); - if (!cookies.isEmpty()) { - for (Cookie cookie : cookies) { - requestBuilder.addOrReplaceCookie(cookie); - } + for (Cookie cookie : cookieStore.get(newUri)) { + requestBuilder.addCookieIfUnset(cookie); } } diff --git a/client/src/test/java/org/asynchttpclient/RequestBuilderTest.java b/client/src/test/java/org/asynchttpclient/RequestBuilderTest.java index 024fce5f1..34e79121d 100644 --- a/client/src/test/java/org/asynchttpclient/RequestBuilderTest.java +++ b/client/src/test/java/org/asynchttpclient/RequestBuilderTest.java @@ -166,6 +166,40 @@ public void testAddOrReplaceCookies() { assertEquals(requestBuilder.cookies.size(), 2, "cookie size must be 2 after adding 1 more cookie i.e. cookie3"); } + @RepeatedIfExceptionsTest(repeats = 5) + public void testAddIfUnsetCookies() { + RequestBuilder requestBuilder = new RequestBuilder(); + Cookie cookie = new DefaultCookie("name", "value"); + cookie.setDomain("google.com"); + cookie.setPath("/"); + cookie.setMaxAge(1000); + cookie.setSecure(true); + cookie.setHttpOnly(true); + requestBuilder.addCookieIfUnset(cookie); + assertEquals(requestBuilder.cookies.size(), 1, "cookies size should be 1 after adding one cookie"); + assertEquals(requestBuilder.cookies.get(0), cookie, "cookie does not match"); + + Cookie cookie2 = new DefaultCookie("name", "value"); + cookie2.setDomain("google2.com"); + cookie2.setPath("/path"); + cookie2.setMaxAge(1001); + cookie2.setSecure(false); + cookie2.setHttpOnly(false); + + requestBuilder.addCookieIfUnset(cookie2); + assertEquals(requestBuilder.cookies.size(), 1, "cookies size should remain 1 as we just ignored cookie2 because of a cookie with same name"); + assertEquals(requestBuilder.cookies.get(0), cookie, "cookie does not match"); + + Cookie cookie3 = new DefaultCookie("name2", "value"); + cookie3.setDomain("google.com"); + cookie3.setPath("/"); + cookie3.setMaxAge(1000); + cookie3.setSecure(true); + cookie3.setHttpOnly(true); + requestBuilder.addCookieIfUnset(cookie3); + assertEquals(requestBuilder.cookies.size(), 2, "cookie size must be 2 after adding 1 more cookie i.e. cookie3"); + } + @RepeatedIfExceptionsTest(repeats = 5) public void testSettingQueryParamsBeforeUrlShouldNotProduceNPE() { RequestBuilder requestBuilder = new RequestBuilder(); From 6bd376ad336a237ef02a632df0042d4eb22e2d32 Mon Sep 17 00:00:00 2001 From: Aayush Atharva Date: Mon, 2 Dec 2024 21:40:34 +0530 Subject: [PATCH 114/167] Prepare for v3.0.1 release (#2040) --- README.md | 4 ++-- client/pom.xml | 2 +- pom.xml | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 21a20ebbe..4ae651b75 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Maven: org.asynchttpclient async-http-client - 3.0.0 + 3.0.1
``` @@ -28,7 +28,7 @@ Maven: Gradle: ```groovy dependencies { - implementation 'org.asynchttpclient:async-http-client:3.0.0' + implementation 'org.asynchttpclient:async-http-client:3.0.1' } ``` diff --git a/client/pom.xml b/client/pom.xml index 71b945bdd..58dcd0aad 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -19,7 +19,7 @@ org.asynchttpclient async-http-client-project - 3.0.0 + 3.0.1 4.0.0 diff --git a/pom.xml b/pom.xml index fb1a841a6..d02f7c7ee 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ org.asynchttpclient async-http-client-project - 3.0.0 + 3.0.1 pom AHC/Project @@ -368,10 +368,9 @@ org.apache.maven.plugins maven-source-plugin - 3.3.1 + 3.2.1 - attach-sources jar-no-fork From 549ea34d0cb814595b79cd64af5a31238d374da1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Dec 2024 02:52:24 +0530 Subject: [PATCH 115/167] Bump org.apache.tomcat.embed:tomcat-embed-core from 10.1.33 to 10.1.34 (#2044) Bumps org.apache.tomcat.embed:tomcat-embed-core from 10.1.33 to 10.1.34.
Most Recent Ignore Conditions Applied to This Pull Request | Dependency Name | Ignore Conditions | | --- | --- | | org.apache.tomcat.embed:tomcat-embed-core | [>= 11.a0, < 12] |
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.apache.tomcat.embed:tomcat-embed-core&package-manager=maven&previous-version=10.1.33&new-version=10.1.34)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- client/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/pom.xml b/client/pom.xml index 58dcd0aad..b2e551d5a 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -31,7 +31,7 @@ org.asynchttpclient.client 11.0.24 - 10.1.33 + 10.1.34 2.18.0 4.11.0 3.0 From 6c6c8125ec59cf4e1bfbae9fa4ef224d91c77add Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Dec 2024 22:56:10 +0530 Subject: [PATCH 116/167] Bump brotli4j.version from 1.17.0 to 1.18.0 (#2045) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps `brotli4j.version` from 1.17.0 to 1.18.0. Updates `com.aayushatharva.brotli4j:brotli4j` from 1.17.0 to 1.18.0
Release notes

Sourced from com.aayushatharva.brotli4j:brotli4j's releases.

Brotli4j v1.18.0 Release

What's Changed

New Contributors

Full Changelog: https://github.com/hyperxpro/Brotli4j/compare/v1.17.0...v1.18.0

Commits
  • 3c271d5 Prepare for v1.18.0 release (#192)
  • f280107 Avoid unintended garbage collection of raw data in PreparedDictionaryImpl (#190)
  • 160890b Bump io.netty:netty-buffer from 4.1.114.Final to 4.1.115.Final (#188)
  • 0536a9d Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.10.1 to 3.11.1 (#186)
  • e4cf7db Bump org.apache.maven.plugins:maven-surefire-plugin from 3.5.1 to 3.5.2 (#187)
  • 66ec7d2 Update JUnit to 5.11.3 (#185)
  • 6d11b04 Bump org.codehaus.mojo:exec-maven-plugin from 3.4.1 to 3.5.0 (#181)
  • 107cb5b Bump uraimo/run-on-arch-action from 2.7.2 to 2.8.1 (#180)
  • 32e3d38 Bump org.apache.maven.plugins:maven-surefire-plugin from 3.5.0 to 3.5.1 (#179)
  • 4bcee08 Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.10.0 to 3.10.1 (#177)
  • Additional commits viewable in compare view

Updates `com.aayushatharva.brotli4j:native-linux-x86_64` from 1.17.0 to 1.18.0 Updates `com.aayushatharva.brotli4j:native-linux-aarch64` from 1.17.0 to 1.18.0 Updates `com.aayushatharva.brotli4j:native-linux-riscv64` from 1.17.0 to 1.18.0 Updates `com.aayushatharva.brotli4j:native-osx-x86_64` from 1.17.0 to 1.18.0 Updates `com.aayushatharva.brotli4j:native-osx-aarch64` from 1.17.0 to 1.18.0 Updates `com.aayushatharva.brotli4j:native-windows-x86_64` from 1.17.0 to 1.18.0 Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d02f7c7ee..7845d63e4 100644 --- a/pom.xml +++ b/pom.xml @@ -47,7 +47,7 @@ 4.1.115.Final 0.0.25.Final - 1.17.0 + 1.18.0 2.0.16 1.5.6-8 2.0.1 From a3fd14e4069b2252ceb4c95e0ee7416740bc9597 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 27 Dec 2024 19:11:09 +0530 Subject: [PATCH 117/167] Bump netty.version from 4.1.115.Final to 4.1.116.Final (#2049) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps `netty.version` from 4.1.115.Final to 4.1.116.Final. Updates `io.netty:netty-buffer` from 4.1.115.Final to 4.1.116.Final
Commits
  • 2a58b07 [maven-release-plugin] prepare release netty-4.1.116.Final
  • a739efa Adaptive: Add assert to guard against bugs related to chunk pooling (#14590)
  • 22cb4ec Fix race and leaks introduced in tests by a16f8aaf2ff101567a526916b46… (#14588)
  • ad104c6 Correctly gard aginst failure when running on systems with 1 core
  • a16f8aa Allow PcapWriteHandler to output PCAP files larger than 2GB (#14478)
  • dccfcc8 Adapt: Ensure Chunks from the central Queue are re-used even if there… (#14586)
  • fdc10c4 chore: use readRetainedSlice to avoid copy in SpdyFrameDecoder (#14573)
  • 46b11cc Adapt: Don't fail when we run on a host with 1 core (#14582) (#14584)
  • 6138a5a Adapt: Only add Chunk to central Queue if unused (#14580) (#14583)
  • 6c3041f Adaptive: Correctly restore allocatedBytes value on failure (#14577) (#14578)
  • Additional commits viewable in compare view

Updates `io.netty:netty-codec-http` from 4.1.115.Final to 4.1.116.Final
Commits
  • 2a58b07 [maven-release-plugin] prepare release netty-4.1.116.Final
  • a739efa Adaptive: Add assert to guard against bugs related to chunk pooling (#14590)
  • 22cb4ec Fix race and leaks introduced in tests by a16f8aaf2ff101567a526916b46… (#14588)
  • ad104c6 Correctly gard aginst failure when running on systems with 1 core
  • a16f8aa Allow PcapWriteHandler to output PCAP files larger than 2GB (#14478)
  • dccfcc8 Adapt: Ensure Chunks from the central Queue are re-used even if there… (#14586)
  • fdc10c4 chore: use readRetainedSlice to avoid copy in SpdyFrameDecoder (#14573)
  • 46b11cc Adapt: Don't fail when we run on a host with 1 core (#14582) (#14584)
  • 6138a5a Adapt: Only add Chunk to central Queue if unused (#14580) (#14583)
  • 6c3041f Adaptive: Correctly restore allocatedBytes value on failure (#14577) (#14578)
  • Additional commits viewable in compare view

Updates `io.netty:netty-codec` from 4.1.115.Final to 4.1.116.Final
Commits
  • 2a58b07 [maven-release-plugin] prepare release netty-4.1.116.Final
  • a739efa Adaptive: Add assert to guard against bugs related to chunk pooling (#14590)
  • 22cb4ec Fix race and leaks introduced in tests by a16f8aaf2ff101567a526916b46… (#14588)
  • ad104c6 Correctly gard aginst failure when running on systems with 1 core
  • a16f8aa Allow PcapWriteHandler to output PCAP files larger than 2GB (#14478)
  • dccfcc8 Adapt: Ensure Chunks from the central Queue are re-used even if there… (#14586)
  • fdc10c4 chore: use readRetainedSlice to avoid copy in SpdyFrameDecoder (#14573)
  • 46b11cc Adapt: Don't fail when we run on a host with 1 core (#14582) (#14584)
  • 6138a5a Adapt: Only add Chunk to central Queue if unused (#14580) (#14583)
  • 6c3041f Adaptive: Correctly restore allocatedBytes value on failure (#14577) (#14578)
  • Additional commits viewable in compare view

Updates `io.netty:netty-codec-socks` from 4.1.115.Final to 4.1.116.Final
Commits
  • 2a58b07 [maven-release-plugin] prepare release netty-4.1.116.Final
  • a739efa Adaptive: Add assert to guard against bugs related to chunk pooling (#14590)
  • 22cb4ec Fix race and leaks introduced in tests by a16f8aaf2ff101567a526916b46… (#14588)
  • ad104c6 Correctly gard aginst failure when running on systems with 1 core
  • a16f8aa Allow PcapWriteHandler to output PCAP files larger than 2GB (#14478)
  • dccfcc8 Adapt: Ensure Chunks from the central Queue are re-used even if there… (#14586)
  • fdc10c4 chore: use readRetainedSlice to avoid copy in SpdyFrameDecoder (#14573)
  • 46b11cc Adapt: Don't fail when we run on a host with 1 core (#14582) (#14584)
  • 6138a5a Adapt: Only add Chunk to central Queue if unused (#14580) (#14583)
  • 6c3041f Adaptive: Correctly restore allocatedBytes value on failure (#14577) (#14578)
  • Additional commits viewable in compare view

Updates `io.netty:netty-handler-proxy` from 4.1.115.Final to 4.1.116.Final
Commits
  • 2a58b07 [maven-release-plugin] prepare release netty-4.1.116.Final
  • a739efa Adaptive: Add assert to guard against bugs related to chunk pooling (#14590)
  • 22cb4ec Fix race and leaks introduced in tests by a16f8aaf2ff101567a526916b46… (#14588)
  • ad104c6 Correctly gard aginst failure when running on systems with 1 core
  • a16f8aa Allow PcapWriteHandler to output PCAP files larger than 2GB (#14478)
  • dccfcc8 Adapt: Ensure Chunks from the central Queue are re-used even if there… (#14586)
  • fdc10c4 chore: use readRetainedSlice to avoid copy in SpdyFrameDecoder (#14573)
  • 46b11cc Adapt: Don't fail when we run on a host with 1 core (#14582) (#14584)
  • 6138a5a Adapt: Only add Chunk to central Queue if unused (#14580) (#14583)
  • 6c3041f Adaptive: Correctly restore allocatedBytes value on failure (#14577) (#14578)
  • Additional commits viewable in compare view

Updates `io.netty:netty-common` from 4.1.115.Final to 4.1.116.Final
Commits
  • 2a58b07 [maven-release-plugin] prepare release netty-4.1.116.Final
  • a739efa Adaptive: Add assert to guard against bugs related to chunk pooling (#14590)
  • 22cb4ec Fix race and leaks introduced in tests by a16f8aaf2ff101567a526916b46… (#14588)
  • ad104c6 Correctly gard aginst failure when running on systems with 1 core
  • a16f8aa Allow PcapWriteHandler to output PCAP files larger than 2GB (#14478)
  • dccfcc8 Adapt: Ensure Chunks from the central Queue are re-used even if there… (#14586)
  • fdc10c4 chore: use readRetainedSlice to avoid copy in SpdyFrameDecoder (#14573)
  • 46b11cc Adapt: Don't fail when we run on a host with 1 core (#14582) (#14584)
  • 6138a5a Adapt: Only add Chunk to central Queue if unused (#14580) (#14583)
  • 6c3041f Adaptive: Correctly restore allocatedBytes value on failure (#14577) (#14578)
  • Additional commits viewable in compare view

Updates `io.netty:netty-transport` from 4.1.115.Final to 4.1.116.Final
Commits
  • 2a58b07 [maven-release-plugin] prepare release netty-4.1.116.Final
  • a739efa Adaptive: Add assert to guard against bugs related to chunk pooling (#14590)
  • 22cb4ec Fix race and leaks introduced in tests by a16f8aaf2ff101567a526916b46… (#14588)
  • ad104c6 Correctly gard aginst failure when running on systems with 1 core
  • a16f8aa Allow PcapWriteHandler to output PCAP files larger than 2GB (#14478)
  • dccfcc8 Adapt: Ensure Chunks from the central Queue are re-used even if there… (#14586)
  • fdc10c4 chore: use readRetainedSlice to avoid copy in SpdyFrameDecoder (#14573)
  • 46b11cc Adapt: Don't fail when we run on a host with 1 core (#14582) (#14584)
  • 6138a5a Adapt: Only add Chunk to central Queue if unused (#14580) (#14583)
  • 6c3041f Adaptive: Correctly restore allocatedBytes value on failure (#14577) (#14578)
  • Additional commits viewable in compare view

Updates `io.netty:netty-handler` from 4.1.115.Final to 4.1.116.Final
Commits
  • 2a58b07 [maven-release-plugin] prepare release netty-4.1.116.Final
  • a739efa Adaptive: Add assert to guard against bugs related to chunk pooling (#14590)
  • 22cb4ec Fix race and leaks introduced in tests by a16f8aaf2ff101567a526916b46… (#14588)
  • ad104c6 Correctly gard aginst failure when running on systems with 1 core
  • a16f8aa Allow PcapWriteHandler to output PCAP files larger than 2GB (#14478)
  • dccfcc8 Adapt: Ensure Chunks from the central Queue are re-used even if there… (#14586)
  • fdc10c4 chore: use readRetainedSlice to avoid copy in SpdyFrameDecoder (#14573)
  • 46b11cc Adapt: Don't fail when we run on a host with 1 core (#14582) (#14584)
  • 6138a5a Adapt: Only add Chunk to central Queue if unused (#14580) (#14583)
  • 6c3041f Adaptive: Correctly restore allocatedBytes value on failure (#14577) (#14578)
  • Additional commits viewable in compare view

Updates `io.netty:netty-resolver-dns` from 4.1.115.Final to 4.1.116.Final
Commits
  • 2a58b07 [maven-release-plugin] prepare release netty-4.1.116.Final
  • a739efa Adaptive: Add assert to guard against bugs related to chunk pooling (#14590)
  • 22cb4ec Fix race and leaks introduced in tests by a16f8aaf2ff101567a526916b46… (#14588)
  • ad104c6 Correctly gard aginst failure when running on systems with 1 core
  • a16f8aa Allow PcapWriteHandler to output PCAP files larger than 2GB (#14478)
  • dccfcc8 Adapt: Ensure Chunks from the central Queue are re-used even if there… (#14586)
  • fdc10c4 chore: use readRetainedSlice to avoid copy in SpdyFrameDecoder (#14573)
  • 46b11cc Adapt: Don't fail when we run on a host with 1 core (#14582) (#14584)
  • 6138a5a Adapt: Only add Chunk to central Queue if unused (#14580) (#14583)
  • 6c3041f Adaptive: Correctly restore allocatedBytes value on failure (#14577) (#14578)
  • Additional commits viewable in compare view

Updates `io.netty:netty-transport-native-epoll` from 4.1.115.Final to 4.1.116.Final
Commits
  • 2a58b07 [maven-release-plugin] prepare release netty-4.1.116.Final
  • a739efa Adaptive: Add assert to guard against bugs related to chunk pooling (#14590)
  • 22cb4ec Fix race and leaks introduced in tests by a16f8aaf2ff101567a526916b46… (#14588)
  • ad104c6 Correctly gard aginst failure when running on systems with 1 core
  • a16f8aa Allow PcapWriteHandler to output PCAP files larger than 2GB (#14478)
  • dccfcc8 Adapt: Ensure Chunks from the central Queue are re-used even if there… (#14586)
  • fdc10c4 chore: use readRetainedSlice to avoid copy in SpdyFrameDecoder (#14573)
  • 46b11cc Adapt: Don't fail when we run on a host with 1 core (#14582) (#14584)
  • 6138a5a Adapt: Only add Chunk to central Queue if unused (#14580) (#14583)
  • 6c3041f Adaptive: Correctly restore allocatedBytes value on failure (#14577) (#14578)
  • Additional commits viewable in compare view

Updates `io.netty:netty-transport-native-kqueue` from 4.1.115.Final to 4.1.116.Final
Commits
  • 2a58b07 [maven-release-plugin] prepare release netty-4.1.116.Final
  • a739efa Adaptive: Add assert to guard against bugs related to chunk pooling (#14590)
  • 22cb4ec Fix race and leaks introduced in tests by a16f8aaf2ff101567a526916b46… (#14588)
  • ad104c6 Correctly gard aginst failure when running on systems with 1 core
  • a16f8aa Allow PcapWriteHandler to output PCAP files larger than 2GB (#14478)
  • dccfcc8 Adapt: Ensure Chunks from the central Queue are re-used even if there… (#14586)
  • fdc10c4 chore: use readRetainedSlice to avoid copy in SpdyFrameDecoder (#14573)
  • 46b11cc Adapt: Don't fail when we run on a host with 1 core (#14582) (#14584)
  • 6138a5a Adapt: Only add Chunk to central Queue if unused (#14580) (#14583)
  • 6c3041f Adaptive: Correctly restore allocatedBytes value on failure (#14577) (#14578)
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7845d63e4..338c5cd02 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ 11 UTF-8 - 4.1.115.Final + 4.1.116.Final 0.0.25.Final 1.18.0 2.0.16 From ab89c7c4c26ca4aab803d49bff1f5c92aa66dd7d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Dec 2024 20:56:32 +0530 Subject: [PATCH 118/167] Bump io.netty.incubator:netty-incubator-transport-native-io_uring from 0.0.25.Final to 0.0.26.Final (#2052) Bumps [io.netty.incubator:netty-incubator-transport-native-io_uring](https://github.com/netty/netty-incubator-transport-io_uring) from 0.0.25.Final to 0.0.26.Final.
Commits
  • 83607a9 [maven-release-plugin] prepare release netty-incubator-transport-parent-io_ur...
  • 360fc05 Update to netty 4.1.116.Final (#767) (#262)
  • 385823d Bump dawidd6/action-download-artifact from 3.0.0 to 6 in /.github/workflows (...
  • 2796864 Update dependencies (#259)
  • c2962b7 Explicit specify the platform for Docker files (#258)
  • 0e9c440 Add devcontainers for Linux (#257)
  • 6a3704b Update to netty 4.1.114.Final (#256)
  • 65b4234 Upgrade netty and netty-tcnative-boringssl-static (#255)
  • 4b74bc1 Upload hidden files for staging (#254)
  • b05fe91 Replace docker-compose with docker compose (#253)
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=io.netty.incubator:netty-incubator-transport-native-io_uring&package-manager=maven&previous-version=0.0.25.Final&new-version=0.0.26.Final)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 338c5cd02..c01de9918 100644 --- a/pom.xml +++ b/pom.xml @@ -46,7 +46,7 @@ UTF-8 4.1.116.Final - 0.0.25.Final + 0.0.26.Final 1.18.0 2.0.16 1.5.6-8 From 998f15c18c5b19f2f065617e2852cc159d792a0a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 01:38:47 +0530 Subject: [PATCH 119/167] Bump com.uber.nullaway:nullaway from 0.12.1 to 0.12.3 (#2055) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [com.uber.nullaway:nullaway](https://github.com/uber/NullAway) from 0.12.1 to 0.12.3.
Release notes

Sourced from com.uber.nullaway:nullaway's releases.

NullAway 0.12.3

  • Remove InferredJARModelsHandler (#1079)
  • Fix crash with annotation on enum (#1097)
  • Handle case null in switch statements (#1100)
  • Don't report errors for writes to @​NullUnmarked fields (#1102)
  • Support primitive static final fields as constant args in access paths (#1105)
  • Fix issue with annotations in module-info.java files (#1109)
  • Report error for @​nullable synchronized block expression (#1106)
  • Add support for parameter types with wildcards for JarInfer (#1107)
  • Properly handle nested generics and multiple wildcard type args in JarInfer (#1114)
  • Proper checking of vararg overrides with JSpecify annotations (#1116)
  • Add flag to indicate only @​NullMarked code should be checked (#1117)
  • Add support for static fields in contracts (#1118)
  • Maintenance
    • Fix comment positions (#1098)
    • [refactoring] Wrap calls to Types.subst and Types.memberType (#1115)
    • Build latest Caffeine on CI (#1111)

NullAway 0.12.2

  • Fix reading of JSpecify @​nullable annotations from varargs parameter in bytecode (#1089)
  • Fix JarInfer handling of generic types (#1078)
  • Fix another JSpecify mode crash involving raw types (#1086)
  • Fix bugs in handling of valueOf calls for map keys (#1085)
  • Suggest correct fix when array component of non-nullable array is made null. (#1087)
  • Substitute type arguments when checking type parameter nullability at call site (#1070)
  • Fix JarInfer parameter indexes for instance methods (#1071)
  • JSpecify mode: initial support for generic methods (with explicit type arguments at calls) (#1053)
  • Maintenance
    • Update to latest Error Prone and Error Prone Gradle plugin (#1064)
    • Refactor serialization adapter retrieval by version (#1066)
    • Remove fixes.tsv serialization from NullAway serialization service (#1063)
    • Enable javac -parameters flag (#1069)
    • Update to Gradle 8.11 (#1073)
    • Add test for issue 1035 (#1074)
    • remove use of deprecated Gradle API (#1076)
    • Update to Error Prone 2.36.0 (#1077)
Changelog

Sourced from com.uber.nullaway:nullaway's changelog.

Version 0.12.3

  • Remove InferredJARModelsHandler (#1079)
  • Fix crash with annotation on enum (#1097)
  • Handle case null in switch statements (#1100)
  • Don't report errors for writes to @​NullUnmarked fields (#1102)
  • Support primitive static final fields as constant args in access paths (#1105)
  • Fix issue with annotations in module-info.java files (#1109)
  • Report error for @​nullable synchronized block expression (#1106)
  • Add support for parameter types with wildcards for JarInfer (#1107)
  • Properly handle nested generics and multiple wildcard type args in JarInfer (#1114)
  • Proper checking of vararg overrides with JSpecify annotations (#1116)
  • Add flag to indicate only @​NullMarked code should be checked (#1117)
  • Add support for static fields in contracts (#1118)
  • Maintenance
    • Fix comment positions (#1098)
    • [refactoring] Wrap calls to Types.subst and Types.memberType (#1115)
    • Build latest Caffeine on CI (#1111)

Version 0.12.2

  • Fix reading of JSpecify @​nullable annotations from varargs parameter in bytecode (#1089)
  • Fix JarInfer handling of generic types (#1078)
  • Fix another JSpecify mode crash involving raw types (#1086)
  • Fix bugs in handling of valueOf calls for map keys (#1085)
  • Suggest correct fix when array component of non-nullable array is made null. (#1087)
  • Substitute type arguments when checking type parameter nullability at call site (#1070)
  • Fix JarInfer parameter indexes for instance methods (#1071)
  • JSpecify mode: initial support for generic methods (with explicit type arguments at calls) (#1053)
  • Maintenance
    • Update to latest Error Prone and Error Prone Gradle plugin (#1064)
    • Refactor serialization adapter retrieval by version (#1066)
    • Remove fixes.tsv serialization from NullAway serialization service (#1063)
    • Enable javac -parameters flag (#1069)
    • Update to Gradle 8.11 (#1073)
    • Add test for issue 1035 (#1074)
    • remove use of deprecated Gradle API (#1076)
    • Update to Error Prone 2.36.0 (#1077)
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.uber.nullaway:nullaway&package-manager=maven&previous-version=0.12.1&new-version=0.12.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c01de9918..8a442dd59 100644 --- a/pom.xml +++ b/pom.xml @@ -327,7 +327,7 @@ com.uber.nullaway nullaway - 0.12.1 + 0.12.3 From f75dfbe8c2c7d20743dd98707d21eafeed48525e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 01:39:01 +0530 Subject: [PATCH 120/167] Bump ch.qos.logback:logback-classic from 1.5.12 to 1.5.16 (#2054) Bumps [ch.qos.logback:logback-classic](https://github.com/qos-ch/logback) from 1.5.12 to 1.5.16.
Commits
  • 74c9ebd prepare release 1.5.16
  • 9308a58 javadocs structure changed
  • 8935470 adapt test to SLF4J version 2.0.16
  • cb60369 addded StubEventEvaluator as default class for evaluator element so as to dir...
  • 1da2f17 bump jxr version
  • 5bde644 bump slf4j version to 2.0.16
  • aa2ebae remove stax related code
  • 80db86b fix issues/860
  • a8a2303 start work on 1.5.16-SNAPSHOT
  • bf14c2c minor javadoc update
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ch.qos.logback:logback-classic&package-manager=maven&previous-version=1.5.12&new-version=1.5.16)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8a442dd59..8dfad9c98 100644 --- a/pom.xml +++ b/pom.xml @@ -51,7 +51,7 @@ 2.0.16 1.5.6-8 2.0.1 - 1.5.12 + 1.5.16 26.0.1 From bf63baf04ca17e2a94adb356bcc42f2acbc51847 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 01:39:14 +0530 Subject: [PATCH 121/167] Bump org.junit:junit-bom from 5.11.3 to 5.11.4 (#2046) Bumps [org.junit:junit-bom](https://github.com/junit-team/junit5) from 5.11.3 to 5.11.4.
Release notes

Sourced from org.junit:junit-bom's releases.

JUnit 5.11.4 = Platform 1.11.4 + Jupiter 5.11.4 + Vintage 5.11.4

See Release Notes.

Full Changelog: https://github.com/junit-team/junit5/compare/r5.11.3...r5.11.4

Commits
  • 6430ba4 Release 5.11.4
  • d093121 Finalize 5.11.4 release notes
  • 0444353 Fix Maven integration tests on JDK 24
  • b5c7f4e Move #4153 to 5.11.4 release notes
  • b20c4e2 Ensure the XMLStreamWriter is closed after use
  • 6376f0a Configure Git username and email
  • 2b485c4 Set reference repo URI
  • 500b5a0 Inject username and password via new DSL
  • d671961 Update plugin gitPublish to v5
  • 3d11279 Add JAVA_25 to JRE enum
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.junit:junit-bom&package-manager=maven&previous-version=5.11.3&new-version=5.11.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) You can trigger a rebase of this PR by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
> **Note** > Automatic rebases have been disabled on this pull request as it has been open for over 30 days. Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8dfad9c98..c83b5794a 100644 --- a/pom.xml +++ b/pom.xml @@ -105,7 +105,7 @@ org.junit junit-bom - 5.11.3 + 5.11.4 pom import From 86c2176dfb8cb93f246ff8a134906afac6982d74 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 2 Feb 2025 03:54:12 +0530 Subject: [PATCH 122/167] Bump org.jetbrains:annotations from 26.0.1 to 26.0.2 (#2058) Bumps [org.jetbrains:annotations](https://github.com/JetBrains/java-annotations) from 26.0.1 to 26.0.2.
Release notes

Sourced from org.jetbrains:annotations's releases.

26.0.2

  • Fixed missing klibs for apple artifacts.
Changelog

Sourced from org.jetbrains:annotations's changelog.

Version 26.0.2

  • Fixed missing klibs for apple artifacts.
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.jetbrains:annotations&package-manager=maven&previous-version=26.0.1&new-version=26.0.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c83b5794a..52d768182 100644 --- a/pom.xml +++ b/pom.xml @@ -52,7 +52,7 @@ 1.5.6-8 2.0.1 1.5.16 - 26.0.1 + 26.0.2 From 390c26b0890ca381b8865295801156e8e945ca98 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 2 Feb 2025 03:54:19 +0530 Subject: [PATCH 123/167] Bump com.github.luben:zstd-jni from 1.5.6-8 to 1.5.6-9 (#2057) Bumps [com.github.luben:zstd-jni](https://github.com/luben/zstd-jni) from 1.5.6-8 to 1.5.6-9.
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.github.luben:zstd-jni&package-manager=maven&previous-version=1.5.6-8&new-version=1.5.6-9)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 52d768182..71240c309 100644 --- a/pom.xml +++ b/pom.xml @@ -49,7 +49,7 @@ 0.0.26.Final 1.18.0 2.0.16 - 1.5.6-8 + 1.5.6-9 2.0.1 1.5.16 26.0.2 From eef8d9374b411d2bf0f42bf6452ee3b0333915c8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 2 Feb 2025 03:54:26 +0530 Subject: [PATCH 124/167] Bump netty.version from 4.1.116.Final to 4.1.117.Final (#2056) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [//]: # (dependabot-start) ⚠️ **Dependabot is rebasing this PR** ⚠️ Rebasing might not happen immediately, so don't worry if this takes some time. Note: if you make any changes to this PR yourself, they will take precedence over the rebase. --- [//]: # (dependabot-end) Bumps `netty.version` from 4.1.116.Final to 4.1.117.Final. Updates `io.netty:netty-buffer` from 4.1.116.Final to 4.1.117.Final
Commits
  • 3b03648 [maven-release-plugin] prepare release netty-4.1.117.Final
  • 28a81c6 Update java versions (#14660)
  • 1bd459a Correcly handle comments appended to nameserver declarations (#14658)
  • ad00d19 Add configure to be able to use perf / intellij profiler within devco… (#14661)
  • cd3dfe9 Update maven to 3.9.9 (#14654)
  • 4d1f98d Adaptive: Only use ThreadLocal if called from FastThreadLocalThread i… (#14656)
  • 01e14bc Provides Brotli settings without com.aayushatharva.brotli4j dependency (#14...
  • d5bad42 OpenSslSession: Add support to defensively check for peer certs (#14641)
  • b8e25e0 SslHandler: Ensure buffers are never leaked when wrap(...) produce SS… (#14647)
  • 9f0b38b Reentrant close in EmbeddedChannel (#14642)
  • Additional commits viewable in compare view

Updates `io.netty:netty-codec-http` from 4.1.116.Final to 4.1.117.Final
Commits
  • 3b03648 [maven-release-plugin] prepare release netty-4.1.117.Final
  • 28a81c6 Update java versions (#14660)
  • 1bd459a Correcly handle comments appended to nameserver declarations (#14658)
  • ad00d19 Add configure to be able to use perf / intellij profiler within devco… (#14661)
  • cd3dfe9 Update maven to 3.9.9 (#14654)
  • 4d1f98d Adaptive: Only use ThreadLocal if called from FastThreadLocalThread i… (#14656)
  • 01e14bc Provides Brotli settings without com.aayushatharva.brotli4j dependency (#14...
  • d5bad42 OpenSslSession: Add support to defensively check for peer certs (#14641)
  • b8e25e0 SslHandler: Ensure buffers are never leaked when wrap(...) produce SS… (#14647)
  • 9f0b38b Reentrant close in EmbeddedChannel (#14642)
  • Additional commits viewable in compare view

Updates `io.netty:netty-codec` from 4.1.116.Final to 4.1.117.Final
Commits
  • 3b03648 [maven-release-plugin] prepare release netty-4.1.117.Final
  • 28a81c6 Update java versions (#14660)
  • 1bd459a Correcly handle comments appended to nameserver declarations (#14658)
  • ad00d19 Add configure to be able to use perf / intellij profiler within devco… (#14661)
  • cd3dfe9 Update maven to 3.9.9 (#14654)
  • 4d1f98d Adaptive: Only use ThreadLocal if called from FastThreadLocalThread i… (#14656)
  • 01e14bc Provides Brotli settings without com.aayushatharva.brotli4j dependency (#14...
  • d5bad42 OpenSslSession: Add support to defensively check for peer certs (#14641)
  • b8e25e0 SslHandler: Ensure buffers are never leaked when wrap(...) produce SS… (#14647)
  • 9f0b38b Reentrant close in EmbeddedChannel (#14642)
  • Additional commits viewable in compare view

Updates `io.netty:netty-codec-socks` from 4.1.116.Final to 4.1.117.Final
Commits
  • 3b03648 [maven-release-plugin] prepare release netty-4.1.117.Final
  • 28a81c6 Update java versions (#14660)
  • 1bd459a Correcly handle comments appended to nameserver declarations (#14658)
  • ad00d19 Add configure to be able to use perf / intellij profiler within devco… (#14661)
  • cd3dfe9 Update maven to 3.9.9 (#14654)
  • 4d1f98d Adaptive: Only use ThreadLocal if called from FastThreadLocalThread i… (#14656)
  • 01e14bc Provides Brotli settings without com.aayushatharva.brotli4j dependency (#14...
  • d5bad42 OpenSslSession: Add support to defensively check for peer certs (#14641)
  • b8e25e0 SslHandler: Ensure buffers are never leaked when wrap(...) produce SS… (#14647)
  • 9f0b38b Reentrant close in EmbeddedChannel (#14642)
  • Additional commits viewable in compare view

Updates `io.netty:netty-handler-proxy` from 4.1.116.Final to 4.1.117.Final
Commits
  • 3b03648 [maven-release-plugin] prepare release netty-4.1.117.Final
  • 28a81c6 Update java versions (#14660)
  • 1bd459a Correcly handle comments appended to nameserver declarations (#14658)
  • ad00d19 Add configure to be able to use perf / intellij profiler within devco… (#14661)
  • cd3dfe9 Update maven to 3.9.9 (#14654)
  • 4d1f98d Adaptive: Only use ThreadLocal if called from FastThreadLocalThread i… (#14656)
  • 01e14bc Provides Brotli settings without com.aayushatharva.brotli4j dependency (#14...
  • d5bad42 OpenSslSession: Add support to defensively check for peer certs (#14641)
  • b8e25e0 SslHandler: Ensure buffers are never leaked when wrap(...) produce SS… (#14647)
  • 9f0b38b Reentrant close in EmbeddedChannel (#14642)
  • Additional commits viewable in compare view

Updates `io.netty:netty-common` from 4.1.116.Final to 4.1.117.Final
Commits
  • 3b03648 [maven-release-plugin] prepare release netty-4.1.117.Final
  • 28a81c6 Update java versions (#14660)
  • 1bd459a Correcly handle comments appended to nameserver declarations (#14658)
  • ad00d19 Add configure to be able to use perf / intellij profiler within devco… (#14661)
  • cd3dfe9 Update maven to 3.9.9 (#14654)
  • 4d1f98d Adaptive: Only use ThreadLocal if called from FastThreadLocalThread i… (#14656)
  • 01e14bc Provides Brotli settings without com.aayushatharva.brotli4j dependency (#14...
  • d5bad42 OpenSslSession: Add support to defensively check for peer certs (#14641)
  • b8e25e0 SslHandler: Ensure buffers are never leaked when wrap(...) produce SS… (#14647)
  • 9f0b38b Reentrant close in EmbeddedChannel (#14642)
  • Additional commits viewable in compare view

Updates `io.netty:netty-transport` from 4.1.116.Final to 4.1.117.Final
Commits
  • 3b03648 [maven-release-plugin] prepare release netty-4.1.117.Final
  • 28a81c6 Update java versions (#14660)
  • 1bd459a Correcly handle comments appended to nameserver declarations (#14658)
  • ad00d19 Add configure to be able to use perf / intellij profiler within devco… (#14661)
  • cd3dfe9 Update maven to 3.9.9 (#14654)
  • 4d1f98d Adaptive: Only use ThreadLocal if called from FastThreadLocalThread i… (#14656)
  • 01e14bc Provides Brotli settings without com.aayushatharva.brotli4j dependency (#14...
  • d5bad42 OpenSslSession: Add support to defensively check for peer certs (#14641)
  • b8e25e0 SslHandler: Ensure buffers are never leaked when wrap(...) produce SS… (#14647)
  • 9f0b38b Reentrant close in EmbeddedChannel (#14642)
  • Additional commits viewable in compare view

Updates `io.netty:netty-handler` from 4.1.116.Final to 4.1.117.Final
Commits
  • 3b03648 [maven-release-plugin] prepare release netty-4.1.117.Final
  • 28a81c6 Update java versions (#14660)
  • 1bd459a Correcly handle comments appended to nameserver declarations (#14658)
  • ad00d19 Add configure to be able to use perf / intellij profiler within devco… (#14661)
  • cd3dfe9 Update maven to 3.9.9 (#14654)
  • 4d1f98d Adaptive: Only use ThreadLocal if called from FastThreadLocalThread i… (#14656)
  • 01e14bc Provides Brotli settings without com.aayushatharva.brotli4j dependency (#14...
  • d5bad42 OpenSslSession: Add support to defensively check for peer certs (#14641)
  • b8e25e0 SslHandler: Ensure buffers are never leaked when wrap(...) produce SS… (#14647)
  • 9f0b38b Reentrant close in EmbeddedChannel (#14642)
  • Additional commits viewable in compare view

Updates `io.netty:netty-resolver-dns` from 4.1.116.Final to 4.1.117.Final
Commits
  • 3b03648 [maven-release-plugin] prepare release netty-4.1.117.Final
  • 28a81c6 Update java versions (#14660)
  • 1bd459a Correcly handle comments appended to nameserver declarations (#14658)
  • ad00d19 Add configure to be able to use perf / intellij profiler within devco… (#14661)
  • cd3dfe9 Update maven to 3.9.9 (#14654)
  • 4d1f98d Adaptive: Only use ThreadLocal if called from FastThreadLocalThread i… (#14656)
  • 01e14bc Provides Brotli settings without com.aayushatharva.brotli4j dependency (#14...
  • d5bad42 OpenSslSession: Add support to defensively check for peer certs (#14641)
  • b8e25e0 SslHandler: Ensure buffers are never leaked when wrap(...) produce SS… (#14647)
  • 9f0b38b Reentrant close in EmbeddedChannel (#14642)
  • Additional commits viewable in compare view

Updates `io.netty:netty-transport-native-epoll` from 4.1.116.Final to 4.1.117.Final
Commits
  • 3b03648 [maven-release-plugin] prepare release netty-4.1.117.Final
  • 28a81c6 Update java versions (#14660)
  • 1bd459a Correcly handle comments appended to nameserver declarations (#14658)
  • ad00d19 Add configure to be able to use perf / intellij profiler within devco… (#14661)
  • cd3dfe9 Update maven to 3.9.9 (#14654)
  • 4d1f98d Adaptive: Only use ThreadLocal if called from FastThreadLocalThread i… (#14656)
  • 01e14bc Provides Brotli settings without com.aayushatharva.brotli4j dependency (#14...
  • d5bad42 OpenSslSession: Add support to defensively check for peer certs (#14641)
  • b8e25e0 SslHandler: Ensure buffers are never leaked when wrap(...) produce SS… (#14647)
  • 9f0b38b Reentrant close in EmbeddedChannel (#14642)
  • Additional commits viewable in compare view

Updates `io.netty:netty-transport-native-kqueue` from 4.1.116.Final to 4.1.117.Final
Commits
  • 3b03648 [maven-release-plugin] prepare release netty-4.1.117.Final
  • 28a81c6 Update java versions (#14660)
  • 1bd459a Correcly handle comments appended to nameserver declarations (#14658)
  • ad00d19 Add configure to be able to use perf / intellij profiler within devco… (#14661)
  • cd3dfe9 Update maven to 3.9.9 (#14654)
  • 4d1f98d Adaptive: Only use ThreadLocal if called from FastThreadLocalThread i… (#14656)
  • 01e14bc Provides Brotli settings without com.aayushatharva.brotli4j dependency (#14...
  • d5bad42 OpenSslSession: Add support to defensively check for peer certs (#14641)
  • b8e25e0 SslHandler: Ensure buffers are never leaked when wrap(...) produce SS… (#14647)
  • 9f0b38b Reentrant close in EmbeddedChannel (#14642)
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 71240c309..9dfe832a7 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ 11 UTF-8 - 4.1.116.Final + 4.1.117.Final 0.0.26.Final 1.18.0 2.0.16 From a4a3746b6461181221513870dded579cb041e4bc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Feb 2025 03:23:19 +0530 Subject: [PATCH 125/167] Bump netty.version from 4.1.117.Final to 4.1.118.Final (#2060) Bumps `netty.version` from 4.1.117.Final to 4.1.118.Final. Updates `io.netty:netty-buffer` from 4.1.117.Final to 4.1.118.Final
Commits
  • 36f95cf [maven-release-plugin] prepare release netty-4.1.118.Final
  • 87f4072 Merge commit from fork
  • d1fbda6 Merge commit from fork
  • f844d78 Upgrade netty-tcnative to 2.0.70.Final (#14790)
  • 8afb5d9 Only run 2 jobs with leak detection to minimize build times (#14784)
  • f2c27da AdaptivePoolingAllocator: Round chunk sizes up to MIN_CHUNK_SIZE units and re...
  • 8d387ff Change the default AdaptiveRecvByteBufAllocator buffer size values' visibilit...
  • 1cfd3a6 Fix possible buffer leak when stream can't be mapped (#14746)
  • 8f9eadb Fix AccessControlException in GlobalEventExecutor (#14743)
  • 6fcd3e6 KQueueEventLoop leaks memory on shutdown. (#14745)
  • Additional commits viewable in compare view

Updates `io.netty:netty-codec-http` from 4.1.117.Final to 4.1.118.Final
Commits
  • 36f95cf [maven-release-plugin] prepare release netty-4.1.118.Final
  • 87f4072 Merge commit from fork
  • d1fbda6 Merge commit from fork
  • f844d78 Upgrade netty-tcnative to 2.0.70.Final (#14790)
  • 8afb5d9 Only run 2 jobs with leak detection to minimize build times (#14784)
  • f2c27da AdaptivePoolingAllocator: Round chunk sizes up to MIN_CHUNK_SIZE units and re...
  • 8d387ff Change the default AdaptiveRecvByteBufAllocator buffer size values' visibilit...
  • 1cfd3a6 Fix possible buffer leak when stream can't be mapped (#14746)
  • 8f9eadb Fix AccessControlException in GlobalEventExecutor (#14743)
  • 6fcd3e6 KQueueEventLoop leaks memory on shutdown. (#14745)
  • Additional commits viewable in compare view

Updates `io.netty:netty-codec` from 4.1.117.Final to 4.1.118.Final
Commits
  • 36f95cf [maven-release-plugin] prepare release netty-4.1.118.Final
  • 87f4072 Merge commit from fork
  • d1fbda6 Merge commit from fork
  • f844d78 Upgrade netty-tcnative to 2.0.70.Final (#14790)
  • 8afb5d9 Only run 2 jobs with leak detection to minimize build times (#14784)
  • f2c27da AdaptivePoolingAllocator: Round chunk sizes up to MIN_CHUNK_SIZE units and re...
  • 8d387ff Change the default AdaptiveRecvByteBufAllocator buffer size values' visibilit...
  • 1cfd3a6 Fix possible buffer leak when stream can't be mapped (#14746)
  • 8f9eadb Fix AccessControlException in GlobalEventExecutor (#14743)
  • 6fcd3e6 KQueueEventLoop leaks memory on shutdown. (#14745)
  • Additional commits viewable in compare view

Updates `io.netty:netty-codec-socks` from 4.1.117.Final to 4.1.118.Final
Commits
  • 36f95cf [maven-release-plugin] prepare release netty-4.1.118.Final
  • 87f4072 Merge commit from fork
  • d1fbda6 Merge commit from fork
  • f844d78 Upgrade netty-tcnative to 2.0.70.Final (#14790)
  • 8afb5d9 Only run 2 jobs with leak detection to minimize build times (#14784)
  • f2c27da AdaptivePoolingAllocator: Round chunk sizes up to MIN_CHUNK_SIZE units and re...
  • 8d387ff Change the default AdaptiveRecvByteBufAllocator buffer size values' visibilit...
  • 1cfd3a6 Fix possible buffer leak when stream can't be mapped (#14746)
  • 8f9eadb Fix AccessControlException in GlobalEventExecutor (#14743)
  • 6fcd3e6 KQueueEventLoop leaks memory on shutdown. (#14745)
  • Additional commits viewable in compare view

Updates `io.netty:netty-handler-proxy` from 4.1.117.Final to 4.1.118.Final
Commits
  • 36f95cf [maven-release-plugin] prepare release netty-4.1.118.Final
  • 87f4072 Merge commit from fork
  • d1fbda6 Merge commit from fork
  • f844d78 Upgrade netty-tcnative to 2.0.70.Final (#14790)
  • 8afb5d9 Only run 2 jobs with leak detection to minimize build times (#14784)
  • f2c27da AdaptivePoolingAllocator: Round chunk sizes up to MIN_CHUNK_SIZE units and re...
  • 8d387ff Change the default AdaptiveRecvByteBufAllocator buffer size values' visibilit...
  • 1cfd3a6 Fix possible buffer leak when stream can't be mapped (#14746)
  • 8f9eadb Fix AccessControlException in GlobalEventExecutor (#14743)
  • 6fcd3e6 KQueueEventLoop leaks memory on shutdown. (#14745)
  • Additional commits viewable in compare view

Updates `io.netty:netty-common` from 4.1.117.Final to 4.1.118.Final
Commits
  • 36f95cf [maven-release-plugin] prepare release netty-4.1.118.Final
  • 87f4072 Merge commit from fork
  • d1fbda6 Merge commit from fork
  • f844d78 Upgrade netty-tcnative to 2.0.70.Final (#14790)
  • 8afb5d9 Only run 2 jobs with leak detection to minimize build times (#14784)
  • f2c27da AdaptivePoolingAllocator: Round chunk sizes up to MIN_CHUNK_SIZE units and re...
  • 8d387ff Change the default AdaptiveRecvByteBufAllocator buffer size values' visibilit...
  • 1cfd3a6 Fix possible buffer leak when stream can't be mapped (#14746)
  • 8f9eadb Fix AccessControlException in GlobalEventExecutor (#14743)
  • 6fcd3e6 KQueueEventLoop leaks memory on shutdown. (#14745)
  • Additional commits viewable in compare view

Updates `io.netty:netty-transport` from 4.1.117.Final to 4.1.118.Final
Commits
  • 36f95cf [maven-release-plugin] prepare release netty-4.1.118.Final
  • 87f4072 Merge commit from fork
  • d1fbda6 Merge commit from fork
  • f844d78 Upgrade netty-tcnative to 2.0.70.Final (#14790)
  • 8afb5d9 Only run 2 jobs with leak detection to minimize build times (#14784)
  • f2c27da AdaptivePoolingAllocator: Round chunk sizes up to MIN_CHUNK_SIZE units and re...
  • 8d387ff Change the default AdaptiveRecvByteBufAllocator buffer size values' visibilit...
  • 1cfd3a6 Fix possible buffer leak when stream can't be mapped (#14746)
  • 8f9eadb Fix AccessControlException in GlobalEventExecutor (#14743)
  • 6fcd3e6 KQueueEventLoop leaks memory on shutdown. (#14745)
  • Additional commits viewable in compare view

Updates `io.netty:netty-handler` from 4.1.117.Final to 4.1.118.Final
Commits
  • 36f95cf [maven-release-plugin] prepare release netty-4.1.118.Final
  • 87f4072 Merge commit from fork
  • d1fbda6 Merge commit from fork
  • f844d78 Upgrade netty-tcnative to 2.0.70.Final (#14790)
  • 8afb5d9 Only run 2 jobs with leak detection to minimize build times (#14784)
  • f2c27da AdaptivePoolingAllocator: Round chunk sizes up to MIN_CHUNK_SIZE units and re...
  • 8d387ff Change the default AdaptiveRecvByteBufAllocator buffer size values' visibilit...
  • 1cfd3a6 Fix possible buffer leak when stream can't be mapped (#14746)
  • 8f9eadb Fix AccessControlException in GlobalEventExecutor (#14743)
  • 6fcd3e6 KQueueEventLoop leaks memory on shutdown. (#14745)
  • Additional commits viewable in compare view

Updates `io.netty:netty-resolver-dns` from 4.1.117.Final to 4.1.118.Final
Commits
  • 36f95cf [maven-release-plugin] prepare release netty-4.1.118.Final
  • 87f4072 Merge commit from fork
  • d1fbda6 Merge commit from fork
  • f844d78 Upgrade netty-tcnative to 2.0.70.Final (#14790)
  • 8afb5d9 Only run 2 jobs with leak detection to minimize build times (#14784)
  • f2c27da AdaptivePoolingAllocator: Round chunk sizes up to MIN_CHUNK_SIZE units and re...
  • 8d387ff Change the default AdaptiveRecvByteBufAllocator buffer size values' visibilit...
  • 1cfd3a6 Fix possible buffer leak when stream can't be mapped (#14746)
  • 8f9eadb Fix AccessControlException in GlobalEventExecutor (#14743)
  • 6fcd3e6 KQueueEventLoop leaks memory on shutdown. (#14745)
  • Additional commits viewable in compare view

Updates `io.netty:netty-transport-native-epoll` from 4.1.117.Final to 4.1.118.Final
Commits
  • 36f95cf [maven-release-plugin] prepare release netty-4.1.118.Final
  • 87f4072 Merge commit from fork
  • d1fbda6 Merge commit from fork
  • f844d78 Upgrade netty-tcnative to 2.0.70.Final (#14790)
  • 8afb5d9 Only run 2 jobs with leak detection to minimize build times (#14784)
  • f2c27da AdaptivePoolingAllocator: Round chunk sizes up to MIN_CHUNK_SIZE units and re...
  • 8d387ff Change the default AdaptiveRecvByteBufAllocator buffer size values' visibilit...
  • 1cfd3a6 Fix possible buffer leak when stream can't be mapped (#14746)
  • 8f9eadb Fix AccessControlException in GlobalEventExecutor (#14743)
  • 6fcd3e6 KQueueEventLoop leaks memory on shutdown. (#14745)
  • Additional commits viewable in compare view

Updates `io.netty:netty-transport-native-kqueue` from 4.1.117.Final to 4.1.118.Final
Commits
  • 36f95cf [maven-release-plugin] prepare release netty-4.1.118.Final
  • 87f4072 Merge commit from fork
  • d1fbda6 Merge commit from fork
  • f844d78 Upgrade netty-tcnative to 2.0.70.Final (#14790)
  • 8afb5d9 Only run 2 jobs with leak detection to minimize build times (#14784)
  • f2c27da AdaptivePoolingAllocator: Round chunk sizes up to MIN_CHUNK_SIZE units and re...
  • 8d387ff Change the default AdaptiveRecvByteBufAllocator buffer size values' visibilit...
  • 1cfd3a6 Fix possible buffer leak when stream can't be mapped (#14746)
  • 8f9eadb Fix AccessControlException in GlobalEventExecutor (#14743)
  • 6fcd3e6 KQueueEventLoop leaks memory on shutdown. (#14745)
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9dfe832a7..68d95dc04 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ 11 UTF-8 - 4.1.117.Final + 4.1.118.Final 0.0.26.Final 1.18.0 2.0.16 From 6fa2efd3f9af636bf192a452698044a9829cf8ef Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Feb 2025 03:23:35 +0530 Subject: [PATCH 126/167] Bump org.apache.tomcat.embed:tomcat-embed-core from 10.1.34 to 10.1.35 (#2061) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [//]: # (dependabot-start) ⚠️ **Dependabot is rebasing this PR** ⚠️ Rebasing might not happen immediately, so don't worry if this takes some time. Note: if you make any changes to this PR yourself, they will take precedence over the rebase. --- [//]: # (dependabot-end) Bumps org.apache.tomcat.embed:tomcat-embed-core from 10.1.34 to 10.1.35.
Most Recent Ignore Conditions Applied to This Pull Request | Dependency Name | Ignore Conditions | | --- | --- | | org.apache.tomcat.embed:tomcat-embed-core | [>= 11.a0, < 12] |
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.apache.tomcat.embed:tomcat-embed-core&package-manager=maven&previous-version=10.1.34&new-version=10.1.35)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- client/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/pom.xml b/client/pom.xml index b2e551d5a..f035ac57c 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -31,7 +31,7 @@ org.asynchttpclient.client 11.0.24 - 10.1.34 + 10.1.35 2.18.0 4.11.0 3.0 From 6c2cc553201581eb5a0ec348f67b064ae32c770f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Feb 2025 03:23:45 +0530 Subject: [PATCH 127/167] Bump io.github.nettyplus:netty-leak-detector-junit-extension from 0.0.5 to 0.0.6 (#2062) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [//]: # (dependabot-start) ⚠️ **Dependabot is rebasing this PR** ⚠️ Rebasing might not happen immediately, so don't worry if this takes some time. Note: if you make any changes to this PR yourself, they will take precedence over the rebase. --- [//]: # (dependabot-end) Bumps [io.github.nettyplus:netty-leak-detector-junit-extension](https://github.com/nettyplus/netty-leak-detector-junit-extension) from 0.0.5 to 0.0.6.
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=io.github.nettyplus:netty-leak-detector-junit-extension&package-manager=maven&previous-version=0.0.5&new-version=0.0.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 68d95dc04..8ea2684ca 100644 --- a/pom.xml +++ b/pom.xml @@ -112,7 +112,7 @@ io.github.nettyplus netty-leak-detector-junit-extension - 0.0.5 + 0.0.6 From 3972890fbb63ae96faafc7e1892416915b619fd6 Mon Sep 17 00:00:00 2001 From: sullis Date: Thu, 13 Feb 2025 14:05:52 -0800 Subject: [PATCH 128/167] netty leak detector 0.0.6 (#2059) Co-authored-by: Aayush Atharva From 11a15c388a930515eefc93f03fd0997200481b7d Mon Sep 17 00:00:00 2001 From: sullis Date: Sat, 15 Feb 2025 21:34:21 -0800 Subject: [PATCH 129/167] enable leak detection in AutomaticDecompressionTest (#2064) use Netty Leak Detector JUnit extension in AutomaticDecompressionTest ``` https://github.com/nettyplus/netty-leak-detector-junit-extension ``` --- .../java/org/asynchttpclient/AutomaticDecompressionTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/src/test/java/org/asynchttpclient/AutomaticDecompressionTest.java b/client/src/test/java/org/asynchttpclient/AutomaticDecompressionTest.java index dfd0a9446..0f9843af1 100644 --- a/client/src/test/java/org/asynchttpclient/AutomaticDecompressionTest.java +++ b/client/src/test/java/org/asynchttpclient/AutomaticDecompressionTest.java @@ -22,6 +22,7 @@ import com.sun.net.httpserver.HttpExchange; import com.sun.net.httpserver.HttpHandler; import com.sun.net.httpserver.HttpServer; +import io.github.nettyplus.leakdetector.junit.NettyLeakDetectorExtension; import io.netty.handler.codec.compression.Brotli; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; @@ -35,9 +36,11 @@ import java.util.List; import java.util.stream.Collectors; import java.util.zip.GZIPOutputStream; +import org.junit.jupiter.api.extension.ExtendWith; import static org.junit.jupiter.api.Assertions.assertEquals; +@ExtendWith(NettyLeakDetectorExtension.class) public class AutomaticDecompressionTest { private static final String UNCOMPRESSED_PAYLOAD = "a".repeat(500); From 182ab1b36b603eeebe85ee05da269f18c710278b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 16 Feb 2025 11:04:37 +0530 Subject: [PATCH 130/167] Bump com.github.luben:zstd-jni from 1.5.6-9 to 1.5.6-10 (#2063) Bumps [com.github.luben:zstd-jni](https://github.com/luben/zstd-jni) from 1.5.6-9 to 1.5.6-10.
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.github.luben:zstd-jni&package-manager=maven&previous-version=1.5.6-9&new-version=1.5.6-10)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8ea2684ca..18c754452 100644 --- a/pom.xml +++ b/pom.xml @@ -49,7 +49,7 @@ 0.0.26.Final 1.18.0 2.0.16 - 1.5.6-9 + 1.5.6-10 2.0.1 1.5.16 26.0.2 From 600520c9810052c1c80925ed6041795a48e22a18 Mon Sep 17 00:00:00 2001 From: sullis Date: Mon, 17 Feb 2025 08:58:39 -0800 Subject: [PATCH 131/167] use larger payload in AutomaticDecompressionTest (#2065) --- .../java/org/asynchttpclient/AutomaticDecompressionTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/test/java/org/asynchttpclient/AutomaticDecompressionTest.java b/client/src/test/java/org/asynchttpclient/AutomaticDecompressionTest.java index 0f9843af1..8f57ffb88 100644 --- a/client/src/test/java/org/asynchttpclient/AutomaticDecompressionTest.java +++ b/client/src/test/java/org/asynchttpclient/AutomaticDecompressionTest.java @@ -42,7 +42,7 @@ @ExtendWith(NettyLeakDetectorExtension.class) public class AutomaticDecompressionTest { - private static final String UNCOMPRESSED_PAYLOAD = "a".repeat(500); + private static final String UNCOMPRESSED_PAYLOAD = "a".repeat(50_000); private static HttpServer HTTP_SERVER; From f19415223262b3333212652aeae47040dc006919 Mon Sep 17 00:00:00 2001 From: Jason Joo Date: Mon, 10 Mar 2025 03:09:46 +0800 Subject: [PATCH 132/167] fix: inappropriate connection reuse when using HTTP proxy if the initial CONNECT failed (#2072) # What This MR Resolves A CONNECT request is needed to sent to the HTTP proxy first before the actual client request to establish the tunnel on the proxy. A `HTTP/1.1 200 Connection established` is expected for the initial CONNECT request. Only when the CONNECT is successful, the client continues sending the actual request through the "tunnel". And when CONNECT failed, the connection remains the initial state `unconnected`. There are following circumstances that a CONNECT fails under but not limited to following situations: - The destination is not whitelisted. - The dest domain can't be resolved(timeout/SERVFAIL/NX/etc.). - The dest IP can't be connected(timeout/unreachable/etc.). There could be 2 following strategies to deal with CONNECT failures on the client side: 1. Close the connection before return to the caller. 2. Mark this connection "unconnected" and put it into the pool. Then retry the CONNECT next time it's picked out of the pool. The 2nd one needs to add extra state to Channel in the manager which brings bigger change to the code. This MR employs the 1st strategy to resolve it. The issue is described in #2071 . # Readings The CONNECT is documented in `Section 5.3` in RFC2871: https://www.ietf.org/rfc/rfc2817.txt The proxy won't actively terminate the connection if the CONNECT failed if keep-alive is enabled. Unless the tunnel is established and there is any communication failures in the middle. Therefore the client needs to deal with this error by its own. Signed-off-by: Jason Joo --- .../netty/handler/HttpHandler.java | 11 +++-- .../asynchttpclient/proxy/HttpsProxyTest.java | 45 ++++++++++++++++++- 2 files changed, 52 insertions(+), 4 deletions(-) diff --git a/client/src/main/java/org/asynchttpclient/netty/handler/HttpHandler.java b/client/src/main/java/org/asynchttpclient/netty/handler/HttpHandler.java index 06ec46a2b..99a23c7e9 100755 --- a/client/src/main/java/org/asynchttpclient/netty/handler/HttpHandler.java +++ b/client/src/main/java/org/asynchttpclient/netty/handler/HttpHandler.java @@ -21,6 +21,7 @@ import io.netty.handler.codec.DecoderResultProvider; import io.netty.handler.codec.http.HttpContent; import io.netty.handler.codec.http.HttpHeaders; +import io.netty.handler.codec.http.HttpMethod; import io.netty.handler.codec.http.HttpRequest; import io.netty.handler.codec.http.HttpResponse; import io.netty.handler.codec.http.LastHttpContent; @@ -32,6 +33,7 @@ import org.asynchttpclient.netty.NettyResponseStatus; import org.asynchttpclient.netty.channel.ChannelManager; import org.asynchttpclient.netty.request.NettyRequestSender; +import org.asynchttpclient.util.HttpConstants.ResponseStatusCodes; import java.io.IOException; import java.net.InetSocketAddress; @@ -43,8 +45,11 @@ public HttpHandler(AsyncHttpClientConfig config, ChannelManager channelManager, super(config, channelManager, requestSender); } - private static boolean abortAfterHandlingStatus(AsyncHandler handler, NettyResponseStatus status) throws Exception { - return handler.onStatusReceived(status) == State.ABORT; + private static boolean abortAfterHandlingStatus(AsyncHandler handler, HttpMethod httpMethod, NettyResponseStatus status) throws Exception { + // For non-200 response of a CONNECT request, it's still unconnected. + // We need to either close the connection or reuse it but send CONNECT request again. + // The former one is easier or we have to attach more state to Channel. + return handler.onStatusReceived(status) == State.ABORT || httpMethod == HttpMethod.CONNECT && status.getStatusCode() != ResponseStatusCodes.OK_200; } private static boolean abortAfterHandlingHeaders(AsyncHandler handler, HttpHeaders responseHeaders) throws Exception { @@ -61,7 +66,7 @@ private void handleHttpResponse(final HttpResponse response, final Channel chann HttpHeaders responseHeaders = response.headers(); if (!interceptors.exitAfterIntercept(channel, future, handler, response, status, responseHeaders)) { - boolean abort = abortAfterHandlingStatus(handler, status) || abortAfterHandlingHeaders(handler, responseHeaders); + boolean abort = abortAfterHandlingStatus(handler, httpRequest.method(), status) || abortAfterHandlingHeaders(handler, responseHeaders); if (abort) { finishUpdate(future, channel, true); } diff --git a/client/src/test/java/org/asynchttpclient/proxy/HttpsProxyTest.java b/client/src/test/java/org/asynchttpclient/proxy/HttpsProxyTest.java index 6c4109aec..011f15d78 100644 --- a/client/src/test/java/org/asynchttpclient/proxy/HttpsProxyTest.java +++ b/client/src/test/java/org/asynchttpclient/proxy/HttpsProxyTest.java @@ -13,14 +13,21 @@ package org.asynchttpclient.proxy; import io.github.artsok.RepeatedIfExceptionsTest; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; + import org.asynchttpclient.AbstractBasicTest; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; import org.asynchttpclient.RequestBuilder; import org.asynchttpclient.Response; +import org.asynchttpclient.proxy.ProxyServer.Builder; import org.asynchttpclient.request.body.generator.ByteArrayBodyGenerator; import org.asynchttpclient.test.EchoHandler; +import org.asynchttpclient.util.HttpConstants; import org.eclipse.jetty.proxy.ConnectHandler; +import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.ServerConnector; import org.eclipse.jetty.server.handler.AbstractHandler; @@ -37,6 +44,8 @@ import static org.asynchttpclient.test.TestUtils.addHttpsConnector; import static org.junit.jupiter.api.Assertions.assertEquals; +import java.io.IOException; + /** * Proxy usage tests. */ @@ -46,7 +55,7 @@ public class HttpsProxyTest extends AbstractBasicTest { @Override public AbstractHandler configureHandler() throws Exception { - return new ConnectHandler(); + return new ProxyHandler(); } @Override @@ -142,4 +151,38 @@ public void testPooledConnectionsWithProxy() throws Exception { assertEquals(200, response2.getStatusCode()); } } + + @RepeatedIfExceptionsTest(repeats = 5) + public void testFailedConnectWithProxy() throws Exception { + try (AsyncHttpClient asyncHttpClient = asyncHttpClient(config().setFollowRedirect(true).setUseInsecureTrustManager(true).setKeepAlive(true))) { + Builder proxyServer = proxyServer("localhost", port1); + proxyServer.setCustomHeaders(r -> r.getHeaders().add(ProxyHandler.HEADER_FORBIDDEN, "1")); + RequestBuilder rb = get(getTargetUrl2()).setProxyServer(proxyServer); + + Response response1 = asyncHttpClient.executeRequest(rb.build()).get(); + assertEquals(403, response1.getStatusCode()); + + Response response2 = asyncHttpClient.executeRequest(rb.build()).get(); + assertEquals(403, response2.getStatusCode()); + + Response response3 = asyncHttpClient.executeRequest(rb.build()).get(); + assertEquals(403, response3.getStatusCode()); + } + } + + public static class ProxyHandler extends ConnectHandler { + final static String HEADER_FORBIDDEN = "X-REJECT-REQUEST"; + + @Override + public void handle(String s, Request r, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { + if (HttpConstants.Methods.CONNECT.equalsIgnoreCase(request.getMethod())) { + if (request.getHeader(HEADER_FORBIDDEN) != null) { + response.setStatus(HttpServletResponse.SC_FORBIDDEN); + r.setHandled(true); + return; + } + } + super.handle(s, r, request, response); + } + } } From c06dcab48c85bb84f071124a97898d56130dbcc6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Mar 2025 00:40:16 +0530 Subject: [PATCH 133/167] Bump org.apache.maven.plugins:maven-compiler-plugin from 3.13.0 to 3.14.0 (#2069) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.13.0 to 3.14.0.
Release notes

Sourced from org.apache.maven.plugins:maven-compiler-plugin's releases.

3.14.0

🚀 New features and improvements

🐛 Bug Fixes

📦 Dependency updates

👻 Maintenance

🔧 Build

Commits
  • b5e7d9b [maven-release-plugin] prepare release maven-compiler-plugin-3.14.0
  • 9134f12 Enable GitHub Issues
  • 19b8b12 Update scm tag according to branch
  • 09dce4e [MCOMPILER-579] allow module-version configuration (#273)
  • f7c3c5f Bump org.codehaus.plexus:plexus-java from 1.2.0 to 1.4.0
  • 764a54b [MNGSITE-529] Rename "Goals" to "Plugin Documentation"
  • cfacbc1 PR Automation only on close event
  • 5c26bba Use JUnit version from parent
  • 5449407 [MCOMPILER-529] Update docs about version schema (Maven 3)
  • 01d5b88 Bump mavenVersion from 3.6.3 to 3.9.9 (#283)
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.apache.maven.plugins:maven-compiler-plugin&package-manager=maven&previous-version=3.13.0&new-version=3.14.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 18c754452..6393a3ac5 100644 --- a/pom.xml +++ b/pom.xml @@ -293,7 +293,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.13.0 + 3.14.0 11 11 From 8f314527ffa7fa091f8cb115f7012ae01b9cc7f5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Mar 2025 00:40:29 +0530 Subject: [PATCH 134/167] Bump com.github.luben:zstd-jni from 1.5.6-10 to 1.5.7-1 (#2067) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [//]: # (dependabot-start) ⚠️ **Dependabot is rebasing this PR** ⚠️ Rebasing might not happen immediately, so don't worry if this takes some time. Note: if you make any changes to this PR yourself, they will take precedence over the rebase. --- [//]: # (dependabot-end) Bumps [com.github.luben:zstd-jni](https://github.com/luben/zstd-jni) from 1.5.6-10 to 1.5.7-1.
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.github.luben:zstd-jni&package-manager=maven&previous-version=1.5.6-10&new-version=1.5.7-1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6393a3ac5..bc92eb92e 100644 --- a/pom.xml +++ b/pom.xml @@ -49,7 +49,7 @@ 0.0.26.Final 1.18.0 2.0.16 - 1.5.6-10 + 1.5.7-1 2.0.1 1.5.16 26.0.2 From 8189c92e5ab1e2a34d326cdc13d66de02b99ce67 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Mar 2025 00:40:43 +0530 Subject: [PATCH 135/167] Bump org.apache.tomcat.embed:tomcat-embed-core from 10.1.35 to 10.1.36 (#2066) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [//]: # (dependabot-start) ⚠️ **Dependabot is rebasing this PR** ⚠️ Rebasing might not happen immediately, so don't worry if this takes some time. Note: if you make any changes to this PR yourself, they will take precedence over the rebase. --- [//]: # (dependabot-end) Bumps org.apache.tomcat.embed:tomcat-embed-core from 10.1.35 to 10.1.36.
Most Recent Ignore Conditions Applied to This Pull Request | Dependency Name | Ignore Conditions | | --- | --- | | org.apache.tomcat.embed:tomcat-embed-core | [>= 11.a0, < 12] |
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.apache.tomcat.embed:tomcat-embed-core&package-manager=maven&previous-version=10.1.35&new-version=10.1.36)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- client/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/pom.xml b/client/pom.xml index f035ac57c..826ee0db8 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -31,7 +31,7 @@ org.asynchttpclient.client 11.0.24 - 10.1.35 + 10.1.36 2.18.0 4.11.0 3.0 From a9a3a7eb5a1df87fb2a5b5fd23eeb7519435ab4a Mon Sep 17 00:00:00 2001 From: Jason Joo Date: Sat, 15 Mar 2025 01:50:47 +0800 Subject: [PATCH 136/167] fix: send CONNECT first when recovering a HTTPS request (#2077) # Issue description AHC has retry mechanism enabled with up to 5 attempts by default. But the initial CONNECT is omitted when recovering the HTTPS requests with IO exceptions. This MR fixes this issue and guarantees the proper workflow in retries. It's related to #2071 and fixes a different failing case. # How the issue is fixed * For any new connections, make sure there is an initial CONNECT for WebSocket/HTTPS request. * For the condition check that a CONNECT has been sent, make sure the connection the current future attaches is reusable/active. # Unit test IOException has various reasons but in the unit test, we emulate it by closing the connection after receiving the CONNECT request. The internal recovery process will retry another 4 times, and through an IOException eventually. Signed-off-by: Jason Joo --- .../netty/request/NettyRequestSender.java | 29 +++++++++++++----- .../asynchttpclient/proxy/HttpsProxyTest.java | 30 +++++++++++++++++-- 2 files changed, 50 insertions(+), 9 deletions(-) diff --git a/client/src/main/java/org/asynchttpclient/netty/request/NettyRequestSender.java b/client/src/main/java/org/asynchttpclient/netty/request/NettyRequestSender.java index 9fff868b2..b66dd713d 100755 --- a/client/src/main/java/org/asynchttpclient/netty/request/NettyRequestSender.java +++ b/client/src/main/java/org/asynchttpclient/netty/request/NettyRequestSender.java @@ -97,6 +97,13 @@ public NettyRequestSender(AsyncHttpClientConfig config, ChannelManager channelMa requestFactory = new NettyRequestFactory(config); } + // needConnect returns true if the request is secure/websocket and a HTTP proxy is set + private boolean needConnect(final Request request, final ProxyServer proxyServer) { + return proxyServer != null + && proxyServer.getProxyType().isHttp() + && (request.getUri().isSecured() || request.getUri().isWebSocket()); + } + public ListenableFuture sendRequest(final Request request, final AsyncHandler asyncHandler, NettyResponseFuture future) { if (isClosed()) { throw new IllegalStateException("Closed"); @@ -106,9 +113,7 @@ public ListenableFuture sendRequest(final Request request, final AsyncHan ProxyServer proxyServer = getProxyServer(config, request); // WebSockets use connect tunneling to work with proxies - if (proxyServer != null && proxyServer.getProxyType().isHttp() && - (request.getUri().isSecured() || request.getUri().isWebSocket()) && - !isConnectAlreadyDone(request, future)) { + if (needConnect(request, proxyServer) && !isConnectAlreadyDone(request, future)) { // Proxy with HTTPS or WebSocket: CONNECT for sure if (future != null && future.isConnectAllowed()) { // Perform CONNECT @@ -125,6 +130,8 @@ public ListenableFuture sendRequest(final Request request, final AsyncHan private static boolean isConnectAlreadyDone(Request request, NettyResponseFuture future) { return future != null + // If the channel can't be reused or closed, a CONNECT is still required + && future.isReuseChannel() && Channels.isChannelActive(future.channel()) && future.getNettyRequest() != null && future.getNettyRequest().getHttpRequest().method() == HttpMethod.CONNECT && !request.getMethod().equals(CONNECT); @@ -137,11 +144,19 @@ private static boolean isConnectAlreadyDone(Request request, NettyResponseFuture */ private ListenableFuture sendRequestWithCertainForceConnect(Request request, AsyncHandler asyncHandler, NettyResponseFuture future, ProxyServer proxyServer, boolean performConnectRequest) { - NettyResponseFuture newFuture = newNettyRequestAndResponseFuture(request, asyncHandler, future, proxyServer, performConnectRequest); Channel channel = getOpenChannel(future, request, proxyServer, asyncHandler); - return Channels.isChannelActive(channel) - ? sendRequestWithOpenChannel(newFuture, asyncHandler, channel) - : sendRequestWithNewChannel(request, proxyServer, newFuture, asyncHandler); + if (Channels.isChannelActive(channel)) { + NettyResponseFuture newFuture = newNettyRequestAndResponseFuture(request, asyncHandler, future, + proxyServer, performConnectRequest); + return sendRequestWithOpenChannel(newFuture, asyncHandler, channel); + } else { + // A new channel is not expected when performConnectRequest is false. We need to + // revisit the condition of sending + // the CONNECT request to the new channel. + NettyResponseFuture newFuture = newNettyRequestAndResponseFuture(request, asyncHandler, future, + proxyServer, needConnect(request, proxyServer)); + return sendRequestWithNewChannel(request, proxyServer, newFuture, asyncHandler); + } } /** diff --git a/client/src/test/java/org/asynchttpclient/proxy/HttpsProxyTest.java b/client/src/test/java/org/asynchttpclient/proxy/HttpsProxyTest.java index 011f15d78..9bd5ca911 100644 --- a/client/src/test/java/org/asynchttpclient/proxy/HttpsProxyTest.java +++ b/client/src/test/java/org/asynchttpclient/proxy/HttpsProxyTest.java @@ -13,6 +13,7 @@ package org.asynchttpclient.proxy; import io.github.artsok.RepeatedIfExceptionsTest; +import io.netty.handler.codec.http.DefaultHttpHeaders; import jakarta.servlet.ServletException; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; @@ -43,8 +44,10 @@ import static org.asynchttpclient.test.TestUtils.addHttpConnector; import static org.asynchttpclient.test.TestUtils.addHttpsConnector; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrowsExactly; import java.io.IOException; +import java.util.concurrent.ExecutionException; /** * Proxy usage tests. @@ -156,7 +159,7 @@ public void testPooledConnectionsWithProxy() throws Exception { public void testFailedConnectWithProxy() throws Exception { try (AsyncHttpClient asyncHttpClient = asyncHttpClient(config().setFollowRedirect(true).setUseInsecureTrustManager(true).setKeepAlive(true))) { Builder proxyServer = proxyServer("localhost", port1); - proxyServer.setCustomHeaders(r -> r.getHeaders().add(ProxyHandler.HEADER_FORBIDDEN, "1")); + proxyServer.setCustomHeaders(r -> new DefaultHttpHeaders().set(ProxyHandler.HEADER_FORBIDDEN, "1")); RequestBuilder rb = get(getTargetUrl2()).setProxyServer(proxyServer); Response response1 = asyncHttpClient.executeRequest(rb.build()).get(); @@ -170,16 +173,39 @@ public void testFailedConnectWithProxy() throws Exception { } } + @RepeatedIfExceptionsTest(repeats = 5) + public void testClosedConnectionWithProxy() throws Exception { + try (AsyncHttpClient asyncHttpClient = asyncHttpClient( + config().setFollowRedirect(true).setUseInsecureTrustManager(true).setKeepAlive(true))) { + Builder proxyServer = proxyServer("localhost", port1); + proxyServer.setCustomHeaders(r -> new DefaultHttpHeaders().set(ProxyHandler.HEADER_FORBIDDEN, "2")); + RequestBuilder rb = get(getTargetUrl2()).setProxyServer(proxyServer); + + assertThrowsExactly(ExecutionException.class, () -> asyncHttpClient.executeRequest(rb.build()).get()); + assertThrowsExactly(ExecutionException.class, () -> asyncHttpClient.executeRequest(rb.build()).get()); + assertThrowsExactly(ExecutionException.class, () -> asyncHttpClient.executeRequest(rb.build()).get()); + } + } + public static class ProxyHandler extends ConnectHandler { final static String HEADER_FORBIDDEN = "X-REJECT-REQUEST"; @Override public void handle(String s, Request r, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { if (HttpConstants.Methods.CONNECT.equalsIgnoreCase(request.getMethod())) { - if (request.getHeader(HEADER_FORBIDDEN) != null) { + String headerValue = request.getHeader(HEADER_FORBIDDEN); + if (headerValue == null) { + headerValue = ""; + } + switch (headerValue) { + case "1": response.setStatus(HttpServletResponse.SC_FORBIDDEN); r.setHandled(true); return; + case "2": + r.getHttpChannel().getConnection().close(); + r.setHandled(true); + return; } } super.handle(s, r, request, response); From 4bd02df8668dc03ee9d09805faaaeefca97a038b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Mar 2025 23:21:27 +0530 Subject: [PATCH 137/167] Bump netty.version from 4.1.118.Final to 4.1.119.Final (#2076) Bumps `netty.version` from 4.1.118.Final to 4.1.119.Final. Updates `io.netty:netty-buffer` from 4.1.118.Final to 4.1.119.Final
Commits
  • fb7c786 [maven-release-plugin] prepare release netty-4.1.119.Final
  • f0a546d Use initialized BouncyCastle providers when available (#14855)
  • 7fc6a23 Add QueryStringDecoder option to leave '+' alone (#14850)
  • 8f3dd2f Consistently add channel info in HTTP/2 logs (#14829)
  • bd08643 Bump BlockHound version to 1.0.11.RELEASE (#14814)
  • 0138f23 SslHandler: Fix possible NPE when executor is used for delegating (#14830)
  • 84120a7 Fix NPE when upgrade message fails to aggregate (#14816)
  • dc6b051 Replace SSL assertion with explicit record length check (#14810)
  • 34011b5 chore: Sync the id when DefaultHttp2FrameStream's stream is updated. (#14803)
  • f3311e5 [maven-release-plugin] prepare for next development iteration
  • See full diff in compare view

Updates `io.netty:netty-codec-http` from 4.1.118.Final to 4.1.119.Final
Commits
  • fb7c786 [maven-release-plugin] prepare release netty-4.1.119.Final
  • f0a546d Use initialized BouncyCastle providers when available (#14855)
  • 7fc6a23 Add QueryStringDecoder option to leave '+' alone (#14850)
  • 8f3dd2f Consistently add channel info in HTTP/2 logs (#14829)
  • bd08643 Bump BlockHound version to 1.0.11.RELEASE (#14814)
  • 0138f23 SslHandler: Fix possible NPE when executor is used for delegating (#14830)
  • 84120a7 Fix NPE when upgrade message fails to aggregate (#14816)
  • dc6b051 Replace SSL assertion with explicit record length check (#14810)
  • 34011b5 chore: Sync the id when DefaultHttp2FrameStream's stream is updated. (#14803)
  • f3311e5 [maven-release-plugin] prepare for next development iteration
  • See full diff in compare view

Updates `io.netty:netty-codec` from 4.1.118.Final to 4.1.119.Final
Commits
  • fb7c786 [maven-release-plugin] prepare release netty-4.1.119.Final
  • f0a546d Use initialized BouncyCastle providers when available (#14855)
  • 7fc6a23 Add QueryStringDecoder option to leave '+' alone (#14850)
  • 8f3dd2f Consistently add channel info in HTTP/2 logs (#14829)
  • bd08643 Bump BlockHound version to 1.0.11.RELEASE (#14814)
  • 0138f23 SslHandler: Fix possible NPE when executor is used for delegating (#14830)
  • 84120a7 Fix NPE when upgrade message fails to aggregate (#14816)
  • dc6b051 Replace SSL assertion with explicit record length check (#14810)
  • 34011b5 chore: Sync the id when DefaultHttp2FrameStream's stream is updated. (#14803)
  • f3311e5 [maven-release-plugin] prepare for next development iteration
  • See full diff in compare view

Updates `io.netty:netty-codec-socks` from 4.1.118.Final to 4.1.119.Final
Commits
  • fb7c786 [maven-release-plugin] prepare release netty-4.1.119.Final
  • f0a546d Use initialized BouncyCastle providers when available (#14855)
  • 7fc6a23 Add QueryStringDecoder option to leave '+' alone (#14850)
  • 8f3dd2f Consistently add channel info in HTTP/2 logs (#14829)
  • bd08643 Bump BlockHound version to 1.0.11.RELEASE (#14814)
  • 0138f23 SslHandler: Fix possible NPE when executor is used for delegating (#14830)
  • 84120a7 Fix NPE when upgrade message fails to aggregate (#14816)
  • dc6b051 Replace SSL assertion with explicit record length check (#14810)
  • 34011b5 chore: Sync the id when DefaultHttp2FrameStream's stream is updated. (#14803)
  • f3311e5 [maven-release-plugin] prepare for next development iteration
  • See full diff in compare view

Updates `io.netty:netty-handler-proxy` from 4.1.118.Final to 4.1.119.Final
Commits
  • fb7c786 [maven-release-plugin] prepare release netty-4.1.119.Final
  • f0a546d Use initialized BouncyCastle providers when available (#14855)
  • 7fc6a23 Add QueryStringDecoder option to leave '+' alone (#14850)
  • 8f3dd2f Consistently add channel info in HTTP/2 logs (#14829)
  • bd08643 Bump BlockHound version to 1.0.11.RELEASE (#14814)
  • 0138f23 SslHandler: Fix possible NPE when executor is used for delegating (#14830)
  • 84120a7 Fix NPE when upgrade message fails to aggregate (#14816)
  • dc6b051 Replace SSL assertion with explicit record length check (#14810)
  • 34011b5 chore: Sync the id when DefaultHttp2FrameStream's stream is updated. (#14803)
  • f3311e5 [maven-release-plugin] prepare for next development iteration
  • See full diff in compare view

Updates `io.netty:netty-common` from 4.1.118.Final to 4.1.119.Final
Commits
  • fb7c786 [maven-release-plugin] prepare release netty-4.1.119.Final
  • f0a546d Use initialized BouncyCastle providers when available (#14855)
  • 7fc6a23 Add QueryStringDecoder option to leave '+' alone (#14850)
  • 8f3dd2f Consistently add channel info in HTTP/2 logs (#14829)
  • bd08643 Bump BlockHound version to 1.0.11.RELEASE (#14814)
  • 0138f23 SslHandler: Fix possible NPE when executor is used for delegating (#14830)
  • 84120a7 Fix NPE when upgrade message fails to aggregate (#14816)
  • dc6b051 Replace SSL assertion with explicit record length check (#14810)
  • 34011b5 chore: Sync the id when DefaultHttp2FrameStream's stream is updated. (#14803)
  • f3311e5 [maven-release-plugin] prepare for next development iteration
  • See full diff in compare view

Updates `io.netty:netty-transport` from 4.1.118.Final to 4.1.119.Final
Commits
  • fb7c786 [maven-release-plugin] prepare release netty-4.1.119.Final
  • f0a546d Use initialized BouncyCastle providers when available (#14855)
  • 7fc6a23 Add QueryStringDecoder option to leave '+' alone (#14850)
  • 8f3dd2f Consistently add channel info in HTTP/2 logs (#14829)
  • bd08643 Bump BlockHound version to 1.0.11.RELEASE (#14814)
  • 0138f23 SslHandler: Fix possible NPE when executor is used for delegating (#14830)
  • 84120a7 Fix NPE when upgrade message fails to aggregate (#14816)
  • dc6b051 Replace SSL assertion with explicit record length check (#14810)
  • 34011b5 chore: Sync the id when DefaultHttp2FrameStream's stream is updated. (#14803)
  • f3311e5 [maven-release-plugin] prepare for next development iteration
  • See full diff in compare view

Updates `io.netty:netty-handler` from 4.1.118.Final to 4.1.119.Final
Commits
  • fb7c786 [maven-release-plugin] prepare release netty-4.1.119.Final
  • f0a546d Use initialized BouncyCastle providers when available (#14855)
  • 7fc6a23 Add QueryStringDecoder option to leave '+' alone (#14850)
  • 8f3dd2f Consistently add channel info in HTTP/2 logs (#14829)
  • bd08643 Bump BlockHound version to 1.0.11.RELEASE (#14814)
  • 0138f23 SslHandler: Fix possible NPE when executor is used for delegating (#14830)
  • 84120a7 Fix NPE when upgrade message fails to aggregate (#14816)
  • dc6b051 Replace SSL assertion with explicit record length check (#14810)
  • 34011b5 chore: Sync the id when DefaultHttp2FrameStream's stream is updated. (#14803)
  • f3311e5 [maven-release-plugin] prepare for next development iteration
  • See full diff in compare view

Updates `io.netty:netty-resolver-dns` from 4.1.118.Final to 4.1.119.Final
Commits
  • fb7c786 [maven-release-plugin] prepare release netty-4.1.119.Final
  • f0a546d Use initialized BouncyCastle providers when available (#14855)
  • 7fc6a23 Add QueryStringDecoder option to leave '+' alone (#14850)
  • 8f3dd2f Consistently add channel info in HTTP/2 logs (#14829)
  • bd08643 Bump BlockHound version to 1.0.11.RELEASE (#14814)
  • 0138f23 SslHandler: Fix possible NPE when executor is used for delegating (#14830)
  • 84120a7 Fix NPE when upgrade message fails to aggregate (#14816)
  • dc6b051 Replace SSL assertion with explicit record length check (#14810)
  • 34011b5 chore: Sync the id when DefaultHttp2FrameStream's stream is updated. (#14803)
  • f3311e5 [maven-release-plugin] prepare for next development iteration
  • See full diff in compare view

Updates `io.netty:netty-transport-native-epoll` from 4.1.118.Final to 4.1.119.Final
Commits
  • fb7c786 [maven-release-plugin] prepare release netty-4.1.119.Final
  • f0a546d Use initialized BouncyCastle providers when available (#14855)
  • 7fc6a23 Add QueryStringDecoder option to leave '+' alone (#14850)
  • 8f3dd2f Consistently add channel info in HTTP/2 logs (#14829)
  • bd08643 Bump BlockHound version to 1.0.11.RELEASE (#14814)
  • 0138f23 SslHandler: Fix possible NPE when executor is used for delegating (#14830)
  • 84120a7 Fix NPE when upgrade message fails to aggregate (#14816)
  • dc6b051 Replace SSL assertion with explicit record length check (#14810)
  • 34011b5 chore: Sync the id when DefaultHttp2FrameStream's stream is updated. (#14803)
  • f3311e5 [maven-release-plugin] prepare for next development iteration
  • See full diff in compare view

Updates `io.netty:netty-transport-native-kqueue` from 4.1.118.Final to 4.1.119.Final
Commits
  • fb7c786 [maven-release-plugin] prepare release netty-4.1.119.Final
  • f0a546d Use initialized BouncyCastle providers when available (#14855)
  • 7fc6a23 Add QueryStringDecoder option to leave '+' alone (#14850)
  • 8f3dd2f Consistently add channel info in HTTP/2 logs (#14829)
  • bd08643 Bump BlockHound version to 1.0.11.RELEASE (#14814)
  • 0138f23 SslHandler: Fix possible NPE when executor is used for delegating (#14830)
  • 84120a7 Fix NPE when upgrade message fails to aggregate (#14816)
  • dc6b051 Replace SSL assertion with explicit record length check (#14810)
  • 34011b5 chore: Sync the id when DefaultHttp2FrameStream's stream is updated. (#14803)
  • f3311e5 [maven-release-plugin] prepare for next development iteration
  • See full diff in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bc92eb92e..d280fa329 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ 11 UTF-8 - 4.1.118.Final + 4.1.119.Final 0.0.26.Final 1.18.0 2.0.16 From 0fe2036be2941886d4582878c20f7846f82b24f8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Mar 2025 23:21:54 +0530 Subject: [PATCH 138/167] Bump org.apache.tomcat.embed:tomcat-embed-core from 10.1.36 to 10.1.39 (#2073) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [//]: # (dependabot-start) ⚠️ **Dependabot is rebasing this PR** ⚠️ Rebasing might not happen immediately, so don't worry if this takes some time. Note: if you make any changes to this PR yourself, they will take precedence over the rebase. --- [//]: # (dependabot-end) Bumps org.apache.tomcat.embed:tomcat-embed-core from 10.1.36 to 10.1.39.
Most Recent Ignore Conditions Applied to This Pull Request | Dependency Name | Ignore Conditions | | --- | --- | | org.apache.tomcat.embed:tomcat-embed-core | [>= 11.a0, < 12] |
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.apache.tomcat.embed:tomcat-embed-core&package-manager=maven&previous-version=10.1.36&new-version=10.1.39)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- client/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/pom.xml b/client/pom.xml index 826ee0db8..7cc99b940 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -31,7 +31,7 @@ org.asynchttpclient.client 11.0.24 - 10.1.36 + 10.1.39 2.18.0 4.11.0 3.0 From acdacfb0701ec62949439b5dad78581ea0b0cf2f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Mar 2025 18:11:30 +0530 Subject: [PATCH 139/167] Bump crazy-max/ghaction-import-gpg from 6.2.0 to 6.3.0 (#2084) Bumps [crazy-max/ghaction-import-gpg](https://github.com/crazy-max/ghaction-import-gpg) from 6.2.0 to 6.3.0.
Release notes

Sourced from crazy-max/ghaction-import-gpg's releases.

v6.3.0

Full Changelog: https://github.com/crazy-max/ghaction-import-gpg/compare/v6.2.0...v6.3.0

Commits
  • e89d409 Merge pull request #215 from crazy-max/dependabot/npm_and_yarn/openpgp-6.1.0
  • 9239589 fix README
  • 177db9d chore: update generated content
  • 78b11f3 build(deps): bump openpgp from 5.11.2 to 6.1.0
  • bc96911 Merge pull request #218 from crazy-max/bake-v6
  • b70aa9b ci: update bake-action to v6
  • d690cc9 Merge pull request #212 from crazy-max/dependabot/npm_and_yarn/cross-spawn-7.0.6
  • 9e887f4 Merge pull request #211 from crazy-max/dependabot/github_actions/codecov/code...
  • 442980b ci: fix deprecated codecov input
  • a0098b6 Merge pull request #217 from crazy-max/gha-perms
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=crazy-max/ghaction-import-gpg&package-manager=github_actions&previous-version=6.2.0&new-version=6.3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4a462dc99..b175fa865 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,7 +37,7 @@ jobs: }] - name: Import GPG - uses: crazy-max/ghaction-import-gpg@v6.2.0 + uses: crazy-max/ghaction-import-gpg@v6.3.0 with: gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} passphrase: ${{ secrets.GPG_PASSPHRASE }} From 96840692decab2541c8f13d2dbfbbca35311890f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Mar 2025 18:11:34 +0530 Subject: [PATCH 140/167] Bump com.uber.nullaway:nullaway from 0.12.3 to 0.12.6 (#2082) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [com.uber.nullaway:nullaway](https://github.com/uber/NullAway) from 0.12.3 to 0.12.6.
Release notes

Sourced from com.uber.nullaway:nullaway's releases.

NullAway 0.12.6

  • JSpecify: view type as super in generic method inference (#1177)
  • Infer @​Nullable type arguments for type variables from unmarked code (#1181)
  • Convert android-jar.py to Python 3 (#1175)
  • Suggest castToNonNull fix for unboxing error (#1182)

NullAway 0.12.5

Version 0.12.4

Better @​MonotonicNonNull support (#1149) Add support for local variables for arrays. (#1146) Ignore Spring Framework 6.2 @​MockitoBean, @​MockitoSpyBean fields (#1147) JSpecify: preserve explicit nullability annotations on type variables when performing substitutions (#1143) Always acknowledge restrictive annotations in JSpecify mode (#1144) Fix printing of array types in JSpecify errors (#1145) Remove need to use JSpecify's @​Nullable annotation (#1142) Handle calls to generic constructors in JSpecify mode (#1141) Properly handle conditional expression within parens as RHS of assignment (#1140) Skip checks involving wildcard generic type arguments (#1137) Update to Gradle 8.12.1 (#1133)

Changelog

Sourced from com.uber.nullaway:nullaway's changelog.

Version 0.12.6

  • JSpecify: view type as super in generic method inference (#1177)
  • Infer @​Nullable type arguments for type variables from unmarked code (#1181)
  • Convert android-jar.py to Python 3 (#1175)
  • Suggest castToNonNull fix for unboxing error (#1182)

Version 0.12.5

Version 0.12.4

  • Better @MonotonicNonNull support (#1149)
  • Add support for local variables for arrays. (#1146)
  • Ignore Spring Framework 6.2 @MockitoBean, @MockitoSpyBean fields (#1147)
  • JSpecify: preserve explicit nullability annotations on type variables when performing substitutions (#1143)
  • Always acknowledge restrictive annotations in JSpecify mode (#1144)
  • Fix printing of array types in JSpecify errors (#1145)
  • Remove need to use JSpecify's @​Nullable annotation (#1142)
  • Handle calls to generic constructors in JSpecify mode (#1141)
  • Properly handle conditional expression within parens as RHS of assignment (#1140)
  • Skip checks involving wildcard generic type arguments (#1137)
  • Update to Gradle 8.12.1 (#1133)
Commits
  • 649f25a Prepare for release 0.12.6.
  • 9369704 Suggest castToNonNull fix for unboxing error (#1182)
  • f1aca1b Convert android-jar.py to Python 3 (#1175)
  • 33588de Infer @Nullable type arguments for type variables from unmarked code (#1181)
  • dd0fe71 JSpecify: view type as super in generic method inference (#1177)
  • 2c8049c Prepare next development version.
  • 9613fb7 Prepare for release 0.12.5.
  • b84feb7 Don't treat @ParametricNullness as @Nullable in JSpecify mode (#1174)
  • 3da2c82 Use proper name for constructors in JarInfer (#1167)
  • 685065a Update to Error Prone 2.37.0 (#1169)
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.uber.nullaway:nullaway&package-manager=maven&previous-version=0.12.3&new-version=0.12.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d280fa329..20b284dc0 100644 --- a/pom.xml +++ b/pom.xml @@ -327,7 +327,7 @@ com.uber.nullaway nullaway - 0.12.3 + 0.12.6 From 5977cd39acf22326ae5a8313987e27117c8ffbc0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Mar 2025 18:11:47 +0530 Subject: [PATCH 141/167] Bump com.github.luben:zstd-jni from 1.5.7-1 to 1.5.7-2 (#2078) Bumps [com.github.luben:zstd-jni](https://github.com/luben/zstd-jni) from 1.5.7-1 to 1.5.7-2.
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.github.luben:zstd-jni&package-manager=maven&previous-version=1.5.7-1&new-version=1.5.7-2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 20b284dc0..9b48a8c0d 100644 --- a/pom.xml +++ b/pom.xml @@ -49,7 +49,7 @@ 0.0.26.Final 1.18.0 2.0.16 - 1.5.7-1 + 1.5.7-2 2.0.1 1.5.16 26.0.2 From 1f642ba712f04b8385171107efefae2a44df72fd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Mar 2025 18:11:55 +0530 Subject: [PATCH 142/167] Bump ch.qos.logback:logback-classic from 1.5.16 to 1.5.18 (#2080) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [ch.qos.logback:logback-classic](https://github.com/qos-ch/logback) from 1.5.16 to 1.5.18.
Release notes

Sourced from ch.qos.logback:logback-classic's releases.

Logback 1.5.18

2025-03-18 Release of logback version 1.5.18

• Added support for XZ compression for archived log files. Note that XZ compression requires Tukaani project's XZ library for Java. In case XZ compression is requested but the XZ library is missing, then logback will substitute GZ compression as a fallback. This feature was requested in issues/755.

• Removed references to java.security.AccessController class. This class has been deprecated for some time and is slated for removal in future JDK versions.

• A bit-wise identical binary of this version can be reproduced by building from source code at commit b2a02f065379a9b1ba5ff837fc08913b744774bc associated with the tag v_1.5.18. Release built using Java "21" 2023-10-17 LTS build 21.0.1.+12-LTS-29 under Linux Debian 11.6.

Logback 1.5.17

2025-02-25 Release of logback version 1.5.17

• Fixed Jansi 2.4.0 color-coded output not working on Windows CMD.exe console when the default terminal application is set to "Windows Console Host". This problem was reported in issues/753 by Michael Lyubkin.

• Fixed race condition occurring in case MDC class is initialized while org.slf4j.LoggerFactory is initializing logback-classic's LoggerContext. When this race conditions occurs, the MDCAdapter instance used by MDC does not match the instance used by logback-classic. This issue was reported in SLF4J issues/450. While logback-classic version 1.5.17 remains compatible with SLF4J versions in the 2.0.x series, fixing this particular MDC issue requires SLF4J version 2.0.17.

• A bit-wise identical binary of this version can be reproduced by building from source code at commit 10358724ed723b3745c010aa40cb02a2dfed4593 associated with the tag v_1.5.17. Release built using Java "21" 2023-10-17 LTS build 21.0.1.+12-LTS-29 under Linux Debian 11.6.

Commits
  • b2a02f0 prepare release 1.5.18
  • 991de58 remove references to AccessController marked for deletion in the JDK
  • f54ab16 If compression mode is XZ but the XZ library is missing, then fallback to GZ ...
  • fb45971 add support for XZ compression
  • 31c1f55 add xz compression support with tests
  • 8968d0f introduce strategy based compression
  • 834059c start work on 1.5.18-SNAPSHOT
  • 1035872 prepare release 1.5.17
  • 2e6984d bump to slf4j version 2.0.17
  • 1009952 use a new LoggerContert instance when running LogbackListenerTest. This shoul...
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ch.qos.logback:logback-classic&package-manager=maven&previous-version=1.5.16&new-version=1.5.18)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9b48a8c0d..98e816c79 100644 --- a/pom.xml +++ b/pom.xml @@ -51,7 +51,7 @@ 2.0.16 1.5.7-2 2.0.1 - 1.5.16 + 1.5.18 26.0.2 From 4fea3f747700475af5abc96e2eaa1b7cb6185366 Mon Sep 17 00:00:00 2001 From: Aayush Atharva Date: Mon, 31 Mar 2025 18:24:04 +0530 Subject: [PATCH 143/167] Disable Dependabot (#2085) Dependabot creates a separate PR for each dependency, which has broken the final release builds many times. It will be disabled for the time being until a better way to manage dependency upgrades is implemented, --- .github/dependabot.yml | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index f4538d3c7..000000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,17 +0,0 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: -# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file - -version: 2 -updates: - - package-ecosystem: "maven" - directories: - - "/" - schedule: - interval: "daily" - - package-ecosystem: "github-actions" - directories: - - "/" - schedule: - interval: "daily" From 3f1de314d7e340a90929ef7d422eeaed2253b33c Mon Sep 17 00:00:00 2001 From: Aayush Atharva Date: Mon, 31 Mar 2025 19:28:09 +0530 Subject: [PATCH 144/167] Release v3.0.2 (#2086) --- README.md | 4 ++-- client/pom.xml | 2 +- pom.xml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4ae651b75..0272134ed 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Maven: org.asynchttpclient async-http-client - 3.0.1 + 3.0.2 ``` @@ -28,7 +28,7 @@ Maven: Gradle: ```groovy dependencies { - implementation 'org.asynchttpclient:async-http-client:3.0.1' + implementation 'org.asynchttpclient:async-http-client:3.0.2' } ``` diff --git a/client/pom.xml b/client/pom.xml index 7cc99b940..749a98ddb 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -19,7 +19,7 @@ org.asynchttpclient async-http-client-project - 3.0.1 + 3.0.2 4.0.0 diff --git a/pom.xml b/pom.xml index 98e816c79..70d09ac53 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ org.asynchttpclient async-http-client-project - 3.0.1 + 3.0.2 pom AHC/Project From 14ee30acf476d52831f7048bf861a4752bb13a08 Mon Sep 17 00:00:00 2001 From: sullis Date: Wed, 2 Apr 2025 12:58:01 -0700 Subject: [PATCH 145/167] netty leak detector 0.0.8 (#2087) https://github.com/nettyplus/netty-leak-detector-junit-extension --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 70d09ac53..4dbe02c1d 100644 --- a/pom.xml +++ b/pom.xml @@ -112,7 +112,7 @@ io.github.nettyplus netty-leak-detector-junit-extension - 0.0.6 + 0.0.8 From 73911ebe4c464588fb10c211a43caeec394d97ca Mon Sep 17 00:00:00 2001 From: Pratik Katti <90851204+pratt4@users.noreply.github.com> Date: Fri, 9 May 2025 23:14:39 +0530 Subject: [PATCH 146/167] Fix NPE race in NettyResponseFuture.cancel (#2042) (#2088) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #2042 This is a typical TOCTOU (time-of-check/time-of-use) race https://en.wikipedia.org/wiki/Time-of-check_to_time-of-use. The NPE was occurring because the channel field could be set to null by another thread between the check and its use: if (channel != null) { // time-of-check Channels.setDiscard(channel); // time-of-use Channels.silentlyCloseChannel(channel); } By copying channel into a local variable in one atomic read, we ensure that—even if another thread changes the field—the local reference remains valid. P.S. It is hard to write a deterministic test that fails consistently, so this PR only includes the code fix. --------- Co-authored-by: prat --- .../org/asynchttpclient/netty/NettyResponseFuture.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/main/java/org/asynchttpclient/netty/NettyResponseFuture.java b/client/src/main/java/org/asynchttpclient/netty/NettyResponseFuture.java index c5e4a97d0..c29c0f33d 100755 --- a/client/src/main/java/org/asynchttpclient/netty/NettyResponseFuture.java +++ b/client/src/main/java/org/asynchttpclient/netty/NettyResponseFuture.java @@ -187,10 +187,10 @@ public boolean cancel(boolean force) { return false; } - // cancel could happen before channel was attached - if (channel != null) { - Channels.setDiscard(channel); - Channels.silentlyCloseChannel(channel); + final Channel ch = channel; //atomic read, so that it won't end up in TOCTOU + if (ch != null) { + Channels.setDiscard(ch); + Channels.silentlyCloseChannel(ch); } if (ON_THROWABLE_CALLED_FIELD.getAndSet(this, 1) == 0) { From 6ac1cccad93bf617200f6a87f9790de273529256 Mon Sep 17 00:00:00 2001 From: Aayush Atharva Date: Sun, 11 May 2025 04:58:54 +0530 Subject: [PATCH 147/167] Add japicmp (#2091) --- .github/workflows/builds.yml | 26 +++++++++++++++++++++----- pom.xml | 28 ++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 5 deletions(-) diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index 6a59bde6c..2586cf3c6 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -5,34 +5,50 @@ on: - cron: '0 12 * * *' jobs: + Verify: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Grant Permission + run: chmod +x ./mvnw + - uses: actions/setup-java@v4 + with: + distribution: 'corretto' + java-version: '11' + - name: Verify + run: ./mvnw -B -ntp clean verify -DskipTests -Dgpg.skip=true + RunOnLinux: runs-on: ubuntu-latest + needs: Verify steps: - uses: actions/checkout@v4 - name: Grant Permission - run: sudo chmod +x ./mvnw + run: chmod +x ./mvnw - uses: actions/setup-java@v4 with: distribution: 'corretto' java-version: '11' - name: Run Tests - run: ./mvnw -B -ntp clean test + run: ./mvnw -B -ntp test RunOnMacOs: runs-on: macos-latest + needs: Verify steps: - uses: actions/checkout@v4 - name: Grant Permission - run: sudo chmod +x ./mvnw + run: chmod +x ./mvnw - uses: actions/setup-java@v4 with: distribution: 'corretto' java-version: '11' - name: Run Tests - run: ./mvnw -B -ntp clean test + run: ./mvnw -B -ntp test RunOnWindows: runs-on: windows-latest + needs: Verify steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v4 @@ -40,4 +56,4 @@ jobs: distribution: 'corretto' java-version: '11' - name: Run Tests - run: ./mvnw.cmd -B -ntp clean test + run: ./mvnw.cmd -B -ntp test diff --git a/pom.xml b/pom.xml index 4dbe02c1d..ee1c2308c 100644 --- a/pom.xml +++ b/pom.xml @@ -422,10 +422,38 @@ --pinentry-mode loopback + false
+ + + com.github.siom79.japicmp + japicmp-maven-plugin + 0.23.1 + + + RELEASE + ${project.version} + + + true + true + true + false + public + + + + + + cmp + + verify + + + From fb50dc26717f0e6aaaef58e2a01924a56aab2021 Mon Sep 17 00:00:00 2001 From: Aayush Atharva Date: Sun, 11 May 2025 05:00:47 +0530 Subject: [PATCH 148/167] Feature: Add Option to Strip Authorization Header on Redirect (#2090) Closes #1884 --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../AsyncHttpClientConfig.java | 7 ++ .../DefaultAsyncHttpClientConfig.java | 16 ++++ .../intercept/Redirect30xInterceptor.java | 9 +- .../DefaultAsyncHttpClientConfigTest.java | 30 ++++++ .../StripAuthorizationOnRedirectHttpTest.java | 95 +++++++++++++++++++ 5 files changed, 153 insertions(+), 4 deletions(-) create mode 100644 client/src/test/java/org/asynchttpclient/DefaultAsyncHttpClientConfigTest.java create mode 100644 client/src/test/java/org/asynchttpclient/StripAuthorizationOnRedirectHttpTest.java diff --git a/client/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java b/client/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java index 12dc93d7d..954628b3d 100644 --- a/client/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java +++ b/client/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java @@ -375,6 +375,13 @@ public interface AsyncHttpClientConfig { int getIoThreadsCount(); + /** + * Indicates whether the Authorization header should be stripped during redirects to a different domain. + * + * @return true if the Authorization header should be stripped, false otherwise. + */ + boolean isStripAuthorizationOnRedirect(); + enum ResponseBodyPartFactory { EAGER { diff --git a/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClientConfig.java b/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClientConfig.java index e72235c17..1c7dbf37f 100644 --- a/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClientConfig.java +++ b/client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClientConfig.java @@ -127,6 +127,7 @@ public class DefaultAsyncHttpClientConfig implements AsyncHttpClientConfig { private final boolean keepEncodingHeader; private final ProxyServerSelector proxyServerSelector; private final boolean validateResponseHeaders; + private final boolean stripAuthorizationOnRedirect; // websockets private final boolean aggregateWebSocketFrameFragments; @@ -219,6 +220,7 @@ private DefaultAsyncHttpClientConfig(// http boolean validateResponseHeaders, boolean aggregateWebSocketFrameFragments, boolean enablewebSocketCompression, + boolean stripAuthorizationOnRedirect, // timeouts Duration connectTimeout, @@ -307,6 +309,7 @@ private DefaultAsyncHttpClientConfig(// http this.keepEncodingHeader = keepEncodingHeader; this.proxyServerSelector = proxyServerSelector; this.validateResponseHeaders = validateResponseHeaders; + this.stripAuthorizationOnRedirect = stripAuthorizationOnRedirect; // websocket this.aggregateWebSocketFrameFragments = aggregateWebSocketFrameFragments; @@ -564,6 +567,11 @@ public boolean isValidateResponseHeaders() { return validateResponseHeaders; } + @Override + public boolean isStripAuthorizationOnRedirect() { + return stripAuthorizationOnRedirect; + } + // ssl @Override public boolean isUseOpenSsl() { @@ -800,6 +808,7 @@ public static class Builder { private boolean useProxySelector = defaultUseProxySelector(); private boolean useProxyProperties = defaultUseProxyProperties(); private boolean validateResponseHeaders = defaultValidateResponseHeaders(); + private boolean stripAuthorizationOnRedirect = false; // default value // websocket private boolean aggregateWebSocketFrameFragments = defaultAggregateWebSocketFrameFragments(); @@ -891,6 +900,7 @@ public Builder(AsyncHttpClientConfig config) { keepEncodingHeader = config.isKeepEncodingHeader(); proxyServerSelector = config.getProxyServerSelector(); validateResponseHeaders = config.isValidateResponseHeaders(); + stripAuthorizationOnRedirect = config.isStripAuthorizationOnRedirect(); // websocket aggregateWebSocketFrameFragments = config.isAggregateWebSocketFrameFragments(); @@ -1079,6 +1089,11 @@ public Builder setUseProxyProperties(boolean useProxyProperties) { return this; } + public Builder setStripAuthorizationOnRedirect(boolean value) { + stripAuthorizationOnRedirect = value; + return this; + } + // websocket public Builder setAggregateWebSocketFrameFragments(boolean aggregateWebSocketFrameFragments) { this.aggregateWebSocketFrameFragments = aggregateWebSocketFrameFragments; @@ -1444,6 +1459,7 @@ public DefaultAsyncHttpClientConfig build() { validateResponseHeaders, aggregateWebSocketFrameFragments, enablewebSocketCompression, + stripAuthorizationOnRedirect, connectTimeout, requestTimeout, readTimeout, diff --git a/client/src/main/java/org/asynchttpclient/netty/handler/intercept/Redirect30xInterceptor.java b/client/src/main/java/org/asynchttpclient/netty/handler/intercept/Redirect30xInterceptor.java index e60495f80..40628a7e5 100644 --- a/client/src/main/java/org/asynchttpclient/netty/handler/intercept/Redirect30xInterceptor.java +++ b/client/src/main/java/org/asynchttpclient/netty/handler/intercept/Redirect30xInterceptor.java @@ -35,7 +35,6 @@ import org.slf4j.LoggerFactory; import java.util.HashSet; -import java.util.List; import java.util.Set; import static io.netty.handler.codec.http.HttpHeaderNames.AUTHORIZATION; @@ -73,11 +72,13 @@ public class Redirect30xInterceptor { private final AsyncHttpClientConfig config; private final NettyRequestSender requestSender; private final MaxRedirectException maxRedirectException; + private final boolean stripAuthorizationOnRedirect; Redirect30xInterceptor(ChannelManager channelManager, AsyncHttpClientConfig config, NettyRequestSender requestSender) { this.channelManager = channelManager; this.config = config; this.requestSender = requestSender; + stripAuthorizationOnRedirect = config.isStripAuthorizationOnRedirect(); // New flag maxRedirectException = unknownStackTrace(new MaxRedirectException("Maximum redirect reached: " + config.getMaxRedirects()), Redirect30xInterceptor.class, "exitAfterHandlingRedirect"); } @@ -127,7 +128,7 @@ public boolean exitAfterHandlingRedirect(Channel channel, NettyResponseFuture } } - requestBuilder.setHeaders(propagatedHeaders(request, realm, keepBody)); + requestBuilder.setHeaders(propagatedHeaders(request, realm, keepBody, stripAuthorizationOnRedirect)); // in case of a redirect from HTTP to HTTPS, future // attributes might change @@ -180,7 +181,7 @@ public boolean exitAfterHandlingRedirect(Channel channel, NettyResponseFuture return false; } - private static HttpHeaders propagatedHeaders(Request request, Realm realm, boolean keepBody) { + private static HttpHeaders propagatedHeaders(Request request, Realm realm, boolean keepBody, boolean stripAuthorization) { HttpHeaders headers = request.getHeaders() .remove(HOST) .remove(CONTENT_LENGTH); @@ -189,7 +190,7 @@ private static HttpHeaders propagatedHeaders(Request request, Realm realm, boole headers.remove(CONTENT_TYPE); } - if (realm != null && realm.getScheme() == AuthScheme.NTLM) { + if (stripAuthorization || (realm != null && realm.getScheme() == AuthScheme.NTLM)) { headers.remove(AUTHORIZATION) .remove(PROXY_AUTHORIZATION); } diff --git a/client/src/test/java/org/asynchttpclient/DefaultAsyncHttpClientConfigTest.java b/client/src/test/java/org/asynchttpclient/DefaultAsyncHttpClientConfigTest.java new file mode 100644 index 000000000..1548d6812 --- /dev/null +++ b/client/src/test/java/org/asynchttpclient/DefaultAsyncHttpClientConfigTest.java @@ -0,0 +1,30 @@ +package org.asynchttpclient; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + +class DefaultAsyncHttpClientConfigTest { + @Test + void testStripAuthorizationOnRedirect_DefaultIsFalse() { + DefaultAsyncHttpClientConfig config = new DefaultAsyncHttpClientConfig.Builder().build(); + assertFalse(config.isStripAuthorizationOnRedirect(), "Default should be false"); + } + + @Test + void testStripAuthorizationOnRedirect_SetTrue() { + DefaultAsyncHttpClientConfig config = new DefaultAsyncHttpClientConfig.Builder() + .setStripAuthorizationOnRedirect(true) + .build(); + assertTrue(config.isStripAuthorizationOnRedirect(), "Should be true when set"); + } + + @Test + void testStripAuthorizationOnRedirect_SetFalse() { + DefaultAsyncHttpClientConfig config = new DefaultAsyncHttpClientConfig.Builder() + .setStripAuthorizationOnRedirect(false) + .build(); + assertFalse(config.isStripAuthorizationOnRedirect(), "Should be false when set to false"); + } +} diff --git a/client/src/test/java/org/asynchttpclient/StripAuthorizationOnRedirectHttpTest.java b/client/src/test/java/org/asynchttpclient/StripAuthorizationOnRedirectHttpTest.java new file mode 100644 index 000000000..08c150c08 --- /dev/null +++ b/client/src/test/java/org/asynchttpclient/StripAuthorizationOnRedirectHttpTest.java @@ -0,0 +1,95 @@ +package org.asynchttpclient; + +import com.sun.net.httpserver.HttpExchange; +import com.sun.net.httpserver.HttpHandler; +import com.sun.net.httpserver.HttpServer; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +import java.net.InetSocketAddress; +import java.util.concurrent.TimeUnit; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + +public class StripAuthorizationOnRedirectHttpTest { + private static HttpServer server; + private static int port; + private static volatile String lastAuthHeader; + + @BeforeAll + public static void startServer() throws Exception { + server = HttpServer.create(new InetSocketAddress(0), 0); + port = server.getAddress().getPort(); + server.createContext("/redirect", new RedirectHandler()); + server.createContext("/final", new FinalHandler()); + server.start(); + } + + @AfterAll + public static void stopServer() { + server.stop(0); + } + + static class RedirectHandler implements HttpHandler { + @Override + public void handle(HttpExchange exchange) { + String auth = exchange.getRequestHeaders().getFirst("Authorization"); + lastAuthHeader = auth; + exchange.getResponseHeaders().add("Location", "http://localhost:" + port + "/final"); + try { + exchange.sendResponseHeaders(302, -1); + } catch (Exception ignored) { + } + exchange.close(); + } + } + + static class FinalHandler implements HttpHandler { + @Override + public void handle(HttpExchange exchange) { + String auth = exchange.getRequestHeaders().getFirst("Authorization"); + lastAuthHeader = auth; + try { + exchange.sendResponseHeaders(200, 0); + exchange.getResponseBody().close(); + } catch (Exception ignored) { + } + exchange.close(); + } + } + + @Test + void testAuthHeaderPropagatedByDefault() throws Exception { + DefaultAsyncHttpClientConfig config = new DefaultAsyncHttpClientConfig.Builder() + .setFollowRedirect(true) + .build(); + try (DefaultAsyncHttpClient client = new DefaultAsyncHttpClient(config)) { + lastAuthHeader = null; + client.prepareGet("http://localhost:" + port + "/redirect") + .setHeader("Authorization", "Bearer testtoken") + .execute() + .get(5, TimeUnit.SECONDS); + // By default, Authorization header is propagated to /final + assertEquals("Bearer testtoken", lastAuthHeader, "Authorization header should be present on redirect by default"); + } + } + + @Test + void testAuthHeaderStrippedWhenEnabled() throws Exception { + DefaultAsyncHttpClientConfig config = new DefaultAsyncHttpClientConfig.Builder() + .setFollowRedirect(true) + .setStripAuthorizationOnRedirect(true) + .build(); + try (DefaultAsyncHttpClient client = new DefaultAsyncHttpClient(config)) { + lastAuthHeader = null; + client.prepareGet("http://localhost:" + port + "/redirect") + .setHeader("Authorization", "Bearer testtoken") + .execute() + .get(5, TimeUnit.SECONDS); + // When enabled, Authorization header should be stripped on /final + assertNull(lastAuthHeader, "Authorization header should be stripped on redirect when enabled"); + } + } +} From 41b1eec767ded1c2dcf9e7c690a4b8b6e0145e83 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 18 May 2025 22:24:59 +0530 Subject: [PATCH 149/167] Bump org.apache.tomcat.embed:tomcat-embed-core from 10.1.39 to 10.1.40 in /client (#2092) Bumps org.apache.tomcat.embed:tomcat-embed-core from 10.1.39 to 10.1.40. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.apache.tomcat.embed:tomcat-embed-core&package-manager=maven&previous-version=10.1.39&new-version=10.1.40)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/AsyncHttpClient/async-http-client/network/alerts).
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- client/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/pom.xml b/client/pom.xml index 749a98ddb..733f20b51 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -31,7 +31,7 @@ org.asynchttpclient.client 11.0.24 - 10.1.39 + 10.1.40 2.18.0 4.11.0 3.0 From c8cc6e82e633e4f5d8e71646a9432e6e1d5b41a3 Mon Sep 17 00:00:00 2001 From: sullis Date: Thu, 22 May 2025 12:50:25 -0700 Subject: [PATCH 150/167] netty leak detector extension 0.2.0 (#2095) https://github.com/nettyplus/netty-leak-detector-junit-extension --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ee1c2308c..e55fe8a26 100644 --- a/pom.xml +++ b/pom.xml @@ -112,7 +112,7 @@ io.github.nettyplus netty-leak-detector-junit-extension - 0.0.8 + 0.2.0 From e1431755d76df9137abfdb8f97c883b41e1ae913 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 30 May 2025 09:22:38 +0530 Subject: [PATCH 151/167] Bump org.apache.tomcat.embed:tomcat-embed-core from 10.1.40 to 10.1.41 in /client (#2096) Bumps org.apache.tomcat.embed:tomcat-embed-core from 10.1.40 to 10.1.41. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.apache.tomcat.embed:tomcat-embed-core&package-manager=maven&previous-version=10.1.40&new-version=10.1.41)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/AsyncHttpClient/async-http-client/network/alerts).
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- client/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/pom.xml b/client/pom.xml index 733f20b51..93d36ec02 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -31,7 +31,7 @@ org.asynchttpclient.client 11.0.24 - 10.1.40 + 10.1.41 2.18.0 4.11.0 3.0 From eeec3349d367ee0409acc5a63cc8d25f568e5539 Mon Sep 17 00:00:00 2001 From: sullis Date: Fri, 30 May 2025 12:49:27 -0700 Subject: [PATCH 152/167] junit 5.13.0 (#2097) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e55fe8a26..9d64fc54b 100644 --- a/pom.xml +++ b/pom.xml @@ -105,7 +105,7 @@ org.junit junit-bom - 5.11.4 + 5.13.0 pom import From b2a0440e1164665ca506897f3577ade9cc681b52 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Jun 2025 00:38:27 +0530 Subject: [PATCH 153/167] Bump org.apache.tomcat.embed:tomcat-embed-core from 10.1.41 to 10.1.42 in /client (#2099) Bumps org.apache.tomcat.embed:tomcat-embed-core from 10.1.41 to 10.1.42. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.apache.tomcat.embed:tomcat-embed-core&package-manager=maven&previous-version=10.1.41&new-version=10.1.42)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/AsyncHttpClient/async-http-client/network/alerts).
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- client/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/pom.xml b/client/pom.xml index 93d36ec02..ff11d5f26 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -31,7 +31,7 @@ org.asynchttpclient.client 11.0.24 - 10.1.41 + 10.1.42 2.18.0 4.11.0 3.0 From d7330d20e27e2d63f1055dfcc1040e0bbcf96a51 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 20 Jul 2025 00:10:00 +0530 Subject: [PATCH 154/167] Bump commons-fileupload:commons-fileupload from 1.5 to 1.6.0 in /client (#2101) Bumps commons-fileupload:commons-fileupload from 1.5 to 1.6.0. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=commons-fileupload:commons-fileupload&package-manager=maven&previous-version=1.5&new-version=1.6.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/AsyncHttpClient/async-http-client/network/alerts).
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- client/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/pom.xml b/client/pom.xml index ff11d5f26..6e56bf9fc 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -51,7 +51,7 @@ commons-fileupload commons-fileupload - 1.5 + 1.6.0 test From 8daef69da541970c9c8365e1413d13d127e17118 Mon Sep 17 00:00:00 2001 From: hnb22 Date: Thu, 14 Aug 2025 15:08:18 -0700 Subject: [PATCH 155/167] closed parenthesis addition - toString() in ChannelPoolPartitioning (#2103) --- .../asynchttpclient/channel/ChannelPoolPartitioning.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/client/src/main/java/org/asynchttpclient/channel/ChannelPoolPartitioning.java b/client/src/main/java/org/asynchttpclient/channel/ChannelPoolPartitioning.java index 324a4ce34..c91ed6bda 100644 --- a/client/src/main/java/org/asynchttpclient/channel/ChannelPoolPartitioning.java +++ b/client/src/main/java/org/asynchttpclient/channel/ChannelPoolPartitioning.java @@ -15,13 +15,13 @@ */ package org.asynchttpclient.channel; +import java.util.Objects; + import org.asynchttpclient.proxy.ProxyServer; import org.asynchttpclient.proxy.ProxyType; import org.asynchttpclient.uri.Uri; import org.jetbrains.annotations.Nullable; -import java.util.Objects; - @FunctionalInterface public interface ChannelPoolPartitioning { @@ -111,7 +111,8 @@ public String toString() { ", virtualHost=" + virtualHost + ", proxyHost=" + proxyHost + ", proxyPort=" + proxyPort + - ", proxyType=" + proxyType; + ", proxyType=" + proxyType + + ")"; } } } From d2c780da34ef1a3f28fd8a5ba00ba8f591272c4c Mon Sep 17 00:00:00 2001 From: Chris Vest Date: Fri, 22 Aug 2025 20:25:34 -0700 Subject: [PATCH 156/167] Future-proof HTTPS endpoint identification (#2104) Netty 4.2 changes the default for hostname verification for TLS clients, so that it is now enabled by default. As a result, clients that rely on the default being _off_ will find themselves unable to disable it. Instead, clients should explicitly configure their desired endpoint identification algorithm in all cases. Since Netty 4.1.112 we also have a convenient method on the `SslContextBuilder` for doing this, so we don't need multiple round-trips through `SSLParameters`. This PR changes the `DefaultSslEngineFactory` to make use of this method, so it always configures the endpoint identification algorithm to match the desired setting of `AsyncHttpClientConfig..isDisableHttpsEndpointIdentificationAlgorithm()`. --- .../asynchttpclient/netty/ssl/DefaultSslEngineFactory.java | 3 +++ .../org/asynchttpclient/netty/ssl/SslEngineFactoryBase.java | 6 ------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/client/src/main/java/org/asynchttpclient/netty/ssl/DefaultSslEngineFactory.java b/client/src/main/java/org/asynchttpclient/netty/ssl/DefaultSslEngineFactory.java index a96f6ffb1..323b75d5d 100644 --- a/client/src/main/java/org/asynchttpclient/netty/ssl/DefaultSslEngineFactory.java +++ b/client/src/main/java/org/asynchttpclient/netty/ssl/DefaultSslEngineFactory.java @@ -58,6 +58,9 @@ private SslContext buildSslContext(AsyncHttpClientConfig config) throws SSLExcep sslContextBuilder.trustManager(InsecureTrustManagerFactory.INSTANCE); } + sslContextBuilder.endpointIdentificationAlgorithm( + config.isDisableHttpsEndpointIdentificationAlgorithm() ? "" : "HTTPS"); + return configureSslContextBuilder(sslContextBuilder).build(); } diff --git a/client/src/main/java/org/asynchttpclient/netty/ssl/SslEngineFactoryBase.java b/client/src/main/java/org/asynchttpclient/netty/ssl/SslEngineFactoryBase.java index 2d6e5f5ef..7e55ac4de 100644 --- a/client/src/main/java/org/asynchttpclient/netty/ssl/SslEngineFactoryBase.java +++ b/client/src/main/java/org/asynchttpclient/netty/ssl/SslEngineFactoryBase.java @@ -19,7 +19,6 @@ import org.asynchttpclient.SslEngineFactory; import javax.net.ssl.SSLEngine; -import javax.net.ssl.SSLParameters; public abstract class SslEngineFactoryBase implements SslEngineFactory { @@ -30,10 +29,5 @@ protected String domain(String hostname) { protected void configureSslEngine(SSLEngine sslEngine, AsyncHttpClientConfig config) { sslEngine.setUseClientMode(true); - if (!config.isDisableHttpsEndpointIdentificationAlgorithm()) { - SSLParameters params = sslEngine.getSSLParameters(); - params.setEndpointIdentificationAlgorithm("HTTPS"); - sslEngine.setSSLParameters(params); - } } } From 8e2551139743a41153b66a344c6cc0d81abb619c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 23 Aug 2025 08:56:09 +0530 Subject: [PATCH 157/167] Bump org.apache.tomcat.embed:tomcat-embed-core from 10.1.42 to 10.1.44 in /client (#2105) Bumps org.apache.tomcat.embed:tomcat-embed-core from 10.1.42 to 10.1.44. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.apache.tomcat.embed:tomcat-embed-core&package-manager=maven&previous-version=10.1.42&new-version=10.1.44)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/AsyncHttpClient/async-http-client/network/alerts).
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- client/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/pom.xml b/client/pom.xml index 6e56bf9fc..596f38feb 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -31,7 +31,7 @@ org.asynchttpclient.client 11.0.24 - 10.1.42 + 10.1.44 2.18.0 4.11.0 3.0 From 8f7e24925f390b3e249cb1ac45012259b04f647c Mon Sep 17 00:00:00 2001 From: FranWell Date: Wed, 27 Aug 2025 01:41:32 +0800 Subject: [PATCH 158/167] Fix incorrect logger class in ResumableAsyncHandler (#2107) --- .../handler/resumable/ResumableAsyncHandler.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/client/src/main/java/org/asynchttpclient/handler/resumable/ResumableAsyncHandler.java b/client/src/main/java/org/asynchttpclient/handler/resumable/ResumableAsyncHandler.java index 6b8794547..55a5fba14 100644 --- a/client/src/main/java/org/asynchttpclient/handler/resumable/ResumableAsyncHandler.java +++ b/client/src/main/java/org/asynchttpclient/handler/resumable/ResumableAsyncHandler.java @@ -20,7 +20,6 @@ import org.asynchttpclient.RequestBuilder; import org.asynchttpclient.Response; import org.asynchttpclient.Response.ResponseBuilder; -import org.asynchttpclient.handler.TransferCompletionHandler; import org.jetbrains.annotations.Nullable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -47,7 +46,7 @@ * Beware that it registers a shutdown hook, that will cause a ClassLoader leak when used in an appserver and only redeploying the application. */ public class ResumableAsyncHandler implements AsyncHandler { - private static final Logger logger = LoggerFactory.getLogger(TransferCompletionHandler.class); + private static final Logger LOGGER = LoggerFactory.getLogger(ResumableAsyncHandler.class); private static final ResumableIndexThread resumeIndexThread = new ResumableIndexThread(); private static Map resumableIndex = Collections.emptyMap(); @@ -125,7 +124,7 @@ public void onThrowable(Throwable t) { if (decoratedAsyncHandler != null) { decoratedAsyncHandler.onThrowable(t); } else { - logger.debug("", t); + LOGGER.debug("", t); } } From 420474ccb35ffc08029c1713f54d687688933181 Mon Sep 17 00:00:00 2001 From: Aayush Atharva Date: Mon, 1 Sep 2025 02:25:21 +0530 Subject: [PATCH 159/167] HTTPS Proxy Support (#2109) Motivation: AHC only supports HTTP proxy at the moment, not HTTPS. HTTPS is required in many environments because CONNECT has to be encrypted to prevent eavesdropping. Modification: Added HTTPS proxy support. Fixes: #1907 --- .gitignore | 4 + client/pom.xml | 83 ++++++ .../channel/ChannelPoolPartitioning.java | 2 +- .../netty/channel/ChannelManager.java | 68 ++++- .../netty/channel/NettyConnectListener.java | 52 +++- .../intercept/ConnectSuccessInterceptor.java | 14 +- .../netty/request/NettyRequestSender.java | 3 +- .../org/asynchttpclient/proxy/ProxyType.java | 2 +- .../proxy/HttpsProxyBasicTest.java | 115 ++++++++ .../proxy/HttpsProxyIntegrationTest.java | 261 ++++++++++++++++++ .../asynchttpclient/proxy/HttpsProxyTest.java | 188 ++++++++++--- ...tpsProxyTestcontainersIntegrationTest.java | 191 +++++++++++++ client/src/test/resources/squid/Dockerfile | 26 ++ client/src/test/resources/squid/squid.conf | 19 ++ pom.xml | 1 + 15 files changed, 976 insertions(+), 53 deletions(-) create mode 100644 client/src/test/java/org/asynchttpclient/proxy/HttpsProxyBasicTest.java create mode 100644 client/src/test/java/org/asynchttpclient/proxy/HttpsProxyIntegrationTest.java create mode 100644 client/src/test/java/org/asynchttpclient/proxy/HttpsProxyTestcontainersIntegrationTest.java create mode 100644 client/src/test/resources/squid/Dockerfile create mode 100644 client/src/test/resources/squid/squid.conf diff --git a/.gitignore b/.gitignore index d424b2597..546e0e6fd 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,7 @@ MANIFEST.MF work atlassian-ide-plugin.xml /bom/.flattened-pom.xml + +# Docker volumes and logs (but keep configuration) +docker/squid/logs/ +docker/nginx/logs/ diff --git a/client/pom.xml b/client/pom.xml index 596f38feb..9c0cefee3 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -188,5 +188,88 @@ 2.1.6 test + + + + org.testcontainers + testcontainers + ${testcontainers.version} + test + + + org.testcontainers + junit-jupiter + ${testcontainers.version} + test + + + + + docker-tests + + + docker.tests + true + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + false + true + + + + + + + + testcontainers-auto + + true + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + true + + + + + + + + + no-docker-tests + + + no.docker.tests + true + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + true + disabled + + + + + + + diff --git a/client/src/main/java/org/asynchttpclient/channel/ChannelPoolPartitioning.java b/client/src/main/java/org/asynchttpclient/channel/ChannelPoolPartitioning.java index c91ed6bda..291d81844 100644 --- a/client/src/main/java/org/asynchttpclient/channel/ChannelPoolPartitioning.java +++ b/client/src/main/java/org/asynchttpclient/channel/ChannelPoolPartitioning.java @@ -50,7 +50,7 @@ public Object getPartitionKey(Uri uri, @Nullable String virtualHost, @Nullable P targetHostBaseUrl, virtualHost, proxyServer.getHost(), - uri.isSecured() && proxyServer.getProxyType() == ProxyType.HTTP ? + uri.isSecured() && proxyServer.getProxyType().isHttp() ? proxyServer.getSecuredPort() : proxyServer.getPort(), proxyServer.getProxyType()); diff --git a/client/src/main/java/org/asynchttpclient/netty/channel/ChannelManager.java b/client/src/main/java/org/asynchttpclient/netty/channel/ChannelManager.java index c5c94c551..fc55d453d 100755 --- a/client/src/main/java/org/asynchttpclient/netty/channel/ChannelManager.java +++ b/client/src/main/java/org/asynchttpclient/netty/channel/ChannelManager.java @@ -67,6 +67,7 @@ import org.asynchttpclient.netty.request.NettyRequestSender; import org.asynchttpclient.netty.ssl.DefaultSslEngineFactory; import org.asynchttpclient.proxy.ProxyServer; +import org.asynchttpclient.proxy.ProxyType; import org.asynchttpclient.uri.Uri; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -386,14 +387,68 @@ public Future updatePipelineForHttpTunneling(ChannelPipeline pipeline, } if (requestUri.isSecured()) { - if (!isSslHandlerConfigured(pipeline)) { - SslHandler sslHandler = createSslHandler(requestUri.getHost(), requestUri.getExplicitPort()); - whenHandshaked = sslHandler.handshakeFuture(); - pipeline.addBefore(INFLATER_HANDLER, SSL_HANDLER, sslHandler); + // For HTTPS targets, we always need to add/replace the SSL handler for the target connection + // even if there's already an SSL handler in the pipeline (which would be for an HTTPS proxy) + if (isSslHandlerConfigured(pipeline)) { + // Remove existing SSL handler (for proxy) and replace with SSL handler for target + pipeline.remove(SSL_HANDLER); } + SslHandler sslHandler = createSslHandler(requestUri.getHost(), requestUri.getExplicitPort()); + whenHandshaked = sslHandler.handshakeFuture(); + pipeline.addBefore(INFLATER_HANDLER, SSL_HANDLER, sslHandler); pipeline.addAfter(SSL_HANDLER, HTTP_CLIENT_CODEC, newHttpClientCodec()); } else { + // For HTTP targets, remove any existing SSL handler (from HTTPS proxy) since target is not secured + if (isSslHandlerConfigured(pipeline)) { + pipeline.remove(SSL_HANDLER); + } + pipeline.addBefore(AHC_HTTP_HANDLER, HTTP_CLIENT_CODEC, newHttpClientCodec()); + } + + if (requestUri.isWebSocket()) { + pipeline.addAfter(AHC_HTTP_HANDLER, AHC_WS_HANDLER, wsHandler); + + if (config.isEnableWebSocketCompression()) { + pipeline.addBefore(AHC_WS_HANDLER, WS_COMPRESSOR_HANDLER, WebSocketClientCompressionHandler.INSTANCE); + } + + pipeline.remove(AHC_HTTP_HANDLER); + } + return whenHandshaked; + } + + public Future updatePipelineForHttpsTunneling(ChannelPipeline pipeline, Uri requestUri, ProxyServer proxyServer) { + Future whenHandshaked = null; + + // Remove HTTP codec as tunnel is established + if (pipeline.get(HTTP_CLIENT_CODEC) != null) { + pipeline.remove(HTTP_CLIENT_CODEC); + } + + if (requestUri.isSecured()) { + // For HTTPS proxy to HTTPS target, we need to establish target SSL over the proxy SSL tunnel + // The proxy SSL handler should remain as it provides the tunnel transport + // We need to add target SSL handler that will negotiate with the target through the tunnel + + SslHandler sslHandler = createSslHandler(requestUri.getHost(), requestUri.getExplicitPort()); + whenHandshaked = sslHandler.handshakeFuture(); + + // For HTTPS proxy tunnel, add target SSL handler after the existing proxy SSL handler + // This creates a nested SSL setup: Target SSL -> Proxy SSL -> Network + if (isSslHandlerConfigured(pipeline)) { + // Insert target SSL handler after the proxy SSL handler + pipeline.addAfter(SSL_HANDLER, "target-ssl", sslHandler); + } else { + // This shouldn't happen for HTTPS proxy, but fallback + pipeline.addBefore(INFLATER_HANDLER, SSL_HANDLER, sslHandler); + } + + pipeline.addAfter("target-ssl", HTTP_CLIENT_CODEC, newHttpClientCodec()); + + } else { + // For HTTPS proxy to HTTP target, just add HTTP codec + // The proxy SSL handler provides the tunnel and remains pipeline.addBefore(AHC_HTTP_HANDLER, HTTP_CLIENT_CODEC, newHttpClientCodec()); } @@ -406,6 +461,7 @@ public Future updatePipelineForHttpTunneling(ChannelPipeline pipeline, pipeline.remove(AHC_HTTP_HANDLER); } + return whenHandshaked; } @@ -486,6 +542,10 @@ protected void initChannel(Channel channel) throws Exception { } }); + } else if (proxy != null && ProxyType.HTTPS.equals(proxy.getProxyType())) { + // For HTTPS proxies, use HTTP bootstrap but ensure SSL connection to proxy + // The SSL handler for connecting to the proxy will be added in the connect phase + promise.setSuccess(httpBootstrap); } else { promise.setSuccess(httpBootstrap); } diff --git a/client/src/main/java/org/asynchttpclient/netty/channel/NettyConnectListener.java b/client/src/main/java/org/asynchttpclient/netty/channel/NettyConnectListener.java index 719733f8a..2b6a840f5 100755 --- a/client/src/main/java/org/asynchttpclient/netty/channel/NettyConnectListener.java +++ b/client/src/main/java/org/asynchttpclient/netty/channel/NettyConnectListener.java @@ -26,6 +26,7 @@ import org.asynchttpclient.netty.request.NettyRequestSender; import org.asynchttpclient.netty.timeout.TimeoutsHolder; import org.asynchttpclient.proxy.ProxyServer; +import org.asynchttpclient.proxy.ProxyType; import org.asynchttpclient.uri.Uri; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -100,8 +101,57 @@ public void onSuccess(Channel channel, InetSocketAddress remoteAddress) { timeoutsHolder.setResolvedRemoteAddress(remoteAddress); ProxyServer proxyServer = future.getProxyServer(); + // For HTTPS proxies, establish SSL connection to the proxy server first + if (proxyServer != null && ProxyType.HTTPS.equals(proxyServer.getProxyType())) { + SslHandler sslHandler; + try { + sslHandler = channelManager.addSslHandler(channel.pipeline(), + Uri.create("https://" + proxyServer.getHost() + ":" + proxyServer.getSecuredPort()), + null, false); + } catch (Exception sslError) { + onFailure(channel, sslError); + return; + } + + final AsyncHandler asyncHandler = future.getAsyncHandler(); + + try { + asyncHandler.onTlsHandshakeAttempt(); + } catch (Exception e) { + LOGGER.error("onTlsHandshakeAttempt crashed", e); + onFailure(channel, e); + return; + } + + sslHandler.handshakeFuture().addListener(new SimpleFutureListener() { + @Override + protected void onSuccess(Channel value) { + try { + asyncHandler.onTlsHandshakeSuccess(sslHandler.engine().getSession()); + } catch (Exception e) { + LOGGER.error("onTlsHandshakeSuccess crashed", e); + NettyConnectListener.this.onFailure(channel, e); + return; + } + // After SSL handshake to proxy, continue with normal proxy request + writeRequest(channel); + } + + @Override + protected void onFailure(Throwable cause) { + try { + asyncHandler.onTlsHandshakeFailure(cause); + } catch (Exception e) { + LOGGER.error("onTlsHandshakeFailure crashed", e); + NettyConnectListener.this.onFailure(channel, e); + return; + } + NettyConnectListener.this.onFailure(channel, cause); + } + }); + // in case of proxy tunneling, we'll add the SslHandler later, after the CONNECT request - if ((proxyServer == null || proxyServer.getProxyType().isSocks()) && uri.isSecured()) { + } else if ((proxyServer == null || proxyServer.getProxyType().isSocks()) && uri.isSecured()) { SslHandler sslHandler; try { sslHandler = channelManager.addSslHandler(channel.pipeline(), uri, request.getVirtualHost(), proxyServer != null); diff --git a/client/src/main/java/org/asynchttpclient/netty/handler/intercept/ConnectSuccessInterceptor.java b/client/src/main/java/org/asynchttpclient/netty/handler/intercept/ConnectSuccessInterceptor.java index 22e29dbfb..bf64e5909 100644 --- a/client/src/main/java/org/asynchttpclient/netty/handler/intercept/ConnectSuccessInterceptor.java +++ b/client/src/main/java/org/asynchttpclient/netty/handler/intercept/ConnectSuccessInterceptor.java @@ -22,6 +22,7 @@ import org.asynchttpclient.netty.channel.ChannelManager; import org.asynchttpclient.netty.request.NettyRequestSender; import org.asynchttpclient.proxy.ProxyServer; +import org.asynchttpclient.proxy.ProxyType; import org.asynchttpclient.uri.Uri; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -45,7 +46,18 @@ public boolean exitAfterHandlingConnect(Channel channel, NettyResponseFuture Uri requestUri = request.getUri(); LOGGER.debug("Connecting to proxy {} for scheme {}", proxyServer, requestUri.getScheme()); - final Future whenHandshaked = channelManager.updatePipelineForHttpTunneling(channel.pipeline(), requestUri); + + final Future whenHandshaked; + + // Special handling for HTTPS proxy tunneling + if (proxyServer != null && ProxyType.HTTPS.equals(proxyServer.getProxyType())) { + // For HTTPS proxy, we need special tunnel pipeline management + whenHandshaked = channelManager.updatePipelineForHttpsTunneling(channel.pipeline(), requestUri, proxyServer); + } else { + // Standard HTTP proxy or SOCKS proxy tunneling + whenHandshaked = channelManager.updatePipelineForHttpTunneling(channel.pipeline(), requestUri); + } + future.setReuseChannel(true); future.setConnectAllowed(false); diff --git a/client/src/main/java/org/asynchttpclient/netty/request/NettyRequestSender.java b/client/src/main/java/org/asynchttpclient/netty/request/NettyRequestSender.java index b66dd713d..c929d35e2 100755 --- a/client/src/main/java/org/asynchttpclient/netty/request/NettyRequestSender.java +++ b/client/src/main/java/org/asynchttpclient/netty/request/NettyRequestSender.java @@ -54,6 +54,7 @@ import org.asynchttpclient.netty.channel.NettyConnectListener; import org.asynchttpclient.netty.timeout.TimeoutsHolder; import org.asynchttpclient.proxy.ProxyServer; +import org.asynchttpclient.proxy.ProxyType; import org.asynchttpclient.resolver.RequestHostnameResolver; import org.asynchttpclient.uri.Uri; import org.asynchttpclient.ws.WebSocketUpgradeHandler; @@ -337,7 +338,7 @@ private Future> resolveAddresses(Request request, Pr final Promise> promise = ImmediateEventExecutor.INSTANCE.newPromise(); if (proxy != null && !proxy.isIgnoredForHost(uri.getHost()) && proxy.getProxyType().isHttp()) { - int port = uri.isSecured() ? proxy.getSecuredPort() : proxy.getPort(); + int port = ProxyType.HTTPS.equals(proxy.getProxyType()) || uri.isSecured() ? proxy.getSecuredPort() : proxy.getPort(); InetSocketAddress unresolvedRemoteAddress = InetSocketAddress.createUnresolved(proxy.getHost(), port); scheduleRequestTimeout(future, unresolvedRemoteAddress); return RequestHostnameResolver.INSTANCE.resolve(request.getNameResolver(), unresolvedRemoteAddress, asyncHandler); diff --git a/client/src/main/java/org/asynchttpclient/proxy/ProxyType.java b/client/src/main/java/org/asynchttpclient/proxy/ProxyType.java index d1f74e70d..0963eda8c 100644 --- a/client/src/main/java/org/asynchttpclient/proxy/ProxyType.java +++ b/client/src/main/java/org/asynchttpclient/proxy/ProxyType.java @@ -16,7 +16,7 @@ package org.asynchttpclient.proxy; public enum ProxyType { - HTTP(true), SOCKS_V4(false), SOCKS_V5(false); + HTTP(true), HTTPS(true), SOCKS_V4(false), SOCKS_V5(false); private final boolean http; diff --git a/client/src/test/java/org/asynchttpclient/proxy/HttpsProxyBasicTest.java b/client/src/test/java/org/asynchttpclient/proxy/HttpsProxyBasicTest.java new file mode 100644 index 000000000..29876708e --- /dev/null +++ b/client/src/test/java/org/asynchttpclient/proxy/HttpsProxyBasicTest.java @@ -0,0 +1,115 @@ +/* + * Copyright (c) 2025 AsyncHttpClient Project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.asynchttpclient.proxy; + +import io.github.artsok.RepeatedIfExceptionsTest; +import org.asynchttpclient.channel.ChannelPoolPartitioning; +import org.asynchttpclient.uri.Uri; + +import static org.asynchttpclient.Dsl.proxyServer; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * Basic tests for HTTPS proxy type functionality without network calls. + */ +public class HttpsProxyBasicTest { + + @RepeatedIfExceptionsTest(repeats = 5) + public void testHttpsProxyTypeConfiguration() throws Exception { + // Test that HTTPS proxy type can be configured correctly + ProxyServer.Builder builder = proxyServer("proxy.example.com", 8080) + .setSecuredPort(8443) + .setProxyType(ProxyType.HTTPS); + + ProxyServer proxy = builder.build(); + + assertEquals(ProxyType.HTTPS, proxy.getProxyType()); + assertEquals(true, proxy.getProxyType().isHttp()); + assertEquals(8443, proxy.getSecuredPort()); + assertEquals(8080, proxy.getPort()); + assertEquals("proxy.example.com", proxy.getHost()); + } + + @RepeatedIfExceptionsTest(repeats = 5) + public void testHttpsProxyTypeDefaultSecuredPort() { + // Test HTTPS proxy type with default secured port + ProxyServer proxy = proxyServer("proxy.example.com", 8080) + .setProxyType(ProxyType.HTTPS) + .build(); + + assertEquals(ProxyType.HTTPS, proxy.getProxyType()); + assertEquals(true, proxy.getProxyType().isHttp()); + } + + @RepeatedIfExceptionsTest(repeats = 5) + public void testChannelPoolPartitioningWithHttpsProxy() { + // Test that HTTPS proxy creates correct partition keys for connection pooling + ProxyServer httpsProxy = proxyServer("proxy.example.com", 8080) + .setSecuredPort(8443) + .setProxyType(ProxyType.HTTPS) + .build(); + + Uri targetUri = Uri.create("https://target.example.com/test"); + ChannelPoolPartitioning partitioning = ChannelPoolPartitioning.PerHostChannelPoolPartitioning.INSTANCE; + + Object partitionKey = partitioning.getPartitionKey(targetUri, null, httpsProxy); + + assertNotNull(partitionKey); + // The partition key should include the secured port for HTTPS proxy with HTTPS target + assertTrue(partitionKey.toString().contains("8443")); + assertTrue(partitionKey.toString().contains("HTTPS")); + } + + @RepeatedIfExceptionsTest(repeats = 5) + public void testChannelPoolPartitioningHttpsProxyHttpTarget() { + // Test HTTPS proxy with HTTP target - should use normal port + ProxyServer httpsProxy = proxyServer("proxy.example.com", 8080) + .setSecuredPort(8443) + .setProxyType(ProxyType.HTTPS) + .build(); + + Uri targetUri = Uri.create("http://target.example.com/test"); + ChannelPoolPartitioning partitioning = ChannelPoolPartitioning.PerHostChannelPoolPartitioning.INSTANCE; + + Object partitionKey = partitioning.getPartitionKey(targetUri, null, httpsProxy); + + assertNotNull(partitionKey); + // For HTTP target, should use normal proxy port + assertTrue(partitionKey.toString().contains("8080")); + assertTrue(partitionKey.toString().contains("HTTPS")); + } + + @RepeatedIfExceptionsTest(repeats = 5) + public void testChannelPoolPartitioningWithHttpProxy() { + // Test that HTTP proxy creates correct partition keys for connection pooling + ProxyServer httpProxy = proxyServer("proxy.example.com", 8080) + .setSecuredPort(8443) + .setProxyType(ProxyType.HTTP) + .build(); + + Uri targetUri = Uri.create("https://target.example.com/test"); + ChannelPoolPartitioning partitioning = ChannelPoolPartitioning.PerHostChannelPoolPartitioning.INSTANCE; + + Object partitionKey = partitioning.getPartitionKey(targetUri, null, httpProxy); + + assertNotNull(partitionKey); + // For HTTP proxy with secured target, should use secured port + assertTrue(partitionKey.toString().contains("8443")); + assertTrue(partitionKey.toString().contains("HTTP")); + } +} diff --git a/client/src/test/java/org/asynchttpclient/proxy/HttpsProxyIntegrationTest.java b/client/src/test/java/org/asynchttpclient/proxy/HttpsProxyIntegrationTest.java new file mode 100644 index 000000000..ef4614ba1 --- /dev/null +++ b/client/src/test/java/org/asynchttpclient/proxy/HttpsProxyIntegrationTest.java @@ -0,0 +1,261 @@ +/* + * Copyright (c) 2025 AsyncHttpClient Project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.asynchttpclient.proxy; + +import io.github.artsok.RepeatedIfExceptionsTest; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import org.asynchttpclient.AbstractBasicTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.RequestBuilder; +import org.asynchttpclient.Response; +import org.asynchttpclient.channel.ChannelPoolPartitioning; +import org.asynchttpclient.request.body.generator.ByteArrayBodyGenerator; +import org.asynchttpclient.test.EchoHandler; +import org.asynchttpclient.uri.Uri; +import org.asynchttpclient.util.HttpConstants; +import org.eclipse.jetty.proxy.ConnectHandler; +import org.eclipse.jetty.server.Handler; +import org.eclipse.jetty.server.Request; +import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.server.ServerConnector; +import org.eclipse.jetty.server.handler.AbstractHandler; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; + +import java.io.IOException; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.TimeUnit; +import java.util.stream.Stream; + +import static org.asynchttpclient.Dsl.asyncHttpClient; +import static org.asynchttpclient.Dsl.config; +import static org.asynchttpclient.Dsl.get; +import static org.asynchttpclient.Dsl.post; +import static org.asynchttpclient.Dsl.proxyServer; +import static org.asynchttpclient.test.TestUtils.LARGE_IMAGE_BYTES; +import static org.asynchttpclient.test.TestUtils.addHttpConnector; +import static org.asynchttpclient.test.TestUtils.addHttpsConnector; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * Comprehensive integration tests for HTTPS proxy functionality. + * Tests both HTTP and HTTPS proxy types to ensure functionality and compatibility. + */ +public class HttpsProxyIntegrationTest extends AbstractBasicTest { + + private List servers; + private int httpsProxyPort; + + @Override + public AbstractHandler configureHandler() throws Exception { + return new ProxyHandler(); + } + + /** + * Provides test parameters for HTTP proxy type only for now + * TODO: Add HTTPS proxy type once SSL bootstrap is implemented + */ + static Stream proxyTypeProvider() { + return Stream.of( + Arguments.of("HTTP Proxy", ProxyType.HTTP) + // Arguments.of("HTTPS Proxy", ProxyType.HTTPS) // TODO: Enable once HTTPS proxy SSL bootstrap is working + ); + } + + @Override + @BeforeEach + public void setUpGlobal() throws Exception { + servers = new ArrayList<>(); + + // Start HTTP proxy server + port1 = startServer(configureHandler(), false); + + // Start HTTPS target server + port2 = startServer(new EchoHandler(), true); + + // Start HTTPS proxy server + httpsProxyPort = startServer(configureHandler(), true); + + logger.info("Integration test servers started: HTTP proxy={}, HTTPS proxy={}, HTTPS target={}", + port1, httpsProxyPort, port2); + } + + private int startServer(Handler handler, boolean secure) throws Exception { + Server server = new Server(); + @SuppressWarnings("resource") + ServerConnector connector = secure ? addHttpsConnector(server) : addHttpConnector(server); + server.setHandler(handler); + server.start(); + servers.add(server); + return connector.getLocalPort(); + } + + @Override + @AfterEach + public void tearDownGlobal() { + servers.forEach(server -> { + try { + server.stop(); + } catch (Exception e) { + // couldn't stop server + } + }); + } + + @ParameterizedTest(name = "{0} - Basic Request") + @MethodSource("proxyTypeProvider") + public void testBasicRequestThroughProxy(String testName, ProxyType proxyType) throws Exception { + int proxyPort = proxyType == ProxyType.HTTPS ? httpsProxyPort : port1; + + try (AsyncHttpClient client = asyncHttpClient(config().setFollowRedirect(true).setUseInsecureTrustManager(true))) { + RequestBuilder rb = get(getTargetUrl2()).setProxyServer(proxyServer("localhost", proxyPort).setProxyType(proxyType)); + Response response = client.executeRequest(rb.build()).get(); + assertEquals(200, response.getStatusCode()); + + // Verify that the request went through the proxy + assertNotNull(response); + } + } + + @ParameterizedTest(name = "{0} - Multiple Requests") + @MethodSource("proxyTypeProvider") + public void testMultipleRequestsThroughProxy(String testName, ProxyType proxyType) throws Exception { + int proxyPort = proxyType == ProxyType.HTTPS ? httpsProxyPort : port1; + + try (AsyncHttpClient client = asyncHttpClient(config().setFollowRedirect(true).setUseInsecureTrustManager(true).setKeepAlive(true))) { + ProxyServer proxy = proxyServer("localhost", proxyPort).setProxyType(proxyType).build(); + + // Execute multiple requests to test connection reuse + for (int i = 0; i < 3; i++) { + RequestBuilder rb = get(getTargetUrl2()).setProxyServer(proxy); + Response response = client.executeRequest(rb.build()).get(); + assertEquals(200, response.getStatusCode(), "Request " + (i + 1) + " failed"); + } + } + } + + @ParameterizedTest(name = "{0} - Large Body") + @MethodSource("proxyTypeProvider") + public void testLargeRequestBodyThroughProxy(String testName, ProxyType proxyType) throws Exception { + int proxyPort = proxyType == ProxyType.HTTPS ? httpsProxyPort : port1; + + try (AsyncHttpClient client = asyncHttpClient(config().setFollowRedirect(true).setUseInsecureTrustManager(true))) { + ProxyServer proxy = proxyServer("localhost", proxyPort).setProxyType(proxyType).build(); + + RequestBuilder rb = post(getTargetUrl2()) + .setProxyServer(proxy) + .setBody(new ByteArrayBodyGenerator(LARGE_IMAGE_BYTES)); + + Response response = client.executeRequest(rb.build()).get(); + assertEquals(200, response.getStatusCode()); + assertTrue(response.getResponseBody().length() > 0); + } + } + + @ParameterizedTest(name = "{0} - Timeout Configuration") + @MethodSource("proxyTypeProvider") + public void testProxyTimeoutConfiguration(String testName, ProxyType proxyType) throws Exception { + int proxyPort = proxyType == ProxyType.HTTPS ? httpsProxyPort : port1; + + AsyncHttpClientConfig config = config() + .setFollowRedirect(true) + .setUseInsecureTrustManager(true) + .setConnectTimeout(Duration.ofSeconds(5)) + .setRequestTimeout(Duration.ofSeconds(10)) + .build(); + + try (AsyncHttpClient client = asyncHttpClient(config)) { + ProxyServer proxy = proxyServer("localhost", proxyPort).setProxyType(proxyType).build(); + + RequestBuilder rb = get(getTargetUrl2()).setProxyServer(proxy); + Response response = client.executeRequest(rb.build()).get(15, TimeUnit.SECONDS); + assertEquals(200, response.getStatusCode()); + } + } + + @RepeatedIfExceptionsTest(repeats = 5) + public void testChannelPoolPartitioningWithHttpsProxy() throws Exception { + // Test that HTTPS proxy creates correct partition keys for connection pooling + ProxyServer httpsProxy = proxyServer("proxy.example.com", 8080) + .setSecuredPort(8443) + .setProxyType(ProxyType.HTTPS) + .build(); + + Uri targetUri = Uri.create("https://target.example.com/test"); + ChannelPoolPartitioning partitioning = ChannelPoolPartitioning.PerHostChannelPoolPartitioning.INSTANCE; + + Object partitionKey = partitioning.getPartitionKey(targetUri, null, httpsProxy); + + assertNotNull(partitionKey); + // The partition key should include the secured port for HTTPS proxy + assertTrue(partitionKey.toString().contains("8443")); + assertTrue(partitionKey.toString().contains("HTTPS")); + } + + @RepeatedIfExceptionsTest(repeats = 5) + public void testChannelPoolPartitioningWithHttpProxy() throws Exception { + // Test that HTTP proxy creates correct partition keys for connection pooling + ProxyServer httpProxy = proxyServer("proxy.example.com", 8080) + .setSecuredPort(8443) + .setProxyType(ProxyType.HTTP) + .build(); + + Uri targetUri = Uri.create("https://target.example.com/test"); + ChannelPoolPartitioning partitioning = ChannelPoolPartitioning.PerHostChannelPoolPartitioning.INSTANCE; + + Object partitionKey = partitioning.getPartitionKey(targetUri, null, httpProxy); + + assertNotNull(partitionKey); + // For HTTP proxy with secured target, should use secured port + assertTrue(partitionKey.toString().contains("8443")); + assertTrue(partitionKey.toString().contains("HTTP")); + } + + public static class ProxyHandler extends ConnectHandler { + final static String HEADER_FORBIDDEN = "X-REJECT-REQUEST"; + + @Override + public void handle(String s, Request r, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { + if (HttpConstants.Methods.CONNECT.equalsIgnoreCase(request.getMethod())) { + String headerValue = request.getHeader(HEADER_FORBIDDEN); + if (headerValue == null) { + headerValue = ""; + } + switch (headerValue) { + case "1": + response.setStatus(HttpServletResponse.SC_FORBIDDEN); + r.setHandled(true); + return; + case "2": + r.getHttpChannel().getConnection().close(); + r.setHandled(true); + return; + } + } + super.handle(s, r, request, response); + } + } +} diff --git a/client/src/test/java/org/asynchttpclient/proxy/HttpsProxyTest.java b/client/src/test/java/org/asynchttpclient/proxy/HttpsProxyTest.java index 9bd5ca911..a6d4b6985 100644 --- a/client/src/test/java/org/asynchttpclient/proxy/HttpsProxyTest.java +++ b/client/src/test/java/org/asynchttpclient/proxy/HttpsProxyTest.java @@ -17,7 +17,6 @@ import jakarta.servlet.ServletException; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; - import org.asynchttpclient.AbstractBasicTest; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.AsyncHttpClientConfig; @@ -28,12 +27,22 @@ import org.asynchttpclient.test.EchoHandler; import org.asynchttpclient.util.HttpConstants; import org.eclipse.jetty.proxy.ConnectHandler; +import org.eclipse.jetty.server.Handler; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.ServerConnector; import org.eclipse.jetty.server.handler.AbstractHandler; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.ExecutionException; +import java.util.stream.Stream; import static org.asynchttpclient.Dsl.asyncHttpClient; import static org.asynchttpclient.Dsl.config; @@ -46,60 +55,93 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrowsExactly; -import java.io.IOException; -import java.util.concurrent.ExecutionException; - /** * Proxy usage tests. */ public class HttpsProxyTest extends AbstractBasicTest { - private Server server2; + private List servers; + private int proxyPort; + private int httpsProxyPort; @Override public AbstractHandler configureHandler() throws Exception { return new ProxyHandler(); } + /** + * Provides test parameters for HTTP proxy type working, HTTPS proxy tests added but with known SSL bootstrap issue + */ + static Stream proxyTypeProvider() { + return Stream.of( + Arguments.of("HTTP Proxy", ProxyType.HTTP) + // Note: HTTPS proxy tests will be enabled once SSL bootstrap implementation is completed + // Arguments.of("HTTPS Proxy", ProxyType.HTTPS) + ); + } + @Override @BeforeEach public void setUpGlobal() throws Exception { - server = new Server(); - ServerConnector connector = addHttpConnector(server); - server.setHandler(configureHandler()); - server.start(); - port1 = connector.getLocalPort(); + servers = new ArrayList<>(); + + // Start HTTP target server + port1 = startServer(new EchoHandler(), false); + + // Start HTTPS target server + port2 = startServer(new EchoHandler(), true); + + // Start HTTP proxy server + proxyPort = startServer(configureHandler(), false); + + // Start HTTPS proxy server + httpsProxyPort = startServer(configureHandler(), true); - server2 = new Server(); - ServerConnector connector2 = addHttpsConnector(server2); - server2.setHandler(new EchoHandler()); - server2.start(); - port2 = connector2.getLocalPort(); + logger.info("Local servers started successfully"); + } - logger.info("Local HTTP server started successfully"); + private int startServer(Handler handler, boolean secure) throws Exception { + Server server = new Server(); + @SuppressWarnings("resource") + ServerConnector connector = secure ? addHttpsConnector(server) : addHttpConnector(server); + server.setHandler(handler); + server.start(); + servers.add(server); + return connector.getLocalPort(); } @Override @AfterEach - public void tearDownGlobal() throws Exception { - server.stop(); - server2.stop(); + public void tearDownGlobal() { + servers.forEach(server -> { + try { + server.stop(); + } catch (Exception e) { + // couldn't stop server + } + }); } - @RepeatedIfExceptionsTest(repeats = 5) - public void testRequestProxy() throws Exception { + @ParameterizedTest(name = "{0}") + @MethodSource("proxyTypeProvider") + public void testRequestProxy(String testName, ProxyType proxyType) throws Exception { + int proxyPort = proxyType == ProxyType.HTTPS ? httpsProxyPort : this.proxyPort; + try (AsyncHttpClient client = asyncHttpClient(config().setFollowRedirect(true).setUseInsecureTrustManager(true))) { - RequestBuilder rb = get(getTargetUrl2()).setProxyServer(proxyServer("localhost", port1)); + RequestBuilder rb = get(getTargetUrl2()).setProxyServer(proxyServer("localhost", proxyPort).setProxyType(proxyType)); Response response = client.executeRequest(rb.build()).get(); assertEquals(200, response.getStatusCode()); } } - @RepeatedIfExceptionsTest(repeats = 5) - public void testConfigProxy() throws Exception { + @ParameterizedTest(name = "{0}") + @MethodSource("proxyTypeProvider") + public void testConfigProxy(String testName, ProxyType proxyType) throws Exception { + int proxyPort = proxyType == ProxyType.HTTPS ? httpsProxyPort : this.proxyPort; + AsyncHttpClientConfig config = config() .setFollowRedirect(true) - .setProxyServer(proxyServer("localhost", port1).build()) + .setProxyServer(proxyServer("localhost", proxyPort).setProxyType(proxyType).build()) .setUseInsecureTrustManager(true) .build(); @@ -109,11 +151,14 @@ public void testConfigProxy() throws Exception { } } - @RepeatedIfExceptionsTest(repeats = 5) - public void testNoDirectRequestBodyWithProxy() throws Exception { + @ParameterizedTest(name = "{0}") + @MethodSource("proxyTypeProvider") + public void testNoDirectRequestBodyWithProxy(String testName, ProxyType proxyType) throws Exception { + int proxyPort = proxyType == ProxyType.HTTPS ? httpsProxyPort : this.proxyPort; + AsyncHttpClientConfig config = config() .setFollowRedirect(true) - .setProxyServer(proxyServer("localhost", port1).build()) + .setProxyServer(proxyServer("localhost", proxyPort).setProxyType(proxyType).build()) .setUseInsecureTrustManager(true) .build(); @@ -123,11 +168,14 @@ public void testNoDirectRequestBodyWithProxy() throws Exception { } } - @RepeatedIfExceptionsTest(repeats = 5) - public void testDecompressBodyWithProxy() throws Exception { + @ParameterizedTest(name = "{0}") + @MethodSource("proxyTypeProvider") + public void testDecompressBodyWithProxy(String testName, ProxyType proxyType) throws Exception { + int proxyPort = proxyType == ProxyType.HTTPS ? httpsProxyPort : this.proxyPort; + AsyncHttpClientConfig config = config() .setFollowRedirect(true) - .setProxyServer(proxyServer("localhost", port1).build()) + .setProxyServer(proxyServer("localhost", proxyPort).setProxyType(proxyType).build()) .setUseInsecureTrustManager(true) .build(); @@ -142,10 +190,13 @@ public void testDecompressBodyWithProxy() throws Exception { } } - @RepeatedIfExceptionsTest(repeats = 5) - public void testPooledConnectionsWithProxy() throws Exception { + @ParameterizedTest(name = "{0}") + @MethodSource("proxyTypeProvider") + public void testPooledConnectionsWithProxy(String testName, ProxyType proxyType) throws Exception { + int proxyPort = proxyType == ProxyType.HTTPS ? httpsProxyPort : this.proxyPort; + try (AsyncHttpClient asyncHttpClient = asyncHttpClient(config().setFollowRedirect(true).setUseInsecureTrustManager(true).setKeepAlive(true))) { - RequestBuilder rb = get(getTargetUrl2()).setProxyServer(proxyServer("localhost", port1)); + RequestBuilder rb = get(getTargetUrl2()).setProxyServer(proxyServer("localhost", proxyPort).setProxyType(proxyType)); Response response1 = asyncHttpClient.executeRequest(rb.build()).get(); assertEquals(200, response1.getStatusCode()); @@ -155,12 +206,15 @@ public void testPooledConnectionsWithProxy() throws Exception { } } - @RepeatedIfExceptionsTest(repeats = 5) - public void testFailedConnectWithProxy() throws Exception { + @ParameterizedTest(name = "{0}") + @MethodSource("proxyTypeProvider") + public void testFailedConnectWithProxy(String testName, ProxyType proxyType) throws Exception { + int proxyPort = proxyType == ProxyType.HTTPS ? httpsProxyPort : this.proxyPort; + try (AsyncHttpClient asyncHttpClient = asyncHttpClient(config().setFollowRedirect(true).setUseInsecureTrustManager(true).setKeepAlive(true))) { - Builder proxyServer = proxyServer("localhost", port1); - proxyServer.setCustomHeaders(r -> new DefaultHttpHeaders().set(ProxyHandler.HEADER_FORBIDDEN, "1")); - RequestBuilder rb = get(getTargetUrl2()).setProxyServer(proxyServer); + Builder proxyServerBuilder = proxyServer("localhost", proxyPort).setProxyType(proxyType); + proxyServerBuilder.setCustomHeaders(r -> new DefaultHttpHeaders().set(ProxyHandler.HEADER_FORBIDDEN, "1")); + RequestBuilder rb = get(getTargetUrl2()).setProxyServer(proxyServerBuilder); Response response1 = asyncHttpClient.executeRequest(rb.build()).get(); assertEquals(403, response1.getStatusCode()); @@ -173,13 +227,16 @@ public void testFailedConnectWithProxy() throws Exception { } } - @RepeatedIfExceptionsTest(repeats = 5) - public void testClosedConnectionWithProxy() throws Exception { + @ParameterizedTest(name = "{0}") + @MethodSource("proxyTypeProvider") + public void testClosedConnectionWithProxy(String testName, ProxyType proxyType) throws Exception { + int proxyPort = proxyType == ProxyType.HTTPS ? httpsProxyPort : this.proxyPort; + try (AsyncHttpClient asyncHttpClient = asyncHttpClient( config().setFollowRedirect(true).setUseInsecureTrustManager(true).setKeepAlive(true))) { - Builder proxyServer = proxyServer("localhost", port1); - proxyServer.setCustomHeaders(r -> new DefaultHttpHeaders().set(ProxyHandler.HEADER_FORBIDDEN, "2")); - RequestBuilder rb = get(getTargetUrl2()).setProxyServer(proxyServer); + Builder proxyServerBuilder = proxyServer("localhost", proxyPort).setProxyType(proxyType); + proxyServerBuilder.setCustomHeaders(r -> new DefaultHttpHeaders().set(ProxyHandler.HEADER_FORBIDDEN, "2")); + RequestBuilder rb = get(getTargetUrl2()).setProxyServer(proxyServerBuilder); assertThrowsExactly(ExecutionException.class, () -> asyncHttpClient.executeRequest(rb.build()).get()); assertThrowsExactly(ExecutionException.class, () -> asyncHttpClient.executeRequest(rb.build()).get()); @@ -187,6 +244,49 @@ public void testClosedConnectionWithProxy() throws Exception { } } + @RepeatedIfExceptionsTest(repeats = 5) + public void testHttpsProxyType() throws Exception { + // Test that HTTPS proxy type can be configured and behaves correctly + ProxyServer.Builder builder = proxyServer("localhost", port1) + .setSecuredPort(443) + .setProxyType(ProxyType.HTTPS); + + ProxyServer proxy = builder.build(); + + assertEquals(ProxyType.HTTPS, proxy.getProxyType()); + assertEquals(true, proxy.getProxyType().isHttp()); + assertEquals(443, proxy.getSecuredPort()); + } + + @RepeatedIfExceptionsTest(repeats = 5) + public void testHttpsProxyWithSecuredPortOnly() throws Exception { + // Test HTTPS proxy using only secured port (typical configuration) + try (AsyncHttpClient client = asyncHttpClient(config().setFollowRedirect(true).setUseInsecureTrustManager(true))) { + ProxyServer httpsProxy = proxyServer("localhost", httpsProxyPort) + .setProxyType(ProxyType.HTTPS) + .build(); + + RequestBuilder rb = get(getTargetUrl2()).setProxyServer(httpsProxy); + Response response = client.executeRequest(rb.build()).get(); + assertEquals(200, response.getStatusCode()); + } + } + + @RepeatedIfExceptionsTest(repeats = 5) + public void testHttpsProxyWithAuthentication() throws Exception { + // Test HTTPS proxy with custom headers (simulating authentication) + try (AsyncHttpClient client = asyncHttpClient(config().setFollowRedirect(true).setUseInsecureTrustManager(true))) { + ProxyServer httpsProxy = proxyServer("localhost", httpsProxyPort) + .setProxyType(ProxyType.HTTPS) + .setCustomHeaders(request -> new DefaultHttpHeaders().set("Proxy-Authorization", "Bearer test-token")) + .build(); + + RequestBuilder rb = get(getTargetUrl2()).setProxyServer(httpsProxy); + Response response = client.executeRequest(rb.build()).get(); + assertEquals(200, response.getStatusCode()); + } + } + public static class ProxyHandler extends ConnectHandler { final static String HEADER_FORBIDDEN = "X-REJECT-REQUEST"; diff --git a/client/src/test/java/org/asynchttpclient/proxy/HttpsProxyTestcontainersIntegrationTest.java b/client/src/test/java/org/asynchttpclient/proxy/HttpsProxyTestcontainersIntegrationTest.java new file mode 100644 index 000000000..e915e8666 --- /dev/null +++ b/client/src/test/java/org/asynchttpclient/proxy/HttpsProxyTestcontainersIntegrationTest.java @@ -0,0 +1,191 @@ +/* + * Copyright (c) 2025 AsyncHttpClient Project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.asynchttpclient.proxy; + +import io.github.artsok.RepeatedIfExceptionsTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.Response; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.testcontainers.DockerClientFactory; +import org.testcontainers.containers.GenericContainer; +import org.testcontainers.containers.output.Slf4jLogConsumer; +import org.testcontainers.containers.wait.strategy.Wait; +import org.testcontainers.images.builder.ImageFromDockerfile; +import org.testcontainers.junit.jupiter.Testcontainers; + +import java.nio.file.Path; +import java.time.Duration; +import java.util.concurrent.TimeUnit; + +import static org.asynchttpclient.Dsl.asyncHttpClient; +import static org.asynchttpclient.Dsl.config; +import static org.asynchttpclient.Dsl.get; +import static org.asynchttpclient.Dsl.proxyServer; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assumptions.assumeTrue; + +@Testcontainers +public class HttpsProxyTestcontainersIntegrationTest { + + private static final Logger LOGGER = LoggerFactory.getLogger(HttpsProxyTestcontainersIntegrationTest.class); + + private static final int SQUID_HTTP_PORT = 3128; + private static final int SQUID_HTTPS_PORT = 3129; + + private static final String TARGET_HTTP_URL = "http://httpbin.org/get"; + private static final String TARGET_HTTPS_URL = "https://www.example.com/"; + + private static boolean dockerAvailable = false; + private static GenericContainer squidProxy; + + @BeforeAll + static void checkDockerAvailability() { + try { + dockerAvailable = DockerClientFactory.instance().isDockerAvailable(); + LOGGER.info("Docker availability check: {}", dockerAvailable); + } catch (Exception e) { + LOGGER.warn("Failed to check Docker availability: {}", e.getMessage()); + dockerAvailable = false; + } + // Skip tests if Docker not available, unless force-enabled + if (!dockerAvailable && !"true".equals(System.getProperty("docker.tests"))) { + assumeTrue(false, "Docker is not available - skipping integration tests. Use -Ddocker.tests=true to force run."); + } + // Allow force-disabling Docker tests + if ("true".equals(System.getProperty("no.docker.tests"))) { + assumeTrue(false, "Docker tests disabled via -Dno.docker.tests=true"); + } + // Only start container if Docker is available + if (dockerAvailable) { + squidProxy = new GenericContainer<>( + new ImageFromDockerfile() + .withFileFromPath("Dockerfile", Path.of("src/test/resources/squid/Dockerfile")) + .withFileFromPath("squid.conf", Path.of("src/test/resources/squid/squid.conf")) + ) + .withExposedPorts(SQUID_HTTP_PORT, SQUID_HTTPS_PORT) + .withLogConsumer(new Slf4jLogConsumer(LOGGER).withPrefix("SQUID")) + .waitingFor(Wait.forLogMessage(".*Accepting HTTP.*", 1) + .withStartupTimeout(Duration.ofMinutes(2))); + squidProxy.start(); + } + } + + @AfterAll + static void stopContainer() { + if (squidProxy != null && squidProxy.isRunning()) { + squidProxy.stop(); + } + } + + @RepeatedIfExceptionsTest(repeats = 3) + public void testHttpProxyToHttpTarget() throws Exception { + assumeTrue(dockerAvailable, "Docker is not available - skipping test"); + LOGGER.info("Testing HTTP proxy to HTTP target"); + AsyncHttpClientConfig config = config() + .setProxyServer(proxyServer("localhost", squidProxy.getMappedPort(SQUID_HTTP_PORT)) + .setProxyType(ProxyType.HTTP) + .build()) + .setConnectTimeout(Duration.ofMillis(10000)) + .setRequestTimeout(Duration.ofMillis(30000)) + .build(); + try (AsyncHttpClient client = asyncHttpClient(config)) { + Response response = client.executeRequest(get(TARGET_HTTP_URL)).get(30, TimeUnit.SECONDS); + assertEquals(200, response.getStatusCode()); + assertTrue(response.getResponseBody().contains("httpbin")); + LOGGER.info("HTTP proxy to HTTP target test passed"); + } + } + + @RepeatedIfExceptionsTest(repeats = 3) + public void testHttpsProxyToHttpTarget() throws Exception { + assumeTrue(dockerAvailable, "Docker is not available - skipping test"); + LOGGER.info("Testing HTTPS proxy to HTTP target"); + AsyncHttpClientConfig config = config() + .setProxyServer(proxyServer("localhost", squidProxy.getMappedPort(SQUID_HTTPS_PORT)) + .setProxyType(ProxyType.HTTPS) + .build()) + .setUseInsecureTrustManager(true) + .setConnectTimeout(Duration.ofMillis(10000)) + .setRequestTimeout(Duration.ofMillis(30000)) + .build(); + try (AsyncHttpClient client = asyncHttpClient(config)) { + Response response = client.executeRequest(get(TARGET_HTTP_URL)).get(30, TimeUnit.SECONDS); + assertEquals(200, response.getStatusCode()); + assertTrue(response.getResponseBody().contains("httpbin")); + LOGGER.info("HTTPS proxy to HTTP target test passed"); + } + } + + @RepeatedIfExceptionsTest(repeats = 3) + public void testHttpProxyToHttpsTarget() throws Exception { + assumeTrue(dockerAvailable, "Docker is not available - skipping test"); + LOGGER.info("Testing HTTP proxy to HTTPS target"); + AsyncHttpClientConfig config = config() + .setProxyServer(proxyServer("localhost", squidProxy.getMappedPort(SQUID_HTTP_PORT)) + .setProxyType(ProxyType.HTTP) + .build()) + .setUseInsecureTrustManager(true) + .setConnectTimeout(Duration.ofMillis(10000)) + .setRequestTimeout(Duration.ofMillis(30000)) + .build(); + try (AsyncHttpClient client = asyncHttpClient(config)) { + Response response = client.executeRequest(get(TARGET_HTTPS_URL)).get(30, TimeUnit.SECONDS); + assertEquals(200, response.getStatusCode()); + assertTrue(response.getResponseBody().contains("Example Domain") || + response.getResponseBody().contains("example")); + LOGGER.info("HTTP proxy to HTTPS target test passed"); + } + } + + @RepeatedIfExceptionsTest(repeats = 3) + public void testHttpsProxyToHttpsTarget() throws Exception { + assumeTrue(dockerAvailable, "Docker is not available - skipping test"); + LOGGER.info("Testing HTTPS proxy to HTTPS target - validates issue #1907 fix"); + AsyncHttpClientConfig config = config() + .setProxyServer(proxyServer("localhost", squidProxy.getMappedPort(SQUID_HTTPS_PORT)) + .setProxyType(ProxyType.HTTPS) + .build()) + .setUseInsecureTrustManager(true) + .setConnectTimeout(Duration.ofMillis(10000)) + .setRequestTimeout(Duration.ofMillis(30000)) + .build(); + try (AsyncHttpClient client = asyncHttpClient(config)) { + Response response = client.executeRequest(get(TARGET_HTTPS_URL)).get(30, TimeUnit.SECONDS); + assertEquals(200, response.getStatusCode()); + assertTrue(response.getResponseBody().contains("Example Domain") || + response.getResponseBody().contains("example")); + LOGGER.info("HTTPS proxy to HTTPS target test passed - core issue #1907 RESOLVED!"); + } + } + + @Test + public void testDockerInfrastructureReady() { + assumeTrue(dockerAvailable, "Docker is not available - skipping test"); + LOGGER.info("Docker infrastructure test - validating container is ready"); + LOGGER.info("Squid HTTP proxy available at: localhost:{}", squidProxy.getMappedPort(SQUID_HTTP_PORT)); + LOGGER.info("Squid HTTPS proxy available at: localhost:{}", squidProxy.getMappedPort(SQUID_HTTPS_PORT)); + assertTrue(squidProxy.isRunning(), "Squid container should be running"); + assertTrue(squidProxy.getMappedPort(SQUID_HTTP_PORT) > 0, "HTTP port should be mapped"); + assertTrue(squidProxy.getMappedPort(SQUID_HTTPS_PORT) > 0, "HTTPS port should be mapped"); + LOGGER.info("Docker infrastructure is ready and accessible"); + } +} diff --git a/client/src/test/resources/squid/Dockerfile b/client/src/test/resources/squid/Dockerfile new file mode 100644 index 000000000..5ba0372b7 --- /dev/null +++ b/client/src/test/resources/squid/Dockerfile @@ -0,0 +1,26 @@ +FROM ubuntu/squid:latest + +# Install OpenSSL for certificate generation +RUN apt-get update && \ + apt-get install -y openssl && \ + rm -rf /var/lib/apt/lists/* && \ + mkdir -p /etc/squid/certs /var/log/squid && \ + chown -R proxy:proxy /var/log/squid /etc/squid/certs + +# Generate self-signed certificate for localhost +RUN openssl req -x509 -nodes -days 365 -newkey rsa:2048 \ + -keyout /etc/squid/certs/proxy.key \ + -out /etc/squid/certs/proxy.crt \ + -subj "/CN=localhost" && \ + cat /etc/squid/certs/proxy.key /etc/squid/certs/proxy.crt > /etc/squid/certs/proxy.pem && \ + chmod 600 /etc/squid/certs/proxy.key /etc/squid/certs/proxy.pem && \ + chmod 644 /etc/squid/certs/proxy.crt && \ + chown -R proxy:proxy /etc/squid/certs + +# Copy squid configuration +COPY squid.conf /etc/squid/squid.conf +RUN chown proxy:proxy /etc/squid/squid.conf + +EXPOSE 3128 3129 + +CMD ["squid", "-f", "/etc/squid/squid.conf", "-NYCd", "1"] \ No newline at end of file diff --git a/client/src/test/resources/squid/squid.conf b/client/src/test/resources/squid/squid.conf new file mode 100644 index 000000000..5c317089f --- /dev/null +++ b/client/src/test/resources/squid/squid.conf @@ -0,0 +1,19 @@ +# HTTP and HTTPS proxy ports +http_port 0.0.0.0:3128 +https_port 0.0.0.0:3129 tls-cert=/etc/squid/certs/proxy.pem + +# Allow all access for testing +http_access allow all + +# Disable caching for testing +cache deny all + +# Logging configuration +access_log /var/log/squid/access.log squid +cache_log /var/log/squid/cache.log + +# Performance settings +maximum_object_size_in_memory 512 KB +maximum_object_size 1 GB +cache_dir null /tmp +pid_filename /var/run/squid.pid \ No newline at end of file diff --git a/pom.xml b/pom.xml index 9d64fc54b..252230a42 100644 --- a/pom.xml +++ b/pom.xml @@ -53,6 +53,7 @@ 2.0.1 1.5.18 26.0.2 + 1.20.4 From af520cca2987d70909d97733865a6311987a1ae6 Mon Sep 17 00:00:00 2001 From: Aayush Atharva Date: Fri, 5 Sep 2025 16:09:47 +0530 Subject: [PATCH 160/167] Upgrade to Netty 4.2 (#2112) --- .../netty/channel/ChannelManager.java | 8 +++---- ...tory.java => IoUringTransportFactory.java} | 21 ++++++++++--------- .../DefaultAsyncHttpClientTest.java | 4 ++-- .../asynchttpclient/MultipleHeaderTest.java | 2 ++ .../org/asynchttpclient/netty/NettyTest.java | 4 ++-- client/src/test/resources/logback-test.xml | 1 + pom.xml | 14 ++++++------- 7 files changed, 29 insertions(+), 25 deletions(-) rename client/src/main/java/org/asynchttpclient/netty/channel/{IoUringIncubatorTransportFactory.java => IoUringTransportFactory.java} (56%) diff --git a/client/src/main/java/org/asynchttpclient/netty/channel/ChannelManager.java b/client/src/main/java/org/asynchttpclient/netty/channel/ChannelManager.java index fc55d453d..e9f4d111e 100755 --- a/client/src/main/java/org/asynchttpclient/netty/channel/ChannelManager.java +++ b/client/src/main/java/org/asynchttpclient/netty/channel/ChannelManager.java @@ -165,8 +165,8 @@ public ChannelManager(final AsyncHttpClientConfig config, Timer nettyTimer) { transportFactory = new EpollTransportFactory(); } else if (isInstanceof(eventLoopGroup, "io.netty.channel.kqueue.KQueueEventLoopGroup")) { transportFactory = new KQueueTransportFactory(); - } else if (isInstanceof(eventLoopGroup, "io.netty.incubator.channel.uring.IOUringEventLoopGroup")) { - transportFactory = new IoUringIncubatorTransportFactory(); + } else if (isInstanceof(eventLoopGroup, "io.netty.channel.uring.IOUringEventLoopGroup")) { + transportFactory = new IoUringTransportFactory(); } else { throw new IllegalArgumentException("Unknown event loop group " + eventLoopGroup.getClass().getSimpleName()); } @@ -190,8 +190,8 @@ public ChannelManager(final AsyncHttpClientConfig config, Timer nettyTimer) { // We will check if Epoll is available or not. If available, return EpollTransportFactory. // If none of the condition matches then no native transport is available, and we will throw an exception. if (!PlatformDependent.isWindows()) { - if (IoUringIncubatorTransportFactory.isAvailable() && !config.isUseOnlyEpollNativeTransport()) { - return new IoUringIncubatorTransportFactory(); + if (IoUringTransportFactory.isAvailable() && !config.isUseOnlyEpollNativeTransport()) { + return new IoUringTransportFactory(); } else if (EpollTransportFactory.isAvailable()) { return new EpollTransportFactory(); } diff --git a/client/src/main/java/org/asynchttpclient/netty/channel/IoUringIncubatorTransportFactory.java b/client/src/main/java/org/asynchttpclient/netty/channel/IoUringTransportFactory.java similarity index 56% rename from client/src/main/java/org/asynchttpclient/netty/channel/IoUringIncubatorTransportFactory.java rename to client/src/main/java/org/asynchttpclient/netty/channel/IoUringTransportFactory.java index 2065ef10b..a93250185 100644 --- a/client/src/main/java/org/asynchttpclient/netty/channel/IoUringIncubatorTransportFactory.java +++ b/client/src/main/java/org/asynchttpclient/netty/channel/IoUringTransportFactory.java @@ -15,30 +15,31 @@ */ package org.asynchttpclient.netty.channel; -import io.netty.incubator.channel.uring.IOUring; -import io.netty.incubator.channel.uring.IOUringEventLoopGroup; -import io.netty.incubator.channel.uring.IOUringSocketChannel; +import io.netty.channel.MultiThreadIoEventLoopGroup; +import io.netty.channel.uring.IoUring; +import io.netty.channel.uring.IoUringIoHandler; +import io.netty.channel.uring.IoUringSocketChannel; import java.util.concurrent.ThreadFactory; -class IoUringIncubatorTransportFactory implements TransportFactory { +class IoUringTransportFactory implements TransportFactory { static boolean isAvailable() { try { - Class.forName("io.netty.incubator.channel.uring.IOUring"); + Class.forName("io.netty.channel.uring.IoUring"); } catch (ClassNotFoundException e) { return false; } - return IOUring.isAvailable(); + return IoUring.isAvailable(); } @Override - public IOUringSocketChannel newChannel() { - return new IOUringSocketChannel(); + public IoUringSocketChannel newChannel() { + return new IoUringSocketChannel(); } @Override - public IOUringEventLoopGroup newEventLoopGroup(int ioThreadsCount, ThreadFactory threadFactory) { - return new IOUringEventLoopGroup(ioThreadsCount, threadFactory); + public MultiThreadIoEventLoopGroup newEventLoopGroup(int ioThreadsCount, ThreadFactory threadFactory) { + return new MultiThreadIoEventLoopGroup(ioThreadsCount, threadFactory, IoUringIoHandler.newFactory()); } } diff --git a/client/src/test/java/org/asynchttpclient/DefaultAsyncHttpClientTest.java b/client/src/test/java/org/asynchttpclient/DefaultAsyncHttpClientTest.java index fc7a1c2db..f2f89d3f9 100644 --- a/client/src/test/java/org/asynchttpclient/DefaultAsyncHttpClientTest.java +++ b/client/src/test/java/org/asynchttpclient/DefaultAsyncHttpClientTest.java @@ -16,9 +16,9 @@ package org.asynchttpclient; import io.github.artsok.RepeatedIfExceptionsTest; +import io.netty.channel.MultiThreadIoEventLoopGroup; import io.netty.channel.epoll.EpollEventLoopGroup; import io.netty.channel.kqueue.KQueueEventLoopGroup; -import io.netty.incubator.channel.uring.IOUringEventLoopGroup; import io.netty.util.Timer; import org.asynchttpclient.cookie.CookieEvictionTask; import org.asynchttpclient.cookie.CookieStore; @@ -61,7 +61,7 @@ public void testNativeTransportWithoutEpollOnly() throws Exception { AsyncHttpClientConfig config = config().setUseNativeTransport(true).setUseOnlyEpollNativeTransport(false).build(); try (DefaultAsyncHttpClient client = (DefaultAsyncHttpClient) asyncHttpClient(config)) { assertDoesNotThrow(() -> client.prepareGet("https://www.google.com").execute().get()); - assertInstanceOf(IOUringEventLoopGroup.class, client.channelManager().getEventLoopGroup()); + assertInstanceOf(MultiThreadIoEventLoopGroup.class, client.channelManager().getEventLoopGroup()); } } diff --git a/client/src/test/java/org/asynchttpclient/MultipleHeaderTest.java b/client/src/test/java/org/asynchttpclient/MultipleHeaderTest.java index cf6dbc353..6414f6e4f 100644 --- a/client/src/test/java/org/asynchttpclient/MultipleHeaderTest.java +++ b/client/src/test/java/org/asynchttpclient/MultipleHeaderTest.java @@ -16,6 +16,7 @@ import io.netty.handler.codec.http.HttpHeaders; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; import javax.net.ServerSocketFactory; import java.io.BufferedReader; @@ -39,6 +40,7 @@ /** * @author Hubert Iwaniuk */ +@Disabled("New Netty Release Prevent Invalid Line in HTTP Header") public class MultipleHeaderTest extends AbstractBasicTest { private static ExecutorService executorService; private static ServerSocket serverSocket; diff --git a/client/src/test/java/org/asynchttpclient/netty/NettyTest.java b/client/src/test/java/org/asynchttpclient/netty/NettyTest.java index f80c0911e..c7d7e1d1d 100644 --- a/client/src/test/java/org/asynchttpclient/netty/NettyTest.java +++ b/client/src/test/java/org/asynchttpclient/netty/NettyTest.java @@ -2,9 +2,9 @@ import io.netty.channel.epoll.Epoll; import io.netty.channel.kqueue.KQueue; +import io.netty.channel.uring.IoUring; import io.netty.handler.codec.compression.Brotli; import io.netty.handler.codec.compression.Zstd; -import io.netty.incubator.channel.uring.IOUring; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.EnabledOnOs; import org.junit.jupiter.api.condition.OS; @@ -21,7 +21,7 @@ public void epollIsAvailableOnLinux() { @Test @EnabledOnOs(OS.LINUX) public void ioUringIsAvailableOnLinux() { - assertTrue(IOUring.isAvailable()); + assertTrue(IoUring.isAvailable()); } @Test diff --git a/client/src/test/resources/logback-test.xml b/client/src/test/resources/logback-test.xml index 4b6a08791..f9d903997 100644 --- a/client/src/test/resources/logback-test.xml +++ b/client/src/test/resources/logback-test.xml @@ -7,6 +7,7 @@ + diff --git a/pom.xml b/pom.xml index 252230a42..e2a3f7854 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ 11 UTF-8 - 4.1.119.Final + 4.2.5.Final 0.0.26.Final 1.18.0 2.0.16 @@ -206,17 +206,17 @@ - io.netty.incubator - netty-incubator-transport-native-io_uring - ${netty.iouring} + io.netty + netty-transport-native-io_uring + ${netty.version} linux-x86_64 true - io.netty.incubator - netty-incubator-transport-native-io_uring - ${netty.iouring} + io.netty + netty-transport-native-io_uring + ${netty.version} linux-aarch_64 true From e96ceb951fcdbe528fe6c137c831adb7808829f4 Mon Sep 17 00:00:00 2001 From: Aayush Atharva Date: Mon, 8 Sep 2025 01:05:26 +0530 Subject: [PATCH 161/167] Release v3.0.3 (#2113) --- .github/workflows/release.yml | 2 +- README.md | 4 ++-- client/pom.xml | 2 +- .../org/asynchttpclient/AsyncHttpClientConfig.java | 5 ++++- pom.xml | 13 +++++-------- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b175fa865..059d1640f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,7 +31,7 @@ jobs: with: servers: | [{ - "id": "ossrh", + "id": "central", "username": "${{ secrets.OSSRH_USERNAME }}", "password": "${{ secrets.OSSRH_PASSWORD }}" }] diff --git a/README.md b/README.md index 0272134ed..61621a682 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Maven: org.asynchttpclient async-http-client - 3.0.2 + 3.0.3 ``` @@ -28,7 +28,7 @@ Maven: Gradle: ```groovy dependencies { - implementation 'org.asynchttpclient:async-http-client:3.0.2' + implementation 'org.asynchttpclient:async-http-client:3.0.3' } ``` diff --git a/client/pom.xml b/client/pom.xml index 9c0cefee3..019e294c0 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -19,7 +19,7 @@ org.asynchttpclient async-http-client-project - 3.0.2 + 3.0.3 4.0.0 diff --git a/client/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java b/client/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java index 954628b3d..216dc4ed6 100644 --- a/client/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java +++ b/client/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java @@ -380,7 +380,10 @@ public interface AsyncHttpClientConfig { * * @return true if the Authorization header should be stripped, false otherwise. */ - boolean isStripAuthorizationOnRedirect(); + default boolean isStripAuthorizationOnRedirect() { + // By default, we throw, so that existing implementations don't break. + throw new UnsupportedOperationException("IsStripAuthorizationOnRedirect is not supported by " + getClass().getName()); + } enum ResponseBodyPartFactory { diff --git a/pom.xml b/pom.xml index e2a3f7854..22b72aa2c 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ org.asynchttpclient async-http-client-project - 3.0.2 + 3.0.3 pom AHC/Project @@ -394,15 +394,12 @@
- org.sonatype.plugins - nexus-staging-maven-plugin - 1.7.0 + org.sonatype.central + central-publishing-maven-plugin + 0.8.0 true - ossrh - https://oss.sonatype.org/ - false - false + central From 4fadd37d9815a8e9cdff980a80b8922ebf6821e4 Mon Sep 17 00:00:00 2001 From: Aayush Atharva Date: Sat, 13 Sep 2025 04:06:25 +0530 Subject: [PATCH 162/167] Fix SOCKS proxy SSL handler issue - resolve NoSuchElementException when using HTTPS with SOCKS4/SOCKS5 (#2114) Motivation: SOCKS proxy support for HTTPS requests was broken when adding the SSL handler after the SOCKS handler. Modification: Fixed Netty pipeline logic to prevent `NoSuchElementException` when adding SSL handler after SOCKS handler, restoring HTTPS support for SOCKS4/SOCKS5 proxies. Fixes: #1913 --- .../netty/channel/ChannelManager.java | 5 +- .../asynchttpclient/proxy/SocksProxyTest.java | 252 ++++++++++++++++++ ...cksProxyTestcontainersIntegrationTest.java | 223 ++++++++++++++++ client/src/test/resources/dante/Dockerfile | 19 ++ client/src/test/resources/dante/sockd.conf | 23 ++ 5 files changed, 520 insertions(+), 2 deletions(-) create mode 100644 client/src/test/java/org/asynchttpclient/proxy/SocksProxyTest.java create mode 100644 client/src/test/java/org/asynchttpclient/proxy/SocksProxyTestcontainersIntegrationTest.java create mode 100644 client/src/test/resources/dante/Dockerfile create mode 100644 client/src/test/resources/dante/sockd.conf diff --git a/client/src/main/java/org/asynchttpclient/netty/channel/ChannelManager.java b/client/src/main/java/org/asynchttpclient/netty/channel/ChannelManager.java index e9f4d111e..8d13361ae 100755 --- a/client/src/main/java/org/asynchttpclient/netty/channel/ChannelManager.java +++ b/client/src/main/java/org/asynchttpclient/netty/channel/ChannelManager.java @@ -485,7 +485,8 @@ public SslHandler addSslHandler(ChannelPipeline pipeline, Uri uri, String virtua } SslHandler sslHandler = createSslHandler(peerHost, peerPort); - if (hasSocksProxyHandler) { + // Check if SOCKS handler actually exists in the pipeline before trying to add after it + if (hasSocksProxyHandler && pipeline.get(SOCKS_HANDLER) != null) { pipeline.addAfter(SOCKS_HANDLER, SSL_HANDLER, sslHandler); } else { pipeline.addFirst(SSL_HANDLER, sslHandler); @@ -614,4 +615,4 @@ public ClientStats getClientStats() { public boolean isOpen() { return channelPool.isOpen(); } -} +} \ No newline at end of file diff --git a/client/src/test/java/org/asynchttpclient/proxy/SocksProxyTest.java b/client/src/test/java/org/asynchttpclient/proxy/SocksProxyTest.java new file mode 100644 index 000000000..e1870721a --- /dev/null +++ b/client/src/test/java/org/asynchttpclient/proxy/SocksProxyTest.java @@ -0,0 +1,252 @@ +/* + * Copyright (c) 2024 AsyncHttpClient Project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.asynchttpclient.proxy; + +import io.github.artsok.RepeatedIfExceptionsTest; +import org.asynchttpclient.AbstractBasicTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.Response; +import org.asynchttpclient.testserver.SocksProxy; +import org.eclipse.jetty.server.handler.AbstractHandler; +import org.junit.jupiter.api.Test; + +import java.time.Duration; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; + +import static org.asynchttpclient.Dsl.asyncHttpClient; +import static org.asynchttpclient.Dsl.config; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +/** + * Tests for SOCKS proxy support with both HTTP and HTTPS. + */ +public class SocksProxyTest extends AbstractBasicTest { + + @Override + public AbstractHandler configureHandler() throws Exception { + return new ProxyTest.ProxyHandler(); + } + + @RepeatedIfExceptionsTest(repeats = 5) + public void testSocks4ProxyWithHttp() throws Exception { + // Start SOCKS proxy in background thread + Thread socksProxyThread = new Thread(() -> { + try { + new SocksProxy(60000); + } catch (Exception e) { + logger.error("Failed to establish SocksProxy", e); + } + }); + socksProxyThread.start(); + + // Give the proxy time to start + Thread.sleep(1000); + + try (AsyncHttpClient client = asyncHttpClient()) { + String target = "http://localhost:" + port1 + '/'; + Future f = client.prepareGet(target) + .setProxyServer(new ProxyServer.Builder("localhost", 8000).setProxyType(ProxyType.SOCKS_V4)) + .execute(); + + Response response = f.get(60, TimeUnit.SECONDS); + assertNotNull(response); + assertEquals(200, response.getStatusCode()); + } + } + + @RepeatedIfExceptionsTest(repeats = 5) + public void testSocks5ProxyWithHttp() throws Exception { + // Start SOCKS proxy in background thread + Thread socksProxyThread = new Thread(() -> { + try { + new SocksProxy(60000); + } catch (Exception e) { + logger.error("Failed to establish SocksProxy", e); + } + }); + socksProxyThread.start(); + + // Give the proxy time to start + Thread.sleep(1000); + + try (AsyncHttpClient client = asyncHttpClient()) { + String target = "http://localhost:" + port1 + '/'; + Future f = client.prepareGet(target) + .setProxyServer(new ProxyServer.Builder("localhost", 8000).setProxyType(ProxyType.SOCKS_V5)) + .execute(); + + Response response = f.get(60, TimeUnit.SECONDS); + assertNotNull(response); + assertEquals(200, response.getStatusCode()); + } + } + + @Test + public void testSocks5ProxyWithHttpsDoesNotThrowException() throws Exception { + // This test specifically verifies that HTTPS requests through SOCKS5 proxy + // do not throw NoSuchElementException: socks anymore + + // Start SOCKS proxy in background thread + Thread socksProxyThread = new Thread(() -> { + try { + new SocksProxy(10000); // shorter time for test + } catch (Exception e) { + logger.error("Failed to establish SocksProxy", e); + } + }); + socksProxyThread.start(); + + // Give the proxy time to start + Thread.sleep(1000); + + try (AsyncHttpClient client = asyncHttpClient(config() + .setProxyServer(new ProxyServer.Builder("localhost", 8000).setProxyType(ProxyType.SOCKS_V5)) + .setConnectTimeout(Duration.ofMillis(5000)) + .setRequestTimeout(Duration.ofMillis(10000)))) { + + // This would previously throw: java.util.NoSuchElementException: socks + // We expect this to fail with connection timeout (since we don't have a real HTTPS target) + // but NOT with NoSuchElementException + + try { + Future f = client.prepareGet("https://httpbin.org/get").execute(); + f.get(8, TimeUnit.SECONDS); + // If we reach here, great! The SOCKS proxy worked + } catch (Exception e) { + // We should NOT see NoSuchElementException: socks anymore + String message = e.getMessage(); + if (message != null && message.contains("socks") && message.contains("NoSuchElementException")) { + throw new AssertionError("NoSuchElementException: socks still occurs", e); + } + // Other exceptions like connection timeout are expected since we don't have a real working SOCKS proxy setup + logger.info("Expected exception (not the SOCKS handler bug): " + e.getClass().getSimpleName() + ": " + message); + } + } + } + + @Test + public void testSocks4ProxyWithHttpsDoesNotThrowException() throws Exception { + // This test specifically verifies that HTTPS requests through SOCKS4 proxy + // do not throw NoSuchElementException: socks anymore + + // Start SOCKS proxy in background thread + Thread socksProxyThread = new Thread(() -> { + try { + new SocksProxy(10000); // shorter time for test + } catch (Exception e) { + logger.error("Failed to establish SocksProxy", e); + } + }); + socksProxyThread.start(); + + // Give the proxy time to start + Thread.sleep(1000); + + try (AsyncHttpClient client = asyncHttpClient(config() + .setProxyServer(new ProxyServer.Builder("localhost", 8000).setProxyType(ProxyType.SOCKS_V4)) + .setConnectTimeout(Duration.ofMillis(5000)) + .setRequestTimeout(Duration.ofMillis(10000)))) { + + // This would previously throw: java.util.NoSuchElementException: socks + // We expect this to fail with connection timeout (since we don't have a real HTTPS target) + // but NOT with NoSuchElementException + + try { + Future f = client.prepareGet("https://httpbin.org/get").execute(); + f.get(8, TimeUnit.SECONDS); + // If we reach here, great! The SOCKS proxy worked + } catch (Exception e) { + // We should NOT see NoSuchElementException: socks anymore + String message = e.getMessage(); + if (message != null && message.contains("socks") && message.contains("NoSuchElementException")) { + throw new AssertionError("NoSuchElementException: socks still occurs", e); + } + // Other exceptions like connection timeout are expected since we don't have a real working SOCKS proxy setup + logger.info("Expected exception (not the SOCKS handler bug): " + e.getClass().getSimpleName() + ": " + message); + } + } + } + + @Test + public void testIssue1913NoSuchElementExceptionSocks5() throws Exception { + // Reproduces the exact issue from GitHub issue #1913 with SOCKS5 + // This uses the exact code pattern from the issue report + var proxyServer = new ProxyServer.Builder("127.0.0.1", 1081) + .setProxyType(ProxyType.SOCKS_V5); + + try (var client = asyncHttpClient(config() + .setProxyServer(proxyServer.build()) + .setConnectTimeout(Duration.ofMillis(2000)) + .setRequestTimeout(Duration.ofMillis(5000)))) { + + // This would previously throw: java.util.NoSuchElementException: socks + // We expect this to fail with connection timeout (since proxy doesn't exist) + // but NOT with NoSuchElementException + + try { + var response = client.prepareGet("https://cloudflare.com/cdn-cgi/trace").execute().get(); + // If we reach here, great! The fix worked and proxy connection succeeded + logger.info("Connection successful: " + response.getStatusCode()); + } catch (Exception e) { + // Check that we don't get the NoSuchElementException: socks anymore + Throwable cause = e.getCause(); + String message = cause != null ? cause.getMessage() : e.getMessage(); + + // This should NOT contain the original error + if (message != null && message.contains("socks") && + (e.toString().contains("NoSuchElementException") || cause != null && cause.toString().contains("NoSuchElementException"))) { + throw new AssertionError("NoSuchElementException: socks still occurs - fix didn't work: " + e.toString()); + } + + // Other exceptions like connection timeout are expected since we don't have a working SOCKS proxy + logger.info("Expected exception (not the SOCKS handler bug): " + e.getClass().getSimpleName() + ": " + message); + } + } + } + + @Test + public void testIssue1913NoSuchElementExceptionSocks4() throws Exception { + // Reproduces the exact issue from GitHub issue #1913 with SOCKS4 + // This uses the exact code pattern from the issue report + var proxyServer = new ProxyServer.Builder("127.0.0.1", 1081) + .setProxyType(ProxyType.SOCKS_V4); + + try (var client = asyncHttpClient(config() + .setProxyServer(proxyServer.build()) + .setConnectTimeout(Duration.ofMillis(2000)) + .setRequestTimeout(Duration.ofMillis(5000)))) { + + try { + var response = client.prepareGet("https://cloudflare.com/cdn-cgi/trace").execute().get(); + logger.info("Connection successful: " + response.getStatusCode()); + } catch (Exception e) { + // Check that we don't get the NoSuchElementException: socks anymore + Throwable cause = e.getCause(); + String message = cause != null ? cause.getMessage() : e.getMessage(); + + if (message != null && message.contains("socks") && + (e.toString().contains("NoSuchElementException") || cause != null && cause.toString().contains("NoSuchElementException"))) { + throw new AssertionError("NoSuchElementException: socks still occurs - fix didn't work: " + e.toString()); + } + + logger.info("Expected exception (not the SOCKS handler bug): " + e.getClass().getSimpleName() + ": " + message); + } + } + } +} diff --git a/client/src/test/java/org/asynchttpclient/proxy/SocksProxyTestcontainersIntegrationTest.java b/client/src/test/java/org/asynchttpclient/proxy/SocksProxyTestcontainersIntegrationTest.java new file mode 100644 index 000000000..4308f388e --- /dev/null +++ b/client/src/test/java/org/asynchttpclient/proxy/SocksProxyTestcontainersIntegrationTest.java @@ -0,0 +1,223 @@ +/* + * Copyright (c) 2025 AsyncHttpClient Project. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.asynchttpclient.proxy; + +import io.github.artsok.RepeatedIfExceptionsTest; +import org.asynchttpclient.AsyncHttpClient; +import org.asynchttpclient.AsyncHttpClientConfig; +import org.asynchttpclient.Response; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.testcontainers.DockerClientFactory; +import org.testcontainers.containers.GenericContainer; +import org.testcontainers.containers.output.Slf4jLogConsumer; +import org.testcontainers.containers.wait.strategy.Wait; +import org.testcontainers.images.builder.ImageFromDockerfile; +import org.testcontainers.junit.jupiter.Testcontainers; + +import java.nio.file.Path; +import java.time.Duration; +import java.util.concurrent.TimeUnit; + +import static org.asynchttpclient.Dsl.asyncHttpClient; +import static org.asynchttpclient.Dsl.config; +import static org.asynchttpclient.Dsl.get; +import static org.asynchttpclient.Dsl.proxyServer; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assumptions.assumeTrue; + +/** + * Integration tests for SOCKS proxy support using Dante SOCKS server in TestContainers. + * This validates the fix for GitHub issue #1913. + */ +@Testcontainers +public class SocksProxyTestcontainersIntegrationTest { + + private static final Logger LOGGER = LoggerFactory.getLogger(SocksProxyTestcontainersIntegrationTest.class); + + private static final int SOCKS_PORT = 1080; + + private static final String TARGET_HTTP_URL = "http://httpbin.org/get"; + private static final String TARGET_HTTPS_URL = "https://www.example.com/"; + + private static boolean dockerAvailable = false; + private static GenericContainer socksProxy; + + @BeforeAll + static void checkDockerAvailability() { + try { + dockerAvailable = DockerClientFactory.instance().isDockerAvailable(); + LOGGER.info("Docker availability check: {}", dockerAvailable); + } catch (Exception e) { + LOGGER.warn("Failed to check Docker availability: {}", e.getMessage()); + dockerAvailable = false; + } + // Skip tests if Docker not available, unless force-enabled + if (!dockerAvailable && !"true".equals(System.getProperty("docker.tests"))) { + LOGGER.info("Docker is not available - skipping integration tests. Use -Ddocker.tests=true to force run."); + return; // Don't start container if Docker not available + } + // Allow force-disabling Docker tests + if ("true".equals(System.getProperty("no.docker.tests"))) { + LOGGER.info("Docker tests disabled via -Dno.docker.tests=true"); + return; + } + // Only start container if Docker is available + if (dockerAvailable) { + try { + socksProxy = new GenericContainer<>( + new ImageFromDockerfile() + .withFileFromPath("Dockerfile", Path.of("src/test/resources/dante/Dockerfile")) + .withFileFromPath("sockd.conf", Path.of("src/test/resources/dante/sockd.conf")) + ) + .withExposedPorts(SOCKS_PORT) + .withLogConsumer(new Slf4jLogConsumer(LOGGER).withPrefix("DANTE")) + .waitingFor(Wait.forLogMessage(".*sockd.*", 1) + .withStartupTimeout(Duration.ofMinutes(2))); + socksProxy.start(); + LOGGER.info("Dante SOCKS proxy started successfully on port {}", socksProxy.getMappedPort(SOCKS_PORT)); + } catch (Exception e) { + LOGGER.warn("Failed to start Dante SOCKS proxy container: {}", e.getMessage()); + dockerAvailable = false; // Mark as unavailable if container start fails + } + } + } + + @AfterAll + static void stopContainer() { + if (socksProxy != null && socksProxy.isRunning()) { + socksProxy.stop(); + } + } + + @RepeatedIfExceptionsTest(repeats = 3) + public void testSocks4ProxyToHttpTarget() throws Exception { + assumeTrue(dockerAvailable, "Docker is not available - skipping test"); + LOGGER.info("Testing SOCKS4 proxy to HTTP target"); + AsyncHttpClientConfig config = config() + .setProxyServer(proxyServer("localhost", socksProxy.getMappedPort(SOCKS_PORT)) + .setProxyType(ProxyType.SOCKS_V4) + .build()) + .setConnectTimeout(Duration.ofMillis(10000)) + .setRequestTimeout(Duration.ofMillis(30000)) + .build(); + try (AsyncHttpClient client = asyncHttpClient(config)) { + Response response = client.executeRequest(get(TARGET_HTTP_URL)).get(30, TimeUnit.SECONDS); + assertEquals(200, response.getStatusCode()); + assertTrue(response.getResponseBody().contains("httpbin")); + LOGGER.info("SOCKS4 proxy to HTTP target test passed"); + } + } + + @RepeatedIfExceptionsTest(repeats = 3) + public void testSocks5ProxyToHttpTarget() throws Exception { + assumeTrue(dockerAvailable, "Docker is not available - skipping test"); + LOGGER.info("Testing SOCKS5 proxy to HTTP target"); + AsyncHttpClientConfig config = config() + .setProxyServer(proxyServer("localhost", socksProxy.getMappedPort(SOCKS_PORT)) + .setProxyType(ProxyType.SOCKS_V5) + .build()) + .setConnectTimeout(Duration.ofMillis(10000)) + .setRequestTimeout(Duration.ofMillis(30000)) + .build(); + try (AsyncHttpClient client = asyncHttpClient(config)) { + Response response = client.executeRequest(get(TARGET_HTTP_URL)).get(30, TimeUnit.SECONDS); + assertEquals(200, response.getStatusCode()); + assertTrue(response.getResponseBody().contains("httpbin")); + LOGGER.info("SOCKS5 proxy to HTTP target test passed"); + } + } + + @RepeatedIfExceptionsTest(repeats = 3) + public void testSocks4ProxyToHttpsTarget() throws Exception { + assumeTrue(dockerAvailable, "Docker is not available - skipping test"); + LOGGER.info("Testing SOCKS4 proxy to HTTPS target - validates issue #1913 fix"); + AsyncHttpClientConfig config = config() + .setProxyServer(proxyServer("localhost", socksProxy.getMappedPort(SOCKS_PORT)) + .setProxyType(ProxyType.SOCKS_V4) + .build()) + .setUseInsecureTrustManager(true) + .setConnectTimeout(Duration.ofMillis(10000)) + .setRequestTimeout(Duration.ofMillis(30000)) + .build(); + try (AsyncHttpClient client = asyncHttpClient(config)) { + Response response = client.executeRequest(get(TARGET_HTTPS_URL)).get(30, TimeUnit.SECONDS); + assertEquals(200, response.getStatusCode()); + assertTrue(response.getResponseBody().contains("Example Domain") || + response.getResponseBody().contains("example")); + LOGGER.info("SOCKS4 proxy to HTTPS target test passed - issue #1913 RESOLVED!"); + } + } + + @RepeatedIfExceptionsTest(repeats = 3) + public void testSocks5ProxyToHttpsTarget() throws Exception { + assumeTrue(dockerAvailable, "Docker is not available - skipping test"); + LOGGER.info("Testing SOCKS5 proxy to HTTPS target - validates issue #1913 fix"); + AsyncHttpClientConfig config = config() + .setProxyServer(proxyServer("localhost", socksProxy.getMappedPort(SOCKS_PORT)) + .setProxyType(ProxyType.SOCKS_V5) + .build()) + .setUseInsecureTrustManager(true) + .setConnectTimeout(Duration.ofMillis(10000)) + .setRequestTimeout(Duration.ofMillis(30000)) + .build(); + try (AsyncHttpClient client = asyncHttpClient(config)) { + Response response = client.executeRequest(get(TARGET_HTTPS_URL)).get(30, TimeUnit.SECONDS); + assertEquals(200, response.getStatusCode()); + assertTrue(response.getResponseBody().contains("Example Domain") || + response.getResponseBody().contains("example")); + LOGGER.info("SOCKS5 proxy to HTTPS target test passed - issue #1913 RESOLVED!"); + } + } + + @RepeatedIfExceptionsTest(repeats = 3) + public void testIssue1913ReproductionWithRealProxy() throws Exception { + assumeTrue(dockerAvailable, "Docker is not available - skipping test"); + LOGGER.info("Testing exact issue #1913 reproduction with real SOCKS proxy"); + + // This reproduces the exact scenario from the GitHub issue but with a real working proxy + var proxyServer = proxyServer("localhost", socksProxy.getMappedPort(SOCKS_PORT)) + .setProxyType(ProxyType.SOCKS_V5); + + try (var client = asyncHttpClient(config() + .setProxyServer(proxyServer) + .setUseInsecureTrustManager(true) + .setConnectTimeout(Duration.ofMillis(10000)) + .setRequestTimeout(Duration.ofMillis(30000)))) { + + // This would previously throw: java.util.NoSuchElementException: socks + var response = client.prepareGet("https://www.example.com/").execute().get(30, TimeUnit.SECONDS); + assertEquals(200, response.getStatusCode()); + assertTrue(response.getResponseBody().contains("Example Domain") || + response.getResponseBody().contains("example")); + LOGGER.info("Issue #1913 reproduction test PASSED - NoSuchElementException: socks is FIXED!"); + } + } + + @Test + public void testDockerInfrastructureReady() { + assumeTrue(dockerAvailable, "Docker is not available - skipping test"); + LOGGER.info("Docker infrastructure test - validating Dante SOCKS container is ready"); + LOGGER.info("Dante SOCKS proxy available at: localhost:{}", socksProxy.getMappedPort(SOCKS_PORT)); + assertTrue(socksProxy.isRunning(), "Dante SOCKS container should be running"); + assertTrue(socksProxy.getMappedPort(SOCKS_PORT) > 0, "SOCKS port should be mapped"); + LOGGER.info("Dante SOCKS infrastructure is ready and accessible"); + } +} diff --git a/client/src/test/resources/dante/Dockerfile b/client/src/test/resources/dante/Dockerfile new file mode 100644 index 000000000..a98658439 --- /dev/null +++ b/client/src/test/resources/dante/Dockerfile @@ -0,0 +1,19 @@ +FROM ubuntu:22.04 + +# Install Dante SOCKS server +RUN apt-get update && \ + apt-get install -y dante-server && \ + rm -rf /var/lib/apt/lists/* + +# Copy dante configuration +COPY sockd.conf /etc/sockd.conf + +# Create run directory +RUN mkdir -p /var/run/sockd && \ + chmod 755 /var/run/sockd + +# Expose SOCKS port +EXPOSE 1080 + +# Run dante server (sockd binary is in /usr/sbin) +CMD ["/usr/sbin/sockd", "-f", "/etc/sockd.conf", "-D"] diff --git a/client/src/test/resources/dante/sockd.conf b/client/src/test/resources/dante/sockd.conf new file mode 100644 index 000000000..e4f7ed0fd --- /dev/null +++ b/client/src/test/resources/dante/sockd.conf @@ -0,0 +1,23 @@ +# Basic SOCKS proxy configuration for testing +# Allow all connections and methods for testing purposes + +# Server configuration - listen on all interfaces +internal: 0.0.0.0 port = 1080 +external: eth0 + +# Authentication method - no authentication for testing +socksmethod: none + +# Clients allowed to connect (all for testing) +client pass { + from: 0.0.0.0/0 to: 0.0.0.0/0 + log: error +} + +# Rules for SOCKS requests +socks pass { + from: 0.0.0.0/0 to: 0.0.0.0/0 + protocol: tcp udp + method: none + log: error +} From ecb80f8b60863133ec11fbe8d0f6b3f1aabdfca1 Mon Sep 17 00:00:00 2001 From: sullis Date: Mon, 22 Sep 2025 09:05:12 -0700 Subject: [PATCH 163/167] remove unused maven property (#2115) remove unused property: netty.iouring --- pom.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/pom.xml b/pom.xml index 22b72aa2c..e8b98d86f 100644 --- a/pom.xml +++ b/pom.xml @@ -46,7 +46,6 @@ UTF-8 4.2.5.Final - 0.0.26.Final 1.18.0 2.0.16 1.5.7-2 From 9790ec57576060e26a23861d9bc28085efdd42f6 Mon Sep 17 00:00:00 2001 From: sullis Date: Sat, 4 Oct 2025 16:39:31 -0700 Subject: [PATCH 164/167] maven-compiler-plugin 3.14.1 (#2117) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e8b98d86f..3643a4a39 100644 --- a/pom.xml +++ b/pom.xml @@ -293,7 +293,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.14.0 + 3.14.1 11 11 From f41b26f7d4d9d17d5708bbfee561c5468a3fbcf5 Mon Sep 17 00:00:00 2001 From: sullis Date: Sun, 26 Oct 2025 02:06:54 -0700 Subject: [PATCH 165/167] upgrade testcontainers to v2 (#2119) Release Notes https://github.com/testcontainers/testcontainers-java/releases --- client/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/pom.xml b/client/pom.xml index 019e294c0..fb386eabf 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -198,7 +198,7 @@ org.testcontainers - junit-jupiter + testcontainers-junit-jupiter ${testcontainers.version} test diff --git a/pom.xml b/pom.xml index 3643a4a39..4a26e4e49 100644 --- a/pom.xml +++ b/pom.xml @@ -52,7 +52,7 @@ 2.0.1 1.5.18 26.0.2 - 1.20.4 + 2.0.1 From 43826107728bde0443202af2908a65fa3fa79473 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 31 Oct 2025 01:05:00 +0530 Subject: [PATCH 166/167] Bump org.apache.tomcat.embed:tomcat-embed-core from 10.1.44 to 10.1.47 in /client (#2120) Bumps org.apache.tomcat.embed:tomcat-embed-core from 10.1.44 to 10.1.47. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.apache.tomcat.embed:tomcat-embed-core&package-manager=maven&previous-version=10.1.44&new-version=10.1.47)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/AsyncHttpClient/async-http-client/network/alerts).
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- client/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/pom.xml b/client/pom.xml index fb386eabf..1c0e4c64b 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -31,7 +31,7 @@ org.asynchttpclient.client 11.0.24 - 10.1.44 + 10.1.47 2.18.0 4.11.0 3.0 From b7e0319466624f8cfcde6a36b2087daef0d7a63b Mon Sep 17 00:00:00 2001 From: Aayush Atharva Date: Sat, 15 Nov 2025 02:49:32 +0530 Subject: [PATCH 167/167] Release v3.0.4 (#2126) --- README.md | 4 ++-- client/pom.xml | 2 +- pom.xml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 61621a682..318d58da2 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Maven: org.asynchttpclient async-http-client - 3.0.3 + 3.0.4 ``` @@ -28,7 +28,7 @@ Maven: Gradle: ```groovy dependencies { - implementation 'org.asynchttpclient:async-http-client:3.0.3' + implementation 'org.asynchttpclient:async-http-client:3.0.4' } ``` diff --git a/client/pom.xml b/client/pom.xml index 1c0e4c64b..f3804ca3c 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -19,7 +19,7 @@ org.asynchttpclient async-http-client-project - 3.0.3 + 3.0.4 4.0.0 diff --git a/pom.xml b/pom.xml index 4a26e4e49..95d773f35 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ org.asynchttpclient async-http-client-project - 3.0.3 + 3.0.4 pom AHC/Project