String propName = readable(name);
if (defn != null) {
String defnName = defn.getName();
String nodeTypeName = defn.getDeclaringNodeType().getName();
I18n msg = JcrI18n.valueViolatesConstraintsOnDefinition;
throw new ConstraintViolationException(msg.text(propName, readable(values), location(), defnName, nodeTypeName));
}
// See if we can find a single-valued property definition ...
defn = nodeTypes.findPropertyDefinition(session, primaryType, mixinTypes, name, values[0], true, false);
if (defn == null) {
// The cardinality of the new values does not match the available property definition ...