Skip to content

Commit

Permalink
nevermind netty
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Parmet <[email protected]>
  • Loading branch information
andrewparmet committed May 30, 2024
1 parent 7c235b8 commit f7814cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 29 deletions.
9 changes: 4 additions & 5 deletions java-client/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ java {
registerFeature("awsSdk2Support") {
usingSourceSet(sourceSets.get("main"))
}

toolchain {
languageVersion = JavaLanguageVersion.of(runtimeJavaVersion.majorVersion)
vendor = JvmVendorSpec.ADOPTIUM
Expand Down Expand Up @@ -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)")
Expand Down Expand Up @@ -373,17 +372,17 @@ if (runtimeJavaVersion >= JavaVersion.VERSION_11) {
targetCompatibility = JavaVersion.VERSION_11.toString()
sourceCompatibility = JavaVersion.VERSION_11.toString()
}

tasks.named<JavaCompile>("compileTestJava") {
targetCompatibility = JavaVersion.VERSION_11.toString()
sourceCompatibility = JavaVersion.VERSION_11.toString()
}

tasks.named<Test>("integrationTest") {
testClassesDirs += java11.output.classesDirs
classpath = sourceSets["java11"].runtimeClasspath
}

tasks.named<Test>("unitTest") {
testClassesDirs += java11.output.classesDirs
classpath = sourceSets["java11"].runtimeClasspath
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit f7814cd

Please sign in to comment.