protected static boolean isUnchangedAutocreatedProperty()

in src/main/java/org/apache/sling/jcr/repoinit/impl/NodePropertiesVisitor.java [126:141]


    protected static boolean isUnchangedAutocreatedProperty(Node n, final String propertyPath)
            throws RepositoryException {
        if (n.hasProperty(propertyPath)) {
            final Property property = n.getProperty(propertyPath);
            final String name = property.getName();
            final PropertyDefinition pd = resolvePropertyDefinition(name, property.getParent());
            if (pd != null && pd.isAutoCreated()) {
                // if the current value is the same as the autocreated default values
                //  then allow the value to be changed.
                return Arrays.equals(
                        pd.getDefaultValues(),
                        property.isMultiple() ? property.getValues() : new Value[] {property.getValue()});
            }
        }
        return false;
    }