diff --git a/java-client/build.gradle.kts b/java-client/build.gradle.kts index 569dada74a..cfd9ad3a9d 100644 --- a/java-client/build.gradle.kts +++ b/java-client/build.gradle.kts @@ -80,7 +80,7 @@ java { registerFeature("awsSdk2Support") { usingSourceSet(sourceSets.get("main")) } - + toolchain { languageVersion = JavaLanguageVersion.of(runtimeJavaVersion.majorVersion) vendor = JvmVendorSpec.ADOPTIUM @@ -205,7 +205,6 @@ dependencies { // For AwsSdk2Transport "awsSdk2SupportCompileOnly"("software.amazon.awssdk","sdk-core","[2.15,3.0)") "awsSdk2SupportCompileOnly"("software.amazon.awssdk","auth","[2.15,3.0)") - "awsSdk2SupportCompileOnly"("io.netty","netty-handler","4.1.108.Final") testImplementation("software.amazon.awssdk","sdk-core","[2.15,3.0)") testImplementation("software.amazon.awssdk","auth","[2.15,3.0)") testImplementation("software.amazon.awssdk","aws-crt-client","[2.15,3.0)") @@ -373,17 +372,17 @@ if (runtimeJavaVersion >= JavaVersion.VERSION_11) { targetCompatibility = JavaVersion.VERSION_11.toString() sourceCompatibility = JavaVersion.VERSION_11.toString() } - + tasks.named("compileTestJava") { targetCompatibility = JavaVersion.VERSION_11.toString() sourceCompatibility = JavaVersion.VERSION_11.toString() } - + tasks.named("integrationTest") { testClassesDirs += java11.output.classesDirs classpath = sourceSets["java11"].runtimeClasspath } - + tasks.named("unitTest") { testClassesDirs += java11.output.classesDirs classpath = sourceSets["java11"].runtimeClasspath diff --git a/java-client/src/main/java/org/opensearch/client/transport/aws/AwsSdk2Transport.java b/java-client/src/main/java/org/opensearch/client/transport/aws/AwsSdk2Transport.java index 2569335331..785bfef2a9 100644 --- a/java-client/src/main/java/org/opensearch/client/transport/aws/AwsSdk2Transport.java +++ b/java-client/src/main/java/org/opensearch/client/transport/aws/AwsSdk2Transport.java @@ -8,10 +8,6 @@ package org.opensearch.client.transport.aws; -import io.netty.channel.ChannelPipelineException; -import io.netty.channel.EventLoopException; -import io.netty.handler.timeout.ReadTimeoutException; -import io.netty.handler.timeout.WriteTimeoutException; import jakarta.json.JsonObject; import jakarta.json.stream.JsonParser; import java.io.ByteArrayInputStream; @@ -676,26 +672,6 @@ private static Exception extractAndWrapCause(Exception exception) { e.initCause(exception); return e; } - if (exception instanceof ReadTimeoutException) { - final ReadTimeoutException e = new ReadTimeoutException(exception.getMessage()); - e.initCause(exception); - return e; - } - if (exception instanceof WriteTimeoutException) { - final WriteTimeoutException e = new WriteTimeoutException(exception.getMessage()); - e.initCause(exception); - return e; - } - if (exception instanceof ChannelPipelineException) { - final ChannelPipelineException e = new ChannelPipelineException(exception.getMessage()); - e.initCause(exception); - return e; - } - if (exception instanceof EventLoopException) { - final EventLoopException e = new EventLoopException(exception.getMessage()); - e.initCause(exception); - return e; - } if (exception instanceof IOException) { return new IOException(exception.getMessage(), exception); }