private <T> T intersect(T spec1, T spec2, String name) {
        if (spec1 == null) {
            return spec2;
        } else if (spec2 == null) {
            return spec1;
        } else if (spec1.equals(spec2)) {
            return spec1;
        } else {
            throw new RuntimeException("The " + name + " component does not match(" + spec1 + "!=" + spec2 + ").");
        }
    }
Compares this <code>VersionSpecification</code> object to another.
<p>
A version is considered to be <b>less than </b> another version if its
major component is less than the other version's major component, or the
major components are equal and its minor component is less than the other
version's minor component, or the major and minor components are equal
and its micro component is less than the other version's micro component,
or the major, minor and micro components are equal and it's qualifier
component is less than the other version's qualifier component (using
<code>String.compareTo</code>).
<p>
A version is considered to be <b>equal to</b> another version if the
major, minor and micro components are equal and the qualifier component
is equal (using <code>String.compareTo</code>).
<p>
Unspecified numeric components are treated as 0, unspecified qualifier is treated as the empty string.

@param other the <code>VersionSpecification</code> object to be compared.
@return A negative integer, zero, or a positive integer if this object is
        less than, equal to, or greater than the specified <code>VersionSpecification</code> object.
@throws ClassCastException if the specified object is not a <code>VersionSpecification</code>.
component/src/main/java/com/yahoo/component/VersionSpecification.java