anuragmantri commented on code in PR #14161:
URL: https://github.com/apache/iceberg/pull/14161#discussion_r2453310223
##########
aws/src/main/java/org/apache/iceberg/aws/s3/PrefixedS3Client.java:
##########
@@ -50,12 +53,12 @@ class PrefixedS3Client implements AutoCloseable {
this.s3FileIOProperties = new S3FileIOProperties(properties);
// Do not override s3 client if it was provided
if (s3 == null) {
- Object clientFactory = S3FileIOAwsClientFactories.initialize(properties);
- if (clientFactory instanceof S3FileIOAwsClientFactory) {
- this.s3 = ((S3FileIOAwsClientFactory) clientFactory)::s3;
- }
- if (clientFactory instanceof AwsClientFactory) {
- this.s3 = ((AwsClientFactory) clientFactory)::s3;
+ Object factory = S3FileIOAwsClientFactories.initialize(properties);
+ if (factory instanceof S3FileIOAwsClientFactory) {
+ this.clientFactory = (S3FileIOAwsClientFactory) factory;
+ this.s3 = clientFactory::s3;
+ } else if (factory instanceof AwsClientFactory) {
+ this.s3 = ((AwsClientFactory) factory)::s3;
Review Comment:
I cleaned up this code a bit, I think originally the code was setting the s3
value to the same thing twice. I removed the redundancy.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]