OpenDJ doc specify "localhost" as default (#127)
The current code can return an IP or hostname instead of localhost, which means that using a script in local on a server which only listens to 127.0.0.1 can fail without the -h flag.
| | |
| | | argumentParser.addLdapConnectionArgument(useStartTLSArg); |
| | | } |
| | | |
| | | String defaultHostName; |
| | | try { |
| | | defaultHostName = InetAddress.getLocalHost().getHostName(); |
| | | } catch (final Exception e) { |
| | | defaultHostName = "Unknown (" + e + ")"; |
| | | } |
| | | String defaultHostName = "localhost"; |
| | | hostNameArg = hostNameArgument(defaultHostName); |
| | | argumentParser.addLdapConnectionArgument(hostNameArg); |
| | | |