kwin commented on code in PR #384:
URL:
https://github.com/apache/jackrabbit-filevault/pull/384#discussion_r2330947344
##########
vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/DocViewImporter.java:
##########
@@ -1269,7 +1274,18 @@ private Node getNodeByIdOrName(@NotNull Node
currentNode, @NotNull DocViewNode2
return node;
}
- private boolean setUnprotectedProperties(@NotNull EffectiveNodeType
effectiveNodeType, @NotNull Node node, @NotNull DocViewNode2 ni, boolean
overwriteExistingProperties, @Nullable VersioningState vs) throws
RepositoryException {
+ /**
+ * Persist all unprotected properties
Review Comment:
This does not do any filtering, therefore rather "persist all given
properties". Also the method name should be adjusted.
##########
vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/DocViewImporter.java:
##########
@@ -1211,20 +1210,26 @@ private void removeReferences(@NotNull Node node)
throws ReferentialIntegrityExc
}
}
- private void logIgnoredProtectedProperties(EffectiveNodeType
effectiveNodeType, String nodePath, Collection<DocViewProperty2> properties,
Set<Name> importedProtectedProperties) {
- // logging for protected properties which are not considered during
import
- properties.stream()
- .filter(p -> p.getStringValue().isPresent()
- && !importedProtectedProperties.contains(p.getName()))
- .forEach(p -> {
- try {
- if (isPropertyProtected(effectiveNodeType, p)) {
- log.warn("Ignore protected property '{}' on node '{}'",
npResolver.getJCRName(p.getName()), nodePath);
+ // filter out all protected properties and log for a subset of them
Review Comment:
Please provide proper javadoc clarifying what is returned. Please also move
the most important argument (the properties to filter upon) to the first
position.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]