You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ss...@apache.org on 2023/05/16 08:23:02 UTC
[sling-org-apache-sling-testing-jcr-mock] branch master updated: cosmetic: eliminate javadoc warnings
This is an automated email from the ASF dual-hosted git repository.
sseifert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-jcr-mock.git
The following commit(s) were added to refs/heads/master by this push:
new 8e8936c cosmetic: eliminate javadoc warnings
8e8936c is described below
commit 8e8936cd4cb1af9626cf85965c3b644188c83ee4
Author: Stefan Seifert <st...@users.noreply.github.com>
AuthorDate: Tue May 16 10:22:54 2023 +0200
cosmetic: eliminate javadoc warnings
---
src/main/java/org/apache/sling/testing/mock/jcr/MockJcr.java | 8 +++++---
.../sling/testing/mock/jcr/MockTemplateBuilderFactory.java | 6 ++----
.../org/apache/sling/testing/mock/jcr/MockUserManager.java | 12 ++++++++----
3 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/src/main/java/org/apache/sling/testing/mock/jcr/MockJcr.java b/src/main/java/org/apache/sling/testing/mock/jcr/MockJcr.java
index 1fc5f28..258bffb 100644
--- a/src/main/java/org/apache/sling/testing/mock/jcr/MockJcr.java
+++ b/src/main/java/org/apache/sling/testing/mock/jcr/MockJcr.java
@@ -235,9 +235,11 @@ public final class MockJcr {
* Reads and registers the node types from the reader that supplies the content
* in the compact node type definition format. This will also change the mode of
* the MockNodeTypeManager to consider only the registered node types.
- *
+ *
* @param session session to load the node types into
* @param reader reader supplying the compact node type definition data
+ * @throws ParseException Parse exception
+ * @throws RepositoryException Repository exception
*/
public static void loadNodeTypeDefs(@NotNull Session session, @NotNull Reader reader) throws ParseException, RepositoryException {
// inform the manager to only consider the registered node types
@@ -245,7 +247,7 @@ public final class MockJcr {
((MockNodeTypeManager)nodeTypeManager).setMode(ResolveMode.ONLY_REGISTERED);
MockTemplateBuilderFactory factory = new MockTemplateBuilderFactory(session);
- CompactNodeTypeDefReader<NodeTypeTemplate, NamespaceRegistry> cndReader =
+ CompactNodeTypeDefReader<NodeTypeTemplate, NamespaceRegistry> cndReader =
new CompactNodeTypeDefReader<>(reader, "cnd input stream", factory);
List<NodeTypeTemplate> nodeTypeDefinitions = cndReader.getNodeTypeDefinitions();
@@ -256,7 +258,7 @@ public final class MockJcr {
/**
* Use the supplied AccessControlManager for the session
- *
+ *
* @param session the session to modify
* @param acm the access control manager to use for the session
*/
diff --git a/src/main/java/org/apache/sling/testing/mock/jcr/MockTemplateBuilderFactory.java b/src/main/java/org/apache/sling/testing/mock/jcr/MockTemplateBuilderFactory.java
index da46612..021921e 100644
--- a/src/main/java/org/apache/sling/testing/mock/jcr/MockTemplateBuilderFactory.java
+++ b/src/main/java/org/apache/sling/testing/mock/jcr/MockTemplateBuilderFactory.java
@@ -31,17 +31,15 @@ import javax.jcr.nodetype.NodeTypeManager;
import javax.jcr.nodetype.NodeTypeTemplate;
import javax.jcr.nodetype.PropertyDefinitionTemplate;
-import org.apache.jackrabbit.commons.cnd.CompactNodeTypeDefReader;
import org.apache.jackrabbit.commons.cnd.DefinitionBuilderFactory;
-import org.apache.jackrabbit.commons.cnd.TemplateBuilderFactory;
/**
* This is a fork of the {@link TemplateBuilderFactory} that changes the implementation
- * of {@link NodeDefinitionTemplateBuilder#setDeclaringNodeType(String)}
+ * of {@link NodeDefinitionTemplateBuilder#setDeclaringNodeType(String)}
* and {@link PropertyDefinitionTemplateBuilder#setDeclaringNodeType(String)} so the
* declaring node type is assigned to the template items instead of doing nothing.
- *
+ *
* This implementation of {@link DefinitionBuilderFactory} can be used with
* the {@link CompactNodeTypeDefReader} to produce node type definitions of type
* {@link NodeTypeTemplate} and a namespace map of type {@link NamespaceRegistry}.
diff --git a/src/main/java/org/apache/sling/testing/mock/jcr/MockUserManager.java b/src/main/java/org/apache/sling/testing/mock/jcr/MockUserManager.java
index e69d4a8..4edb3ef 100644
--- a/src/main/java/org/apache/sling/testing/mock/jcr/MockUserManager.java
+++ b/src/main/java/org/apache/sling/testing/mock/jcr/MockUserManager.java
@@ -115,7 +115,7 @@ public class MockUserManager implements UserManager {
/**
* Callback function for {@link MockUser#remove()} and {@link MockGroup#remove()} to
* invoke.
- *
+ *
* @param id the user or group id
* @param a the user or group object
* @return true if removed, false otherwise
@@ -194,8 +194,8 @@ public class MockUserManager implements UserManager {
/**
* Calculates the principal name, preferring the supplied id or
* fallback to the {@link Principal#getName()} value
- *
- * @param id the user or group id
+ *
+ * @param id the user or group id
* @param principal the principal
* @return the principal name
*/
@@ -209,8 +209,12 @@ public class MockUserManager implements UserManager {
/**
* Creates the user/group home folder if they don't exist yet
- *
+ *
* @param intermediatePath the parent path
+ * @param principalName Principal name
+ * @param isGroup Is group
+ * @return Existing or created node
+ * @throws RepositoryException Repository exception
*/
protected Node ensureAuthorizablePathExists(String intermediatePath, String principalName, boolean isGroup) throws RepositoryException {
if (intermediatePath == null) {