public static ExclusionAndTypesInfo mergeTypeVariantSets(@Nullable Set<JsonSchemaType> self, @Nullable Set<JsonSchemaType> other) {
    Boolean exclusionType = null;
    if (self == null) return new ExclusionAndTypesInfo(exclusionType, other);
    if (other == null) return new ExclusionAndTypesInfo(exclusionType, self);

    Set<JsonSchemaType> resultSet = EnumSet.noneOf(JsonSchemaType.class);
    for (JsonSchemaType type : self) {
      ProgressManager.checkCanceled();
      var mergedExclusionAndType = computeMergedExclusionAndType(type, null, other);
      if (mergedExclusionAndType != null && mergedExclusionAndType.type != null) resultSet.add(mergedExclusionAndType.type);
      exclusionType = mergedExclusionAndType != null ? mergedExclusionAndType.isValidByExclusion : exclusionType;
    }

    if (resultSet.isEmpty()) {
      return new ExclusionAndTypesInfo(false, other);
    }

    return new ExclusionAndTypesInfo(exclusionType, resultSet);
  }
public static ExclusionAndTypesInfo mergeTypeVariantSets(@Nullable Set<JsonSchemaType> self, @Nullable Set<JsonSchemaType> other)