public static KnownVersion getKnownVersionOrDefault(final Version anyVersion,
      KnownVersion defaultKnownVersion) {
    if (anyVersion instanceof KnownVersion) {
      return (KnownVersion) anyVersion;
    } else {
      return defaultKnownVersion;
    }
  }
Return the known version ({@link KnownVersion}) for {@code anyVersion}, if possible.
Otherwise return {@code defaultKnownVersion}. This method essentially
downcasts a {@link Version} to a known version {@link KnownVersion}.

@param anyVersion came from a call to {@link #getVersion(short)}
@param defaultKnownVersion will be returned if {@code anyVersion} does not represent
       a known version
@return a known version
geode-serialization/src/main/java/org/apache/geode/internal/serialization/Versioning.java