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

fguigues
16.37.2009 92c3806162a84cdaa7c0d9c9ce5410bc182cbcfb
opends/src/server/org/opends/server/tools/LDAPDelete.java
@@ -570,9 +570,8 @@
    } catch (ArgumentException ae)
    {
      Message message = ERR_CANNOT_INITIALIZE_ARGS.get(ae.getMessage());
      err.println(wrapText(message, MAX_LINE_WIDTH));
      return 1;
      return CLIENT_SIDE_PARAM_ERROR;
    }
    // Parse the command-line arguments provided to this program.
@@ -583,10 +582,9 @@
    catch (ArgumentException ae)
    {
      Message message = ERR_ERROR_PARSING_ARGS.get(ae.getMessage());
      err.println(wrapText(message, MAX_LINE_WIDTH));
      err.println(argParser.getUsage());
      return 1;
      return CLIENT_SIDE_PARAM_ERROR;
    }
    // If we should just display usage or version information,
@@ -602,7 +600,16 @@
              bindPassword.getLongIdentifier(),
              bindPasswordFile.getLongIdentifier());
      err.println(wrapText(message, MAX_LINE_WIDTH));
      return 1;
      return CLIENT_SIDE_PARAM_ERROR;
    }
    if ((!filename.isPresent() &&
            (argParser.getTrailingArguments().size()==0)))
    {
      Message message = ERR_ERROR_PARSING_ARGS.get(filename.getValue());
      err.println(wrapText(message, MAX_LINE_WIDTH));
      err.println(argParser.getUsage());
      return CLIENT_SIDE_PARAM_ERROR;
    }
    String hostNameValue = hostName.getValue();
@@ -617,7 +624,7 @@
        TRACER.debugCaught(DebugLogLevel.ERROR, ae);
      }
      err.println(wrapText(ae.getMessage(), MAX_LINE_WIDTH));
      return 1;
      return CLIENT_SIDE_PARAM_ERROR;
    }
    try
@@ -628,7 +635,7 @@
        err.println(wrapText(ERR_DESCRIPTION_INVALID_VERSION.get(
                String.valueOf(versionNumber)), MAX_LINE_WIDTH));
        return 1;
        return CLIENT_SIDE_PARAM_ERROR;
      }
      connectionOptions.setVersionNumber(versionNumber);
    } catch(ArgumentException ae)
@@ -638,7 +645,7 @@
        TRACER.debugCaught(DebugLogLevel.ERROR, ae);
      }
      err.println(wrapText(ae.getMessage(), MAX_LINE_WIDTH));
      return 1;
      return CLIENT_SIDE_PARAM_ERROR;
    }
    String bindDNValue = bindDN.getValue();
@@ -661,7 +668,7 @@
          TRACER.debugCaught(DebugLogLevel.ERROR, ex);
        }
        err.println(wrapText(ex.getMessage(), MAX_LINE_WIDTH));
        return 1;
        return CLIENT_SIDE_PARAM_ERROR;
      }
    } else if(bindPasswordValue == null)
    {
@@ -708,7 +715,7 @@
          Message message = ERR_TOOL_INVALID_CONTROL_STRING.get(ctrlString);
          err.println(wrapText(message, MAX_LINE_WIDTH));
          err.println(argParser.getUsage());
          return 1;
          return CLIENT_SIDE_PARAM_ERROR;
        }
        deleteOptions.getControls().add(ctrl);
      }
@@ -739,14 +746,14 @@
          boolean val = connectionOptions.setSASLMechanism(saslOption);
          if(val == false)
          {
            return 1;
            return CLIENT_SIDE_PARAM_ERROR;
          }
        } else
        {
          boolean val = connectionOptions.addSASLProperty(saslOption);
          if(val == false)
          {
            return 1;
            return CLIENT_SIDE_PARAM_ERROR;
          }
        }
      }
@@ -760,13 +767,13 @@
      {
        Message message = ERR_TOOL_SASLEXTERNAL_NEEDS_SSL_OR_TLS.get();
        err.println(wrapText(message, MAX_LINE_WIDTH));
        return 1;
        return CLIENT_SIDE_PARAM_ERROR;
      }
      if(keyStorePathValue == null)
      {
        Message message = ERR_TOOL_SASLEXTERNAL_NEEDS_KEYSTORE.get();
        err.println(wrapText(message, MAX_LINE_WIDTH));
        return 1;
        return CLIENT_SIDE_PARAM_ERROR;
      }
    }