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

lutoff
16.40.2007 a5a372a17dfbea0e0551a992e11c4fec4b7bb9d0
Add a "PRINTABLE_VERSION_STRING" string in DynamicContants class. This will prevent to compute in several places the printable string to be displayed (--version)
3 files modified
54 ■■■■ changed files
opends/resource/DynamicConstants.java.stubs 6 ●●●●● patch | view | raw | blame | history
opends/src/quicksetup/org/opends/quicksetup/Launcher.java 35 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/core/DirectoryServer.java 13 ●●●●● patch | view | raw | blame | history
opends/resource/DynamicConstants.java.stubs
@@ -148,4 +148,10 @@
       (((FIX_IDS != null) && (FIX_IDS.length() > 0))
        ? "+" + FIX_IDS
        : "");
  /**
   * A printable version string for this product.
   */
  public static final String PRINTABLE_VERSION_STRING =
       FULL_VERSION_STRING + "\nBuild " + BUILD_ID +"\n";
}
opends/src/quicksetup/org/opends/quicksetup/Launcher.java
@@ -27,13 +27,7 @@
package org.opends.quicksetup;
import static org.opends.server.util.DynamicConstants.BUILD_ID;
import static org.opends.server.util.DynamicConstants.FIX_IDS;
import static org.opends.server.util.DynamicConstants.MAJOR_VERSION;
import static org.opends.server.util.DynamicConstants.MINOR_VERSION;
import static org.opends.server.util.DynamicConstants.POINT_VERSION;
import static org.opends.server.util.DynamicConstants.PRODUCT_NAME;
import static org.opends.server.util.DynamicConstants.VERSION_QUALIFIER;
import static org.opends.server.util.DynamicConstants.PRINTABLE_VERSION_STRING;
import org.opends.quicksetup.util.Utils;
import org.opends.quicksetup.i18n.ResourceProvider;
@@ -278,32 +272,7 @@
   */
  private void printVersion()
  {
    String EOL = System.getProperty("line.separator");
    StringBuilder buffer = new StringBuilder();
    buffer.append(PRODUCT_NAME);
    buffer.append(" ");
    buffer.append(MAJOR_VERSION);
    buffer.append(".");
    buffer.append(MINOR_VERSION);
    if ((VERSION_QUALIFIER == null) || (VERSION_QUALIFIER.length() == 0))
    {
      buffer.append(".");
      buffer.append(POINT_VERSION);
    }
    else
    {
      buffer.append(VERSION_QUALIFIER);
    }
    buffer.append(EOL);
    buffer.append("Build " + BUILD_ID);
    buffer.append(EOL);
    if ((FIX_IDS != null) && (FIX_IDS.length() > 0))
    {
      buffer.append("Fix IDs:  " + FIX_IDS);
      buffer.append(EOL);
    }
    System.out.print(buffer);
    System.out.print(PRINTABLE_VERSION_STRING);
    return;
  }
opends/src/server/org/opends/server/core/DirectoryServer.java
@@ -8328,18 +8328,7 @@
  public static void printVersion(OutputStream outputStream)
  throws IOException
  {
    StringBuilder buffer = new StringBuilder();
    buffer.append(getVersionString());
    buffer.append(EOL);
    buffer.append("Build " + BUILD_ID);
    buffer.append(EOL);
    if ((FIX_IDS != null) && (FIX_IDS.length() > 0))
    {
      buffer.append("Fix IDs:  " + FIX_IDS);
      buffer.append(EOL);
    }
    outputStream.write(getBytes(buffer.toString()));
    outputStream.write(getBytes(PRINTABLE_VERSION_STRING));
    return;
  }