From: Teryk Bellahsene Date: Fri, 27 Nov 2015 08:14:50 +0000 (+0100) Subject: Replace checkNotNull by requireNonNull in sonar-ws X-Git-Tag: 5.3-RC1~148 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6990f9043c712d601cea7d0875badc1e594e7c85;p=sonarqube.git Replace checkNotNull by requireNonNull in sonar-ws --- diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/WsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/WsRequest.java index 8fe8f9941fa..9e4a91f13c4 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/WsRequest.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/WsRequest.java @@ -24,7 +24,7 @@ import java.util.HashMap; import java.util.Map; import javax.annotation.Nullable; -import static com.google.common.base.Preconditions.checkNotNull; +import static java.util.Objects.requireNonNull; import static org.sonarqube.ws.client.WsRequest.Method.GET; import static org.sonarqube.ws.client.WsRequest.Method.POST; @@ -62,13 +62,13 @@ public class WsRequest { } public WsRequest setMediaType(MediaType type) { - checkNotNull(type); + requireNonNull(type); this.mimeType = type; return this; } public WsRequest setParam(String key, @Nullable Object value) { - checkNotNull(key, "a WS parameter key cannot be null"); + requireNonNull(key, "a WS parameter key cannot be null"); if (value != null) { this.params.put(key, value); } else {