aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-ws
diff options
context:
space:
mode:
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>2016-11-07 17:06:11 +0100
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>2016-11-08 18:02:54 +0100
commit1fc2f5426e3be939b2e1489f2e7e3ae45454bfb7 (patch)
treebdddd60987f132f8c29920cb6096fad5b0396a2d /sonar-ws
parent043238f9893a740e9a700876b54268120a245b35 (diff)
downloadsonarqube-1fc2f5426e3be939b2e1489f2e7e3ae45454bfb7.tar.gz
sonarqube-1fc2f5426e3be939b2e1489f2e7e3ae45454bfb7.zip
SONAR-8172 fix support for empty parameter in WsClient's Request
Diffstat (limited to 'sonar-ws')
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/BaseRequest.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/BaseRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/BaseRequest.java
index 5357d581a7d..9f8acecc413 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/BaseRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/BaseRequest.java
@@ -153,7 +153,7 @@ abstract class BaseRequest<SELF extends BaseRequest> implements WsRequest {
private DefaultParameters setValue(String key, String value) {
checkArgument(!isNullOrEmpty(key));
- checkArgument(!isNullOrEmpty(value));
+ checkArgument(value != null);
keyValues.putAll(key, singletonList(value));
return this;
@@ -163,7 +163,7 @@ abstract class BaseRequest<SELF extends BaseRequest> implements WsRequest {
checkArgument(!isNullOrEmpty(key));
checkArgument(values != null && !values.isEmpty());
- this.keyValues.putAll(key, values.stream().map(Object::toString).collect(Collectors.toList()));
+ this.keyValues.putAll(key, values.stream().map(Object::toString).filter(Objects::nonNull).collect(Collectors.toList()));
return this;
}