@Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    ModuleVersion that = (ModuleVersion) o;

    if (apacheMajor != that.apacheMajor) return false;
    if (apacheMinor != that.apacheMinor) return false;
    if (build != that.build) return false;
    if (hotfix != that.hotfix) return false;
    if (internalMaint != that.internalMaint) return false;
    if (internalMinor != that.internalMinor) return false;

    return true;
  }
Method validate module version not to be
empty or null. Also check if passed version
has valid format.
@param version string
@return Matcher for passed version
@throws IllegalArgumentException() if version empty/null/not valid
ambari-server/src/main/java/org/apache/ambari/server/utils/ModuleVersion.java