Skip to content

Commit 75853a6

Browse files
committed
rollback of createAssembler changes
1 parent 639bfa9 commit 75853a6

File tree

1 file changed

+11
-6
lines changed
  • bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer

1 file changed

+11
-6
lines changed

bmc-objectstorage/bmc-objectstorage-extensions/src/main/java/com/oracle/bmc/objectstorage/transfer/UploadManager.java

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ public boolean shouldBeRetried(@NonNull BmcException e) {
9090
* @param uploadDetails The upload request.
9191
* @return The response.
9292
* @throws BmcException if the upload fails for any reason.
93-
* @throws IllegalArgumentException if UploadRequest
9493
*/
9594
public UploadResponse upload(UploadRequest uploadDetails) {
9695
if (MultipartUtils.shouldUseMultipart(
@@ -172,7 +171,8 @@ private UploadResponse multipartUpload(UploadRequest uploadRequest) {
172171
shutdownExecutor = true;
173172
}
174173

175-
MultipartObjectAssembler assembler = createAssembler(uploadRequest, executorServiceToUse);
174+
MultipartObjectAssembler assembler =
175+
createAssembler(request, uploadRequest, executorServiceToUse);
176176
MultipartManifest manifest = null;
177177
try {
178178
manifest =
@@ -265,10 +265,15 @@ private static RetryConfiguration getRetryToUse(RetryConfiguration ...configs) {
265265
}
266266

267267
@VisibleForTesting
268-
protected MultipartObjectAssembler createAssembler(UploadRequest uploadRequest, ExecutorService executorService) {
269-
270-
PutObjectRequest request = uploadRequest.putObjectRequest;
271-
RetryConfiguration retryToUse = getRetryToUse(request.getRetryConfiguration());
268+
protected MultipartObjectAssembler createAssembler(
269+
PutObjectRequest request,
270+
UploadRequest uploadRequest,
271+
ExecutorService executorService) {
272+
273+
// in case request != uploadRequest.putObjectRequest then choose the correct RetryConfiguration
274+
RetryConfiguration retryToUse = getRetryToUse(
275+
uploadRequest.putObjectRequest.getRetryConfiguration(),
276+
request.getRetryConfiguration());
272277

273278
return MultipartObjectAssembler.builder()
274279
.allowOverwrite(uploadRequest.allowOverwrite)

0 commit comments

Comments
 (0)