Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
kaijchen committed Feb 12, 2025
1 parent c386906 commit 5b6da3c
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,6 @@ private String constructEndpoint(Map<String, String> properties, S3URI s3uri) th
// get endpoint first from properties, if not present, get it from s3 uri.
// If endpoint is missing, exception will be thrown.
String endpoint = getOrDefaultAndRemove(properties, S3Properties.ENDPOINT, s3uri.getEndpoint().orElse(""));
if (Strings.isNullOrEmpty(endpoint)) {
throw new AnalysisException(String.format("Properties '%s' is required.", S3Properties.ENDPOINT));
}
if (AzureProperties.checkAzureProviderPropertyExist(properties)) {
String bucket = s3uri.getBucket();
String accountName = properties.getOrDefault(S3Properties.ACCESS_KEY, "");
Expand All @@ -135,6 +132,8 @@ private String constructEndpoint(Map<String, String> properties, S3URI s3uri) th
if (err != null) {
throw new AnalysisException(err);
}
} else if (Strings.isNullOrEmpty(endpoint)) {
throw new AnalysisException(String.format("Properties '%s' is required.", S3Properties.ENDPOINT));
}
return endpoint;
}
Expand Down

0 comments on commit 5b6da3c

Please sign in to comment.