Skip to content

Commit 27656b2

Browse files
committed
Use get instead of getOrDefault for metrics in repo integ test
We are now preinitializing the metric map rather than updating it lazily.
1 parent 2b93478 commit 27656b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/framework/src/main/java/org/elasticsearch/repositories/blobstore/ESMockAPIBasedRepositoryIntegTestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ synchronized Map<String, Long> getOperationsCount() {
375375
}
376376

377377
protected synchronized void trackRequest(final String requestType) {
378-
operationCount.put(requestType, operationCount.getOrDefault(requestType, 0L) + 1);
378+
operationCount.put(requestType, operationCount.get(requestType) + 1);
379379
}
380380

381381
@Override

0 commit comments

Comments
 (0)