aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2017-01-27 11:31:32 +0100
committerJulien Lancelot <julien.lancelot@sonarsource.com>2017-01-30 13:26:35 +0100
commit026111175ba6fd17945f0c86f7c6e907db2f32d4 (patch)
tree4c144ec5d61d90e84d4a210963c48947c17f28e5 /sonar-plugin-api/src
parent355b4aaa6a1d177f8c3209e95af203c0b46032fd (diff)
downloadsonarqube-026111175ba6fd17945f0c86f7c6e907db2f32d4.tar.gz
sonarqube-026111175ba6fd17945f0c86f7c6e907db2f32d4.zip
SONAR-7300 Display a proper message when id is missing
Diffstat (limited to 'sonar-plugin-api/src')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/server/ws/Request.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/server/ws/Request.java b/sonar-plugin-api/src/main/java/org/sonar/api/server/ws/Request.java
index 9296817a6b1..2bdb4e854c5 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/server/ws/Request.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/server/ws/Request.java
@@ -71,9 +71,7 @@ public abstract class Request {
*/
public String mandatoryParam(String key) {
String value = param(key);
- if (value == null) {
- throw new IllegalArgumentException(String.format(MSG_PARAMETER_MISSING, key));
- }
+ checkArgument(value != null, String.format(MSG_PARAMETER_MISSING, key));
return value;
}