diff options
author | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2016-09-13 18:49:54 +0200 |
---|---|---|
committer | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2016-09-14 11:25:23 +0200 |
commit | 4efca90c1cc21fae21724a2f2f6f2023b7d6cf94 (patch) | |
tree | 6f8bc18ddc92d204d100c48720c60e27d595a866 /sonar-plugin-api | |
parent | 84573fe972899ae762a7da262758c34ac7dc4f15 (diff) | |
download | sonarqube-4efca90c1cc21fae21724a2f2f6f2023b7d6cf94.tar.gz sonarqube-4efca90c1cc21fae21724a2f2f6f2023b7d6cf94.zip |
SONAR-8028 Use DateUtils.parseEndingDateOrDatetime to search background tasks and issues
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/utils/DateUtils.java | 4 | ||||
-rw-r--r-- | sonar-plugin-api/src/test/java/org/sonar/api/utils/DateUtilsTest.java | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/DateUtils.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/DateUtils.java index b3f1a36311d..ee54763a274 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/DateUtils.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/DateUtils.java @@ -161,7 +161,7 @@ public final class DateUtils { } date = parseDateQuietly(stringDate); - checkArgument(date != null, "'%s' cannot be parsed as either a date or date+time", stringDate); + checkArgument(date != null, "Date '%s' cannot be parsed as either a date or date+time", stringDate); return date; } @@ -194,7 +194,7 @@ public final class DateUtils { } date = parseDateQuietly(stringDate); - checkArgument(date != null, "'%s' cannot be parsed as either a date or date+time", stringDate); + checkArgument(date != null, "Date '%s' cannot be parsed as either a date or date+time", stringDate); return addDays(date, 1); } diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/DateUtilsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/DateUtilsTest.java index 94892baf665..b778b878af7 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/DateUtilsTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/DateUtilsTest.java @@ -173,7 +173,7 @@ public class DateUtilsTest { @Test public void fail_when_param_as_date_or_datetime_not_a_datetime() { expectedException.expect(IllegalArgumentException.class); - expectedException.expectMessage("'polop' cannot be parsed as either a date or date+time"); + expectedException.expectMessage("Date 'polop' cannot be parsed as either a date or date+time"); parseDateOrDateTime("polop"); } @@ -181,7 +181,7 @@ public class DateUtilsTest { @Test public void fail_when_param_as_starting_datetime_not_a_datetime() { expectedException.expect(IllegalArgumentException.class); - expectedException.expectMessage("'polop' cannot be parsed as either a date or date+time"); + expectedException.expectMessage("Date 'polop' cannot be parsed as either a date or date+time"); parseStartingDateOrDateTime("polop"); } |