Skip to content

Commit 037d492

Browse files
committed
Apply suggestion
1 parent b883374 commit 037d492

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

core/src/main/java/com/scalar/db/storage/objectstorage/cloudstorage/CloudStorageWrapper.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,23 +41,15 @@ public CloudStorageWrapper(CloudStorageConfig config) {
4141
.build()
4242
.getService();
4343
bucket = config.getBucket();
44-
if (config.getParallelUploadBlockSizeInBytes().isPresent()) {
45-
parallelUploadBlockSizeInBytes = config.getParallelUploadBlockSizeInBytes().get();
46-
} else {
47-
parallelUploadBlockSizeInBytes = null;
48-
}
44+
parallelUploadBlockSizeInBytes = config.getParallelUploadBlockSizeInBytes().orElse(null);
4945
}
5046

5147
@VisibleForTesting
5248
@SuppressFBWarnings("EI_EXPOSE_REP2")
5349
public CloudStorageWrapper(CloudStorageConfig config, Storage storage) {
5450
this.storage = storage;
5551
this.bucket = config.getBucket();
56-
if (config.getParallelUploadBlockSizeInBytes().isPresent()) {
57-
parallelUploadBlockSizeInBytes = config.getParallelUploadBlockSizeInBytes().get();
58-
} else {
59-
parallelUploadBlockSizeInBytes = null;
60-
}
52+
parallelUploadBlockSizeInBytes = config.getParallelUploadBlockSizeInBytes().orElse(null);
6153
}
6254

6355
@Override

0 commit comments

Comments
 (0)