diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2016-11-07 17:06:11 +0100 |
---|---|---|
committer | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2016-11-08 18:02:54 +0100 |
commit | 1fc2f5426e3be939b2e1489f2e7e3ae45454bfb7 (patch) | |
tree | bdddd60987f132f8c29920cb6096fad5b0396a2d /sonar-ws | |
parent | 043238f9893a740e9a700876b54268120a245b35 (diff) | |
download | sonarqube-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.java | 4 |
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; } |