From 4efca90c1cc21fae21724a2f2f6f2023b7d6cf94 Mon Sep 17 00:00:00 2001 From: Teryk Bellahsene Date: Tue, 13 Sep 2016 18:49:54 +0200 Subject: SONAR-8028 Use DateUtils.parseEndingDateOrDatetime to search background tasks and issues --- sonar-plugin-api/src/main/java/org/sonar/api/utils/DateUtils.java | 4 ++-- sonar-plugin-api/src/test/java/org/sonar/api/utils/DateUtilsTest.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'sonar-plugin-api') 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"); } -- cgit v1.2.3