private static void populateProperties()

in src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrResourceProvider.java [522:544]


    private static void populateProperties(@NotNull Node node, @NotNull Map<String, Object> properties, @NotNull ResolveContext<JcrProviderState> ctx, @NotNull String path) throws PersistenceException {
        // create modifiable map
        final JcrModifiableValueMap jcrMap = new JcrModifiableValueMap(node, getHelperData(ctx));
        // check mixin types first
        final Object value = properties.get(JcrConstants.JCR_MIXINTYPES);
        if (value != null) {
            jcrMap.put(JcrConstants.JCR_MIXINTYPES, value);
        }
        for (final Map.Entry<String, Object> entry : properties.entrySet()) {
            if (!IGNORED_PROPERTIES.contains(entry.getKey())) {
                try {
                    jcrMap.put(entry.getKey(), entry.getValue());
                } catch (final IllegalArgumentException iae) {
                    try {
                        node.remove();
                    } catch (final RepositoryException re) {
                        // we ignore this
                    }
                    throw new PersistenceException(iae.getMessage(), iae, path, entry.getKey());
                }
            }
        }
    }