Skip to content

Commit da3101a

Browse files
committed
Add Apache5, give highest priority
This commit updates `ClasspathSdkHttpServiceProvider` to give `Apache5HttpClient` the highest preference for sync HTTP clients. If `apache5-client` is on the classpath, Sync SDK clients not not explicitly configured with an HTTP client will use Apache 5.
1 parent 4420912 commit da3101a

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "feature",
3+
"category": "AWS SDK for Java v2",
4+
"contributor": "",
5+
"description": "Make `Apache5HttpClient` the preferred default HTTP client for sync SDK clients. This means that when `apache5-client` is on the classpath, and an HTTP client is *not* explicitly configured on client builder, the SDK client will use `Apache5HttpClient`."
6+
}

core/sdk-core/src/main/java/software/amazon/awssdk/core/internal/http/loader/ClasspathSdkHttpServiceProvider.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ final class ClasspathSdkHttpServiceProvider<T> implements SdkHttpServiceProvider
3838

3939
static final Map<String, Integer> SYNC_HTTP_SERVICES_PRIORITY =
4040
ImmutableMap.<String, Integer>builder()
41-
.put("software.amazon.awssdk.http.apache.ApacheSdkHttpService", 1)
42-
.put("software.amazon.awssdk.http.urlconnection.UrlConnectionSdkHttpService", 2)
43-
.put("software.amazon.awssdk.http.crt.AwsCrtSdkHttpService", 3)
41+
.put("software.amazon.awssdk.http.apache5.Apache5SdkHttpService", 1)
42+
.put("software.amazon.awssdk.http.apache.ApacheSdkHttpService", 2)
43+
.put("software.amazon.awssdk.http.urlconnection.UrlConnectionSdkHttpService", 3)
44+
.put("software.amazon.awssdk.http.crt.AwsCrtSdkHttpService", 4)
4445
.build();
4546

4647
static final Map<String, Integer> ASYNC_HTTP_SERVICES_PRIORITY =

0 commit comments

Comments
 (0)