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

Violette Roche-Montane
07.50.2013 00d37e85955e374be365f1c34de5af1f69a6476c
opendj-sdk/opends/src/server/org/opends/server/tools/status/StatusCli.java
@@ -71,8 +71,10 @@
import org.opends.server.tools.ToolConstants;
import org.opends.server.tools.dsconfig.LDAPManagementContextFactory;
import org.opends.server.types.DN;
import org.opends.server.types.InitializationException;
import org.opends.server.types.NullOutputStream;
import org.opends.server.types.OpenDsException;
import org.opends.server.util.BuildVersion;
import org.opends.server.util.StaticUtils;
import org.opends.server.util.args.ArgumentException;
import org.opends.server.util.cli.ConsoleApplication;
@@ -307,6 +309,17 @@
    if (argParser.usageOrVersionDisplayed()) {
      return ErrorReturnCode.SUCCESSFUL_NOP.getReturnCode();
    }
    // Checks the version - if upgrade required, the tool is unusable
    try
    {
      BuildVersion.checkVersionMismatch();
    }
    catch (InitializationException e)
    {
      println(e.getMessageObject());
      return 1;
    }
    int v = argParser.validateGlobalOptions(getErrorStream());
    if (v != DsFrameworkCliReturnCode.SUCCESSFUL_NOP.getReturnCode()) {