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

fguigues
16.37.2009 92c3806162a84cdaa7c0d9c9ce5410bc182cbcfb
opends/src/server/org/opends/server/tools/LDAPSearch.java
@@ -1067,7 +1067,7 @@
      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.
@@ -1081,7 +1081,7 @@
      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,
@@ -1114,7 +1114,7 @@
            TRACER.debugCaught(DebugLogLevel.ERROR, le);
          }
          err.println(wrapText(le.getMessage(), MAX_LINE_WIDTH));
          return 1;
          return CLIENT_SIDE_PARAM_ERROR;
        }
      }
      // The rest are attributes
@@ -1132,7 +1132,7 @@
                      bindPassword.getLongIdentifier(),
                      bindPasswordFile.getLongIdentifier());
      err.println(wrapText(message, MAX_LINE_WIDTH));
      return 1;
      return CLIENT_SIDE_PARAM_ERROR;
    }
    if (useSSL.isPresent() && startTLS.isPresent())
@@ -1141,7 +1141,7 @@
              useSSL.getLongIdentifier(),
              startTLS.getLongIdentifier());
      err.println(wrapText(message, MAX_LINE_WIDTH));
      return 1;
      return CLIENT_SIDE_PARAM_ERROR;
    }
    if (keyStorePassword.isPresent() && keyStorePasswordFile.isPresent())
@@ -1150,7 +1150,7 @@
              keyStorePassword.getLongIdentifier(),
              keyStorePasswordFile.getLongIdentifier());
      err.println(wrapText(message, MAX_LINE_WIDTH));
      return 1;
      return CLIENT_SIDE_PARAM_ERROR;
    }
    if (trustStorePassword.isPresent() && trustStorePasswordFile.isPresent())
@@ -1159,7 +1159,7 @@
              trustStorePassword.getLongIdentifier(),
              trustStorePasswordFile.getLongIdentifier());
      err.println(wrapText(message, MAX_LINE_WIDTH));
      return 1;
      return CLIENT_SIDE_PARAM_ERROR;
    }
    String hostNameValue = hostName.getValue();
@@ -1174,7 +1174,7 @@
        TRACER.debugCaught(DebugLogLevel.ERROR, ae);
      }
      err.println(wrapText(ae.getMessage(), MAX_LINE_WIDTH));
      return 1;
      return CLIENT_SIDE_PARAM_ERROR;
    }
    // Read the LDAP version number.
@@ -1186,7 +1186,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)
@@ -1196,7 +1196,7 @@
        TRACER.debugCaught(DebugLogLevel.ERROR, ae);
      }
      err.println(wrapText(ae.getMessage(), MAX_LINE_WIDTH));
      return 1;
      return CLIENT_SIDE_PARAM_ERROR;
    }
@@ -1228,7 +1228,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)
@@ -1273,17 +1273,17 @@
    } catch(ArgumentException ex1)
    {
      err.println(wrapText(ex1.getMessage(), MAX_LINE_WIDTH));
      return 1;
      return CLIENT_SIDE_PARAM_ERROR;
    }
    boolean val = searchOptions.setSearchScope(searchScope.getValue(), err);
    if(val == false)
    {
      return 1;
      return CLIENT_SIDE_PARAM_ERROR;
    }
    val = searchOptions.setDereferencePolicy(dereferencePolicy.getValue(), err);
    if(val == false)
    {
      return 1;
      return CLIENT_SIDE_PARAM_ERROR;
    }
    if(controlStr.isPresent())
@@ -1296,7 +1296,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;
        }
        searchOptions.getControls().add(ctrl);
      }
@@ -1308,7 +1308,7 @@
        Message message = ERR_EFFECTIVERIGHTS_INVALID_AUTHZID.get(authzID);
        err.println(wrapText(message, MAX_LINE_WIDTH));
        err.println(argParser.getUsage());
        return 1;
        return CLIENT_SIDE_PARAM_ERROR;
      }
      Control effectiveRightsControl =
          new GetEffectiveRightsRequestControl(false, authzID.substring(3),
@@ -1338,7 +1338,7 @@
      {
        Message message = ERR_PSEARCH_MISSING_DESCRIPTOR.get();
        err.println(wrapText(message, MAX_LINE_WIDTH));
        return 1;
        return CLIENT_SIDE_PARAM_ERROR;
      }
      else
      {
@@ -1348,7 +1348,7 @@
          Message message = ERR_PSEARCH_DOESNT_START_WITH_PS.get(
                  String.valueOf(infoString));
          err.println(wrapText(message, MAX_LINE_WIDTH));
          return 1;
          return CLIENT_SIDE_PARAM_ERROR;
        }
      }
