Skip to content

Commit e6d9f39

Browse files
committed
Remove unnecessary calls to String.format
1 parent 653d1bf commit e6d9f39

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

driver-core/src/main/com/mongodb/connection/BaseCluster.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public ClusterDescription getDescription() {
170170
if (!selectionFailureLogged) {
171171
if (LOGGER.isInfoEnabled()) {
172172
if (settings.getServerSelectionTimeout(MILLISECONDS) < 0) {
173-
LOGGER.info(format("Cluster description not yet available. Waiting indefinitely."));
173+
LOGGER.info("Cluster description not yet available. Waiting indefinitely.");
174174
} else {
175175
LOGGER.info(format("Cluster description not yet available. Waiting for %d ms before timing out",
176176
settings.getServerSelectionTimeout(MILLISECONDS)));
@@ -267,7 +267,7 @@ private boolean handleServerSelectionRequest(final ServerSelectionRequest reques
267267
request.phase = currentPhase;
268268
if (!description.isCompatibleWithDriver()) {
269269
if (LOGGER.isTraceEnabled()) {
270-
LOGGER.trace(String.format("Asynchronously failed server selection due to driver incompatibility with server"));
270+
LOGGER.trace("Asynchronously failed server selection due to driver incompatibility with server");
271271
}
272272
request.onResult(null, createIncompatibleException(description));
273273
return true;
@@ -288,7 +288,7 @@ private boolean handleServerSelectionRequest(final ServerSelectionRequest reques
288288

289289
if (request.timedOut()) {
290290
if (LOGGER.isTraceEnabled()) {
291-
LOGGER.trace(String.format("Asynchronously failed server selection after timeout"));
291+
LOGGER.trace("Asynchronously failed server selection after timeout");
292292
}
293293
request.onResult(null, createTimeoutException(request.originalSelector, description));
294294
return true;

0 commit comments

Comments
 (0)