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

matthew_swift
17.59.2010 5484048d11c67adff8308ea153f5bb6ca695cf78
Resolve usability ambiguity with TaskTool : make TaskTool check that connection arguments are present before accepting task scheduling options
2 files modified
13 ■■■■■ changed files
opends/src/messages/messages/tools.properties 3 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/tools/tasks/TaskTool.java 10 ●●●●● patch | view | raw | blame | history
opends/src/messages/messages/tools.properties
@@ -2164,6 +2164,9 @@
SEVERE_ERR_TASK_TOOL_START_TIME_NO_LDAP_1459=You have provided options for \
  scheduling this operation as a task but options provided for connecting to \
  the server's tasks backend resulted in the following error: '%s'
SEVERE_ERR_TASK_TOOL_NO_VALID_LDAP_OPTIONS_1460=You have provided options for \
  scheduling this operation as a task but options provided for connecting to \
  the server's tasks backend are invalid or missing
INFO_DESCRIPTION_PROP_FILE_PATH_1461=Path to the file containing default \
  property values used for command line arguments
INFO_DESCRIPTION_NO_PROP_FILE_1462=No properties file will be \
opends/src/server/org/opends/server/tools/tasks/TaskTool.java
@@ -236,7 +236,15 @@
   * @throws CLIException if there is a problem with one of the values provided
   * by the user.
   */
  protected void validateTaskArgs() throws ArgumentException, CLIException {
  protected void validateTaskArgs() throws ArgumentException, CLIException
  {
    if ((startArg.isPresent() || recurringArg.isPresent()) &&
            !processAsTask())
    {
      throw new ArgumentException(
              ERR_TASK_TOOL_NO_VALID_LDAP_OPTIONS.get());
    }
    if (startArg.isPresent() && !NOW.equals(startArg.getValue())) {
      try {
        Date date = StaticUtils.parseDateTimeString(startArg.getValue());