@@ -1387,7 +1387,7 @@
            Message message =
                    ERR_PSEARCH_INVALID_CHANGE_TYPE.get(String.valueOf(token));
            err.println(wrapText(message, MAX_LINE_WIDTH));
            return 1;
            return CLIENT_SIDE_PARAM_ERROR;
          }
        }
      }
@@ -1417,7 +1417,7 @@
          Message message = ERR_PSEARCH_INVALID_CHANGESONLY.get(
                  String.valueOf(token));
          err.println(wrapText(message, MAX_LINE_WIDTH));
          return 1;
          return CLIENT_SIDE_PARAM_ERROR;
        }
      }
@@ -1438,7 +1438,7 @@
          Message message = ERR_PSEARCH_INVALID_RETURN_ECS.get(
                  String.valueOf(token));
          err.println(wrapText(message, MAX_LINE_WIDTH));
          return 1;
          return CLIENT_SIDE_PARAM_ERROR;
        }
      }
@@ -1466,7 +1466,7 @@
        Message message = ERR_LDAP_ASSERTION_INVALID_FILTER.get(
                le.getMessage());
        err.println(wrapText(message, MAX_LINE_WIDTH));
        return 1;
        return CLIENT_SIDE_PARAM_ERROR;
      }
    }
@@ -1487,7 +1487,7 @@
          Message message = ERR_LDAP_MATCHEDVALUES_INVALID_FILTER.get(
                  le.getMessage());
          err.println(wrapText(message, MAX_LINE_WIDTH));
          return 1;
          return CLIENT_SIDE_PARAM_ERROR;
        }
      }
@@ -1507,7 +1507,7 @@
        Message message = ERR_LDAP_SORTCONTROL_INVALID_ORDER.get(
                le.getErrorMessage());
        err.println(wrapText(message, MAX_LINE_WIDTH));
        return 1;
        return CLIENT_SIDE_PARAM_ERROR;
      }
    }
@@ -1519,7 +1519,7 @@
                vlvDescriptor.getLongIdentifier(),
                sortOrder.getLongIdentifier());
        err.println(wrapText(message, MAX_LINE_WIDTH));
        return 1;
        return CLIENT_SIDE_PARAM_ERROR;
      }
      StringTokenizer tokenizer =
@@ -1539,7 +1539,7 @@
        {
          Message message = ERR_LDAPSEARCH_VLV_INVALID_DESCRIPTOR.get();
          err.println(wrapText(message, MAX_LINE_WIDTH));
          return 1;
          return CLIENT_SIDE_PARAM_ERROR;
        }
      }
      else if (numTokens == 4)
@@ -1558,14 +1558,14 @@
        {
          Message message = ERR_LDAPSEARCH_VLV_INVALID_DESCRIPTOR.get();
          err.println(wrapText(message, MAX_LINE_WIDTH));
          return 1;
          return CLIENT_SIDE_PARAM_ERROR;
        }
      }
      else
      {
        Message message = ERR_LDAPSEARCH_VLV_INVALID_DESCRIPTOR.get();
        err.println(wrapText(message, MAX_LINE_WIDTH));
        return 1;
        return CLIENT_SIDE_PARAM_ERROR;
      }
    }
@@ -1581,14 +1581,14 @@
          boolean mechValue = connectionOptions.setSASLMechanism(saslOption);
          if(mechValue == false)
          {
            return 1;
            return CLIENT_SIDE_PARAM_ERROR;
          }
        } else
        {
          boolean propValue = connectionOptions.addSASLProperty(saslOption);
          if(propValue == false)
          {
            return 1;
            return CLIENT_SIDE_PARAM_ERROR;
          }
        }
      }
@@ -1602,13 +1602,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;
      }
    }
@@ -1640,7 +1640,7 @@
          TRACER.debugCaught(DebugLogLevel.ERROR, e);
        }
        err.println(wrapText(e.getMessage(), MAX_LINE_WIDTH));
        return 1;
        return CLIENT_SIDE_PARAM_ERROR;
      }
      finally
      {
@@ -1660,7 +1660,7 @@
      err.println(wrapText(ERR_SEARCH_NO_FILTERS.get(), MAX_LINE_WIDTH));
      err.println(argParser.getUsage());
      return 1;
      return CLIENT_SIDE_PARAM_ERROR;
    }
    int wrapColumn = 80;