add final String

pull/578/head
null 2023-10-17 05:51:22 +00:00
parent f576673dad
commit caf31d23db
1 changed files with 6 additions and 2 deletions

View File

@ -21,6 +21,10 @@ import org.eclipse.che.api.core.jsonrpc.commons.ResponseDispatcher;
import org.eclipse.che.api.core.websocket.commons.WebSocketMessageTransmitter; import org.eclipse.che.api.core.websocket.commons.WebSocketMessageTransmitter;
import org.slf4j.Logger; import org.slf4j.Logger;
private static final String endpointIdMustNotBeNull = "Endpoint ID must not be null"
private static final String endpointIdMustNotBeEmpty = "Endpoint ID must not be empty"
/** Endpoint ID configurator to defined endpoint id that the request should be addressed to. */ /** Endpoint ID configurator to defined endpoint id that the request should be addressed to. */
public class EndpointIdConfigurator { public class EndpointIdConfigurator {
private static final Logger LOGGER = getLogger(EndpointIdConfigurator.class); private static final Logger LOGGER = getLogger(EndpointIdConfigurator.class);
@ -40,8 +44,8 @@ public class EndpointIdConfigurator {
} }
public MethodNameConfigurator endpointId(String id) { public MethodNameConfigurator endpointId(String id) {
checkNotNull(id, "Endpoint ID must not be null"); checkNotNull(id, endpointIdMustNotBeNull);
checkArgument(!id.isEmpty(), "Endpoint ID must not be empty"); checkArgument(!id.isEmpty(), endpointIdMustNotBeEmpty);
LOGGER.debug("Configuring outgoing request endpoint ID: " + id); LOGGER.debug("Configuring outgoing request endpoint ID: " + id);