diff options
author | Jean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com> | 2014-03-19 15:18:17 +0100 |
---|---|---|
committer | Jean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com> | 2014-03-19 15:19:01 +0100 |
commit | d59f8f22f68f0e16f773cc670bfe1310c84fc6a1 (patch) | |
tree | e43d8de472f6cd0befc5d66d17af393e407473fa /sonar-batch | |
parent | 60055a4ddb1d506982b29e82c85477cd68413795 (diff) | |
download | sonarqube-d59f8f22f68f0e16f773cc670bfe1310c84fc6a1.tar.gz sonarqube-d59f8f22f68f0e16f773cc670bfe1310c84fc6a1.zip |
SONAR-5094 Be more specific on validation message
Diffstat (limited to 'sonar-batch')
-rw-r--r-- | sonar-batch/src/main/java/org/sonar/batch/qualitygate/ConditionUtils.java | 2 | ||||
-rw-r--r-- | sonar-batch/src/test/java/org/sonar/batch/qualitygate/ConditionUtilsTest.java | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/qualitygate/ConditionUtils.java b/sonar-batch/src/main/java/org/sonar/batch/qualitygate/ConditionUtils.java index 18494255960..95c10767ae5 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/qualitygate/ConditionUtils.java +++ b/sonar-batch/src/main/java/org/sonar/batch/qualitygate/ConditionUtils.java @@ -108,7 +108,7 @@ class ConditionUtils { throw new NotImplementedException(metric.getType().toString()); } } catch (NumberFormatException badValueFormat) { - throw new IllegalArgumentException(String.format("Unable to parse value '%s' to compare against %s", value, metric.getName())); + throw new IllegalArgumentException(String.format("Quality Gate: Unable to parse value '%s' to compare against %s", value, metric.getName())); } return valueToCompare; } diff --git a/sonar-batch/src/test/java/org/sonar/batch/qualitygate/ConditionUtilsTest.java b/sonar-batch/src/test/java/org/sonar/batch/qualitygate/ConditionUtilsTest.java index 6ea5bee366f..91f7a4fc72a 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/qualitygate/ConditionUtilsTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/qualitygate/ConditionUtilsTest.java @@ -237,7 +237,7 @@ public class ConditionUtilsTest { ConditionUtils.getLevel(condition, measure); fail(); } catch(Exception expected) { - assertThat(expected).isInstanceOf(IllegalArgumentException.class).hasMessage("Unable to parse value 'polop' to compare against name"); + assertThat(expected).isInstanceOf(IllegalArgumentException.class).hasMessage("Quality Gate: Unable to parse value 'polop' to compare against name"); } } @@ -256,7 +256,7 @@ public class ConditionUtilsTest { ConditionUtils.getLevel(condition, measure); fail(); } catch(Exception expected) { - assertThat(expected).isInstanceOf(IllegalArgumentException.class).hasMessage("Unable to parse value 'polop' to compare against name"); + assertThat(expected).isInstanceOf(IllegalArgumentException.class).hasMessage("Quality Gate: Unable to parse value 'polop' to compare against name"); } } |