From 424f01ed65208936a95b29f16c7f49e68a08d444 Mon Sep 17 00:00:00 2001 From: Terry Brady Date: Wed, 8 Mar 2017 10:28:25 -0800 Subject: [PATCH] [DS-3348] Drop date check in EmbargoService (#1542) * Drop date check in EmbargoService * Revise comment per review --- .../java/org/dspace/embargo/EmbargoServiceImpl.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/dspace-api/src/main/java/org/dspace/embargo/EmbargoServiceImpl.java b/dspace-api/src/main/java/org/dspace/embargo/EmbargoServiceImpl.java index 87c13a6bfe..2f298f6355 100644 --- a/dspace-api/src/main/java/org/dspace/embargo/EmbargoServiceImpl.java +++ b/dspace-api/src/main/java/org/dspace/embargo/EmbargoServiceImpl.java @@ -138,13 +138,10 @@ public class EmbargoServiceImpl implements EmbargoService + result.toString()); } - // sanity check: do not allow an embargo lift date in the past. - if (liftDate.before(new Date())) - { - throw new IllegalArgumentException( - "Embargo lift date must be in the future, but this is in the past: " - + result.toString()); - } + /* + * NOTE: We do not check here for past dates as it can result in errors during AIP restoration. + * Therefore, UIs should perform any such date validation on input. See DS-3348 + */ return result; }