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

Valery Kharseko
21 hours ago 4c7057e45ba8a2f3bc1f0b02b3edf14886fd1956
opendj-server-legacy/src/main/java/org/opends/quicksetup/BuildInformation.java
@@ -275,7 +275,7 @@
   * @return String representing the major version
   */
  public Integer getMajorVersion() {
    return Integer.valueOf(values.get(MAJOR_VERSION));
    return getVersionNumber(MAJOR_VERSION);
  }
  /**
@@ -284,7 +284,7 @@
   * @return String representing the minor version
   */
  public Integer getMinorVersion() {
    return Integer.valueOf(values.get(MINOR_VERSION));
    return getVersionNumber(MINOR_VERSION);
  }
  /**
@@ -293,7 +293,24 @@
   * @return String representing the point version
   */
  public Integer getPointVersion() {
    return Integer.valueOf(values.get(POINT_VERSION));
    return getVersionNumber(POINT_VERSION);
  }
  /**
   * Returns the number held by the provided version property, or zero if the
   * build information does not hold a number for it.
   *
   * @param versionProperty the name of the version property
   * @return the number held by the property
   */
  private Integer getVersionNumber(String versionProperty) {
    try {
      return Integer.valueOf(values.get(versionProperty));
    } catch (NumberFormatException e) {
      // The build information does not hold a version number: treat it as unknown
      // rather than failing the version comparison with a runtime exception.
      return 0;
    }
  }
  /**