diff options
author | Jerry Flood <jflood@att.com> | 2019-04-26 12:54:02 -0400 |
---|---|---|
committer | Jerry Flood <jflood@att.com> | 2019-04-26 12:54:12 -0400 |
commit | f2fa64b013de2f55367bf9b8471949b72adc27b0 (patch) | |
tree | 6da9354aad40be7dd8aec4e98d85caf53d84ec11 /cmso-service/src/main | |
parent | 131273f73ec21a5632de9069f8b04f75631ce790 (diff) |
More robot tests for CC
Issue-ID: OPTFRA-474
Change-Id: I8288c9094a9a56b882994f784c26231df5a47a89
Signed-off-by: Jerry Flood <jflood@att.com>
Diffstat (limited to 'cmso-service/src/main')
-rw-r--r-- | cmso-service/src/main/java/org/onap/optf/cmso/service/rs/CmQueryParameters.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/CmQueryParameters.java b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/CmQueryParameters.java index 442abe3..1e4a46a 100644 --- a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/CmQueryParameters.java +++ b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/CmQueryParameters.java @@ -223,11 +223,13 @@ public class CmQueryParameters { }
private static DateTime convertDate(String utcDate, String urlName) throws CmsoException {
- DateTime dateTime = ISODateTimeFormat.dateTimeParser().parseDateTime(utcDate);
- if (dateTime != null) {
+ try {
+ DateTime dateTime = ISODateTimeFormat.dateTimeParser().parseDateTime(utcDate);
return dateTime;
}
- throw new CmsoException(Status.BAD_REQUEST, LogMessages.INVALID_DATE_FILTER, urlName, utcDate);
+ catch (Exception e) {
+ throw new CmsoException(Status.BAD_REQUEST, LogMessages.INVALID_DATE_FILTER, urlName, utcDate);
+ }
}
// public static void main(String argv[])
|