docs: private void validateSupertypes( List<JcrNodeType> supertypes ) throws RepositoryException {
          assert supertypes != null;
  
          Map<PropertyDefinitionId, JcrPropertyDefinition> props = new HashMap<PropertyDefinitionId, JcrPropertyDefinition>();
  
          for (JcrNodeType supertype : supertypes) {
              for (JcrPropertyDefinition property : supertype.propertyDefinitions()) {
                  JcrPropertyDefinition oldProp = props.put(new PropertyDefinitionId(property.getInternalName(),
                                                                                     property.getInternalName(),
                                                                                     PropertyType.UNDEFINED, property.isMultiple()),
                                                            property);
                  if (oldProp != null) {
                      String oldPropTypeName = oldProp.getDeclaringNodeType().getName();
                      String propTypeName = property.getDeclaringNodeType().getName();
                      if (!oldPropTypeName.equals(propTypeName)) {
                          throw new InvalidNodeTypeDefinitionException(JcrI18n.supertypesConflict.text(oldPropTypeName,
                                                                                                       propTypeName, "property",
                                                                                                       property.getName()));
                      }
                  }
              }
          }
  
          Map<NodeDefinitionId, JcrNodeDefinition> childNodes = new HashMap<NodeDefinitionId, JcrNodeDefinition>();
  
          for (JcrNodeType supertype : supertypes) {
              for (JcrNodeDefinition childNode : supertype.childNodeDefinitions()) {
                  JcrNodeDefinition oldNode = childNodes.put(new NodeDefinitionId(childNode.getInternalName(),
                                                                                  childNode.getInternalName(), new Name[0]),
                                                             childNode);
                  if (oldNode != null) {
                      String oldNodeTypeName = oldNode.getDeclaringNodeType().getName();
                      String childNodeTypeName = childNode.getDeclaringNodeType().getName();
                      if (!oldNodeTypeName.equals(childNodeTypeName)) {
                          throw new InvalidNodeTypeDefinitionException(JcrI18n.supertypesConflict.text(oldNodeTypeName,
                                                                                                       childNodeTypeName,
                                                                                                       "child node",
                                                                                                       childNode.getName()));
                      }
                  }
              }
          }
      }