Skip to content

Commit 62f84d6

Browse files
committed
fix typo
1 parent 11c2192 commit 62f84d6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/impl/ErrorTranslation.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
import software.amazon.awssdk.awscore.exception.AwsServiceException;
2525
import software.amazon.awssdk.core.exception.SdkException;
26-
import software.amazon.encryption.s3.S3EncryptionClientException;
2726

2827
import org.apache.hadoop.classification.VisibleForTesting;
2928
import org.apache.hadoop.fs.s3a.HttpChannelEOFException;
@@ -71,6 +70,9 @@ public final class ErrorTranslation {
7170
private ErrorTranslation() {
7271
}
7372

73+
static final String ENCRYPTION_CLIENT_EXCEPTION =
74+
"software.amazon.encryption.s3.S3EncryptionClientException";
75+
7476
/**
7577
* Does this exception indicate that the AWS Bucket was unknown.
7678
* @param e exception.
@@ -161,7 +163,7 @@ public static IOException maybeExtractIOException(
161163
*/
162164
public static SdkException maybeExtractSdkException(SdkException exception) {
163165
SdkException extractedException = exception;
164-
if (exception instanceof S3EncryptionClientException
166+
if (exception.toString().contains(ENCRYPTION_CLIENT_EXCEPTION)
165167
&& exception.getCause() instanceof SdkException) {
166168
extractedException = (SdkException) exception.getCause();
167169
if (extractedException != null

0 commit comments

Comments
 (0)