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

neil_a_wilson
15.50.2006 3beceb095561bff52b4fb6bf3bb7bb7a2d9e079f
opendj-sdk/opends/src/server/org/opends/server/tools/LDAPSearch.java
@@ -702,7 +702,7 @@
      argParser.addArgument(matchedValuesFilter);
      controlStr =
           new StringArgument("controls", 'J', "controls", false, false, true,
           new StringArgument("control", 'J', "control", false, true, true,
                    "{controloid[:criticality[:value|::b64value|:<fileurl]]}",
                    null, null, MSGID_DESCRIPTION_CONTROLS);
      argParser.addArgument(controlStr);
@@ -955,19 +955,21 @@
      return 1;
    }
    if(controlStr.hasValue())
    if(controlStr.isPresent())
    {
      String ctrlString = controlStr.getValue();
      LDAPControl ctrl = LDAPToolUtils.getControl(ctrlString, err);
      if(ctrl == null)
      for (String ctrlString : controlStr.getValues())
      {
        int    msgID   = MSGID_TOOL_INVALID_CONTROL_STRING;
        String message = getMessage(msgID, ctrlString);
        err.println(wrapText(message, MAX_LINE_WIDTH));
        err.println(argParser.getUsage());
        return 1;
        LDAPControl ctrl = LDAPToolUtils.getControl(ctrlString, err);
        if(ctrl == null)
        {
          int    msgID   = MSGID_TOOL_INVALID_CONTROL_STRING;
          String message = getMessage(msgID, ctrlString);
          err.println(wrapText(message, MAX_LINE_WIDTH));
          err.println(argParser.getUsage());
          return 1;
        }
        searchOptions.getControls().add(ctrl);
      }
      searchOptions.getControls().add(ctrl);
    }
    if (proxyAuthzID.isPresent())