[2.x] refactor: Remove redundant String.toString (#9592)

This commit is contained in:
kenji yoshida 2026-08-14 02:49:06 +09:00 committed by GitHub
parent d9f60b6cfd
commit a3dad963f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -289,7 +289,7 @@ private[sbt] class CachedResolutionResolveCache {
( (
surviving map moduleIdMap, surviving map moduleIdMap,
evicted map moduleIdMap map { evicted map moduleIdMap map {
_.withEvicted(true).withEvictedReason(Some(mgr.toString)) _.withEvicted(true).withEvictedReason(Some(mgr))
} }
) )
} }

View File

@ -33,14 +33,14 @@ class EventsTest extends AbstractServerTest {
val invalidID = svr.session.nextId() val invalidID = svr.session.nextId()
val cancelId = svr.session.nextId() val cancelId = svr.session.nextId()
svr.session svr.session
.sendJsonRpc(cancelId, "sbt/cancelRequest", CancelRequestParams(invalidID.toString)) .sendJsonRpc(cancelId, "sbt/cancelRequest", CancelRequestParams(invalidID))
.get .get
val response = svr.session.waitForResponseMsg(20.seconds, cancelId).get val response = svr.session.waitForResponseMsg(20.seconds, cancelId).get
assert(response.error.exists(_.code == -32800)) assert(response.error.exists(_.code == -32800))
// cancel the actual blockForever task so it doesn't block subsequent tests // cancel the actual blockForever task so it doesn't block subsequent tests
val cleanupId = svr.session.nextId() val cleanupId = svr.session.nextId()
svr.session.sendJsonRpc(cleanupId, "sbt/cancelRequest", CancelRequestParams(id.toString)).get svr.session.sendJsonRpc(cleanupId, "sbt/cancelRequest", CancelRequestParams(id)).get
svr.session.waitForResponseMsg(10.seconds, cleanupId).get svr.session.waitForResponseMsg(10.seconds, cleanupId).get
} }
@ -58,7 +58,7 @@ class EventsTest extends AbstractServerTest {
val cancelResult = svr.session val cancelResult = svr.session
.sendJsonRpcAwaitResult[ExecStatusEvent]( .sendJsonRpcAwaitResult[ExecStatusEvent](
"sbt/cancelRequest", "sbt/cancelRequest",
CancelRequestParams(id.toString), CancelRequestParams(id),
11.seconds 11.seconds
) )
.get .get