Skip to content

Commit 9824022

Browse files
committed
De-dupe adding logic
1 parent 4714328 commit 9824022

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

modules/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureBlobStore.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -749,9 +749,7 @@ BlobStoreActionStats getEndpointStats() {
749749
}
750750

751751
BlobStoreActionStats addTo(BlobStoreActionStats other) {
752-
final long ops = Math.addExact(operations.sum(), other.operations());
753-
final long reqs = Math.addExact(requests.sum(), +other.requests());
754-
return new BlobStoreActionStats(ops, reqs);
752+
return new BlobStoreActionStats(operations.sum(), requests.sum()).add(other);
755753
}
756754
}
757755

0 commit comments

Comments
 (0)