Skip to content

Commit 26bd0ee

Browse files
authored
core: Use lazy message formatting in checkState (#12144)
1 parent 6f69363 commit 26bd0ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/java/io/grpc/internal/InternalSubchannel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ private void gotoState(final ConnectivityStateInfo newState) {
346346

347347
if (state.getState() != newState.getState()) {
348348
Preconditions.checkState(state.getState() != SHUTDOWN,
349-
"Cannot transition out of SHUTDOWN to " + newState);
349+
"Cannot transition out of SHUTDOWN to %s", newState.getState());
350350
if (reconnectDisabled && newState.getState() == TRANSIENT_FAILURE) {
351351
state = ConnectivityStateInfo.forNonError(IDLE);
352352
} else {

0 commit comments

Comments
 (0)