Skip to content

Commit d282d40

Browse files
sunyuhan1998tzolov
authored andcommitted
refactor: replace string concatenation with {} placeholders in log statements
Signed-off-by: Sun Yuhan <[email protected]>
1 parent dc477fc commit d282d40

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

mcp/src/main/java/io/modelcontextprotocol/client/transport/StdioClientTransport.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ private void startInboundProcessing() {
269269
}
270270
catch (Exception e) {
271271
if (!isClosing) {
272-
logger.error("Error processing inbound message for line: " + line, e);
272+
logger.error("Error processing inbound message for line: {}", line, e);
273273
}
274274
break;
275275
}
@@ -366,7 +366,7 @@ public Mono<Void> closeGracefully() {
366366
}
367367
})).doOnNext(process -> {
368368
if (process.exitValue() != 0) {
369-
logger.warn("Process terminated with code " + process.exitValue());
369+
logger.warn("Process terminated with code {}", process.exitValue());
370370
}
371371
else {
372372
logger.info("MCP server process stopped");

mcp/src/test/java/io/modelcontextprotocol/spec/McpClientSessionTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class McpClientSessionTests {
4747
void setUp() {
4848
transport = new MockMcpClientTransport();
4949
session = new McpClientSession(TIMEOUT, transport, Map.of(),
50-
Map.of(TEST_NOTIFICATION, params -> Mono.fromRunnable(() -> logger.info("Status update: " + params))));
50+
Map.of(TEST_NOTIFICATION, params -> Mono.fromRunnable(() -> logger.info("Status update: {}", params))));
5151
}
5252

5353
@AfterEach

0 commit comments

Comments
 (0)