From 062eda7fadd52ee0f7fd5a9b318761bfbd52527d Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Fri, 03 Apr 2009 12:02:05 +0000
Subject: [PATCH] Fix for issue 3528 (A scheduled task should check that the start time has not passed)
---
opends/src/server/org/opends/server/tools/StopDS.java | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/opends/src/server/org/opends/server/tools/StopDS.java b/opends/src/server/org/opends/server/tools/StopDS.java
index 863e1a8..e7bbb74 100644
--- a/opends/src/server/org/opends/server/tools/StopDS.java
+++ b/opends/src/server/org/opends/server/tools/StopDS.java
@@ -517,6 +517,15 @@
err.println(wrapText(message, MAX_LINE_WIDTH));
return LDAPResultCode.CLIENT_SIDE_PARAM_ERROR;
}
+ // Check that the provided date is not previous to the current date.
+ Date currentDate = new Date(System.currentTimeMillis());
+ if (currentDate.after(stopTime))
+ {
+ Message message = ERR_STOPDS_DATETIME_ALREADY_PASSED.get(
+ timeStr);
+ err.println(wrapText(message, MAX_LINE_WIDTH));
+ return LDAPResultCode.CLIENT_SIDE_PARAM_ERROR;
+ }
}
}
--
Gitblit v1.10.0