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

jvergara
05.01.2007 8fb27822a0621950de7c1392fbda0f52e5c6be59
Have more specific error messages and fix a bug in initialization in non-prompt mode.

3 files modified
29 ■■■■■ changed files
opends/src/guitools/org/opends/guitools/replicationcli/ReplicationCliArgumentParser.java 17 ●●●● patch | view | raw | blame | history
opends/src/guitools/org/opends/guitools/replicationcli/ReplicationCliMain.java 4 ●●●● patch | view | raw | blame | history
opends/src/messages/messages/admin_tool.properties 8 ●●●● patch | view | raw | blame | history
opends/src/guitools/org/opends/guitools/replicationcli/ReplicationCliArgumentParser.java
@@ -1400,7 +1400,7 @@
    {
      if (port1Arg.getValue() == port2Arg.getValue())
      {
        Message message = ERR_REPLICATION_SAME_SERVER_PORT.get(
        Message message = ERR_REPLICATION_ENABLE_SAME_SERVER_PORT.get(
            hostName1Arg.getValue(), port1Arg.getValue());
        addMessage(buf, message);
      }
@@ -1453,23 +1453,12 @@
  {
    // The startTLS and useSSL arguments are already validated in
    // SecureConnectionCliParser.validateGlobalOptions.
    if (hostName1Arg.getValue().equalsIgnoreCase(hostName2Arg.getValue()) &&
        !isInteractive())
    {
      if (port1Arg.getValue() == port2Arg.getValue())
      {
        Message message = ERR_REPLICATION_SAME_SERVER_PORT.get(
            hostName1Arg.getValue(), port1Arg.getValue());
        addMessage(buf, message);
      }
    }
    if (hostNameSourceArg.getValue().equalsIgnoreCase(
        hostNameDestinationArg.getValue()) && !isInteractive())
    {
      if (portSourceArg.getValue() == portSourceArg.getValue())
      if (portSourceArg.getValue() == portDestinationArg.getValue())
      {
        Message message = ERR_REPLICATION_SAME_SERVER_PORT.get(
        Message message = ERR_REPLICATION_INITIALIZE_SAME_SERVER_PORT.get(
            hostNameSourceArg.getValue(), portSourceArg.getValue());
        addMessage(buf, message);
      }
opends/src/guitools/org/opends/guitools/replicationcli/ReplicationCliMain.java
@@ -657,7 +657,7 @@
          if (port1 == port2)
          {
            port2 = -1;
            Message message = ERR_REPLICATION_SAME_SERVER_PORT.get(
            Message message = ERR_REPLICATION_ENABLE_SAME_SERVER_PORT.get(
                host1, String.valueOf(port1));
            printLineBreak();
            printErrorMessage(message);
@@ -1276,7 +1276,7 @@
        if (portSource == portDestination)
        {
          portDestination = -1;
          Message message = ERR_REPLICATION_SAME_SERVER_PORT.get(
          Message message = ERR_REPLICATION_INITIALIZE_SAME_SERVER_PORT.get(
              hostSource, String.valueOf(portSource));
          printLineBreak();
          printErrorMessage(message);
opends/src/messages/messages/admin_tool.properties
@@ -499,8 +499,12 @@
 provide it using the {%s} or the {%s} options.
SEVERE_ERR_REPLICATION_NOT_A_VALID_BASEDN=The provided value %s is not a valid \
 base DN.
SEVERE_ERR_REPLICATION_SAME_SERVER_PORT=You have to provide two different \
 servers to replicate.  You have provided twice the server %s:%s
SEVERE_ERR_REPLICATION_ENABLE_SAME_SERVER_PORT=You have to provide two \
 different servers to enable replication.  You have provided twice the server \
 %s:%s
SEVERE_ERR_REPLICATION_INITIALIZE_SAME_SERVER_PORT=You have to provide two \
 different servers as source and destination of the initialization.  You have \
 provided twice the server %s:%s
SEVERE_ERR_REPLICATION_PORT_AND_REPLICATION_PORT_EQUAL=The server LDAP port \
 and the replication port have the same value in host %s.  You provided %s \
 for both.