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

Jean-Noel Rouvignac
03.55.2015 0e4dba1e34cf6a2414267a399c1364c0e953ed52
refs
author Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Tuesday, February 3, 2015 14:55 +0100
committer Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Tuesday, February 3, 2015 14:55 +0100
commit0e4dba1e34cf6a2414267a399c1364c0e953ed52
tree c071c3a8304d75ef2fd65bb4498bc502b2c01321 tree | zip | gz
parent 291b726ecf6348e3e04e5514821fa61a9413ff5e view | diff
OPENDJ-1778 Tools --help display the java class name instead of the command name

This is a problem since switching to using the opendj-cli argument classes.
This happens because the opendj-cli tools check the new "com.forgerock.opendj.ldap.tools.scriptName" property instead of the opends property "org.opends.server.scriptName" that is still set by the server tools.
Fixed by also checking the legacy opends property.
Factorized the code from ArgumentParser, SubCommandArgumentParser and DSConfig.


ArgumentParser.java:
Added constant PROPERTY_SCRIPT_NAME_LEGACY.
Extracted methods getScriptNameOrJava(), getLocalizableScriptName() and getScriptName().
3 files modified
89 ■■■■■ changed files
opendj-sdk/opendj-cli/src/main/java/com/forgerock/opendj/cli/ArgumentParser.java 54 ●●●● diff | view | raw | blame | history
opendj-sdk/opendj-cli/src/main/java/com/forgerock/opendj/cli/SubCommandArgumentParser.java 27 ●●●●● diff | view | raw | blame | history
opendj-sdk/opendj-config/src/main/java/org/forgerock/opendj/config/dsconfig/DSConfig.java 8 ●●●● diff | view | raw | blame | history