diff options
-rw-r--r-- | sonar-core/src/main/java/org/sonar/core/qualitygate/db/QualityGateConditionDto.java | 1 | ||||
-rw-r--r-- | sonar-server/src/main/java/org/sonar/server/exceptions/BadRequestException.java | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/qualitygate/db/QualityGateConditionDto.java b/sonar-core/src/main/java/org/sonar/core/qualitygate/db/QualityGateConditionDto.java index 78180abc505..2654583fa0d 100644 --- a/sonar-core/src/main/java/org/sonar/core/qualitygate/db/QualityGateConditionDto.java +++ b/sonar-core/src/main/java/org/sonar/core/qualitygate/db/QualityGateConditionDto.java @@ -197,6 +197,7 @@ public class QualityGateConditionDto { case PERCENT: case MILLISEC: case RATING: + case WORK_DUR: operators = NUMERIC_OPERATORS; break; default: diff --git a/sonar-server/src/main/java/org/sonar/server/exceptions/BadRequestException.java b/sonar-server/src/main/java/org/sonar/server/exceptions/BadRequestException.java index 0f9240c93f0..95fd9656886 100644 --- a/sonar-server/src/main/java/org/sonar/server/exceptions/BadRequestException.java +++ b/sonar-server/src/main/java/org/sonar/server/exceptions/BadRequestException.java @@ -116,7 +116,11 @@ public class BadRequestException extends ServerException { @CheckForNull public Object[] l10nParams() { - return Arrays.copyOf(l10nParams, l10nParams.length); + if (l10nParams == null) { + return null; + } else { + return Arrays.copyOf(l10nParams, l10nParams.length); + } } @Override |