From 6990f9043c712d601cea7d0875badc1e594e7c85 Mon Sep 17 00:00:00 2001 From: Teryk Bellahsene Date: Fri, 27 Nov 2015 09:14:50 +0100 Subject: [PATCH] Replace checkNotNull by requireNonNull in sonar-ws --- .../src/main/java/org/sonarqube/ws/client/WsRequest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 { -- 2.39.5