mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jvergara
03.02.2009 062eda7fadd52ee0f7fd5a9b318761bfbd52527d
Fix for issue 3528 (A scheduled task should check that the start time has not passed)

Compare the current date with the date provided by the user, if the date provided by the user has passed, display an error message.
2 files modified
14 ■■■■■ changed files
opends/src/messages/messages/tools.properties 5 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/tools/StopDS.java 9 ●●●●● patch | view | raw | blame | history
opends/src/messages/messages/tools.properties
@@ -2467,3 +2467,8 @@
SEVERE_ERR_LDAPCOMPARE_ERROR_READING_FILE_1668=An error occurred reading file \
 '%s'.  Check that the file exists and that you have read access rights to \
 it.  Details: %s
SEVERE_ERR_STOPDS_DATETIME_ALREADY_PASSED_1669=The specified stop time '%s' \
 has already passed
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;
        }
      }
    }