core/src/main/java/com/orientechnologies/orient/core/metadata/schema/OClassImpl.java
protected void addPolymorphicClusterIds(final OClassImpl iBaseClass) {
    Set<Integer> clusters = new TreeSet<Integer>();

    for (int clusterId : polymorphicClusterIds) {
      clusters.add(clusterId);
    }
    for (int clusterId : iBaseClass.polymorphicClusterIds) {
      if (clusters.add(clusterId)) {
        try {
          addClusterIdToIndexes(clusterId);
        } catch (RuntimeException e) {
          OLogManager.instance().warn(this, "Error adding clusterId '%d' to index of class '%s'", e, clusterId, getName());
          clusters.remove(clusterId);
        }
      }
    }
    polymorphicClusterIds = new int[clusters.size()];
    int i = 0;
    for (Integer cluster : clusters) {
      polymorphicClusterIds[i] = cluster;
      i++;
    }
  }
protected void addPolymorphicClusterIds(final OClassImpl iBaseClass) {
    Set<Integer> clusters = new TreeSet<Integer>();

    for (int clusterId : polymorphicClusterIds) {
      clusters.add(clusterId);
    }
    for (int clusterId : iBaseClass.polymorphicClusterIds) {
      if (clusters.add(clusterId)) {
        try {
          addClusterIdToIndexes(clusterId);
        } catch (RuntimeException e) {
          OLogManager.instance().warn(this, "Error adding clusterId '%d' to index of class '%s'", e, clusterId, getName());
          clusters.remove(clusterId);
        }
      }
    }
    polymorphicClusterIds = new int[clusters.size()];
    int i = 0;
    for (Integer cluster : clusters) {
      polymorphicClusterIds[i] = cluster;
      i++;
    }
  }
protected void addPolymorphicClusterIds ( final OClassImpl iBaseClass ) { Set < Integer > clusters = new TreeSet < Integer > ( ) ; for ( int clusterId : polymorphicClusterIds ) { clusters . add ( clusterId ) ; } for ( int clusterId : iBaseClass . polymorphicClusterIds ) { if ( clusters . add ( clusterId ) ) { try { addClusterIdToIndexes ( clusterId ) ; } catch ( RuntimeException e ) { OLogManager . instance ( ) . warn ( this , "Error adding clusterId '%d' to index of class '%s'" , e , clusterId , getName ( ) ) ; clusters . remove ( clusterId ) ; } } } polymorphicClusterIds = new int [ clusters . size ( ) ] ; int i = 0 ; for ( Integer cluster : clusters ) { polymorphicClusterIds [ i ] = cluster ; i ++ ; } }
Add different cluster id to the "polymorphic cluster ids" array.
Add different cluster id to the polymorphic cluster ids array .