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

jvergara
17.52.2007 679ee285e2d420692a9181f6e97b8f12da153047
Fix for issue 2755.
Update the indentation as proposed in the issue description.
1 files modified
20 ■■■■ changed files
opends/src/server/org/opends/server/util/args/SubCommandArgumentParser.java 20 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/util/args/SubCommandArgumentParser.java
@@ -1744,30 +1744,18 @@
        }
      }
    } else {
      int indentNb = 0;
      for (SubCommand sc : c) {
        if (sc.isHidden()) {
          continue;
        }
        if (sc.getName().length() > indentNb) {
          indentNb = sc.getName().length();
        }
      }
      indentNb++;
      boolean isFirst = true;
      for (SubCommand sc : c) {
        if (sc.isHidden()) {
          continue;
        }
        if (!isFirst)
        if (isFirst)
        {
          buffer.append(EOL);
        }
        buffer.append("    " + sc.getName());
        for (int i = 0; i < indentNb - sc.getName().length(); i++) {
          buffer.append(" ");
        }
        buffer.append(sc.getDescription());
        buffer.append(sc.getName());
        buffer.append(EOL);
        indentAndWrap(Message.raw(INDENT), sc.getDescription(), buffer);
        buffer.append(EOL);
        isFirst = false;
      }