private boolean bucketRegionShouldBeCached(Request<?> request) { return clientOptions.isForceGlobalBucketAccessEnabled() || noExplicitRegionProvided(request); }
private void validateRequestBeforeTransmit(Request<?> request) { boolean implicitCrossRegionForbidden = areImplicitGlobalClientsDisabled(); boolean explicitCrossRegionEnabled = clientOptions.isForceGlobalBucketAccessEnabled(); // The region must be set if implicit cross region clients are not allowed if (noExplicitRegionProvided(request) && implicitCrossRegionForbidden && !explicitCrossRegionEnabled) { String error = String.format("While the %s system property is enabled, Amazon S3 clients cannot be used without " + "first configuring a region or explicitly enabling global bucket access discovery " + "in the S3 client builder.", SDKGlobalConfiguration.DISABLE_S3_IMPLICIT_GLOBAL_CLIENTS_SYSTEM_PROPERTY); throw new IllegalStateException(error); } }
&& noExplicitRegionProvided(request)) { fetchRegionFromCache(bucket);
if ((signer instanceof AWSS3V4Signer) && noExplicitRegionProvided(request)) {
private boolean bucketRegionShouldBeCached(Request<?> request) { return clientOptions.isForceGlobalBucketAccessEnabled() || noExplicitRegionProvided(request); }
private void validateRequestBeforeTransmit(Request<?> request) { boolean implicitCrossRegionForbidden = areImplicitGlobalClientsDisabled(); boolean explicitCrossRegionEnabled = clientOptions.isForceGlobalBucketAccessEnabled(); // The region must be set if implicit cross region clients are not allowed if (noExplicitRegionProvided(request) && implicitCrossRegionForbidden && !explicitCrossRegionEnabled) { String error = String.format("While the %s system property is enabled, Amazon S3 clients cannot be used without " + "first configuring a region or explicitly enabling global bucket access discovery " + "in the S3 client builder.", SDKGlobalConfiguration.DISABLE_S3_IMPLICIT_GLOBAL_CLIENTS_SYSTEM_PROPERTY); throw new IllegalStateException(error); } }
&& noExplicitRegionProvided(request)) { fetchRegionFromCache(bucket);
if ((signer instanceof AWSS3V4Signer) && noExplicitRegionProvided(request)) {