You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by dk...@apache.org on 2018/05/16 05:48:38 UTC

[sling-org-apache-sling-scripting-jsp-taglib] branch master updated: Correcting various JavaDoc issues

This is an automated email from the ASF dual-hosted git repository.

dklco pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-jsp-taglib.git


The following commit(s) were added to refs/heads/master by this push:
     new 7a12b11  Correcting various JavaDoc issues
7a12b11 is described below

commit 7a12b11ffe31c79965d3181f7a118470fab07702
Author: Dan Klco <dk...@apache.org>
AuthorDate: Tue May 15 22:47:16 2018 -0700

    Correcting various JavaDoc issues
---
 .../apache/sling/scripting/jsp/taglib/GetParentTag.java |  4 ++--
 .../sling/scripting/jsp/taglib/GetParentsTag.java       | 17 +++++++++--------
 .../sling/scripting/jsp/taglib/ListChildrenTag.java     |  2 +-
 .../sling/scripting/jsp/taglib/SlingFunctions.java      |  6 +++++-
 4 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/src/main/java/org/apache/sling/scripting/jsp/taglib/GetParentTag.java b/src/main/java/org/apache/sling/scripting/jsp/taglib/GetParentTag.java
index ec26142..a39c1c3 100644
--- a/src/main/java/org/apache/sling/scripting/jsp/taglib/GetParentTag.java
+++ b/src/main/java/org/apache/sling/scripting/jsp/taglib/GetParentTag.java
@@ -71,7 +71,7 @@ public class GetParentTag extends TagSupport {
 	/**
 	 * Gets the resource.
 	 * 
-	 * @return the base resource
+	 * @return the resource
 	 */
 	public Resource getResource() {
 		return resource;
@@ -98,7 +98,7 @@ public class GetParentTag extends TagSupport {
 	/**
 	 * Sets the resource.
 	 * 
-	 * @param base
+	 * @param resource
 	 *            the new resource
 	 */
 	public void setResource(Resource resource) {
diff --git a/src/main/java/org/apache/sling/scripting/jsp/taglib/GetParentsTag.java b/src/main/java/org/apache/sling/scripting/jsp/taglib/GetParentsTag.java
index 7c0d2ed..a0b4889 100644
--- a/src/main/java/org/apache/sling/scripting/jsp/taglib/GetParentsTag.java
+++ b/src/main/java/org/apache/sling/scripting/jsp/taglib/GetParentsTag.java
@@ -55,7 +55,7 @@ public class GetParentsTag extends TagSupport {
 		Resource current = resource;
 		while (true) {
 			Resource parent = current.getParent();
-			if(parent != null){
+			if (parent != null) {
 				parents.add(parent);
 				current = parent;
 			} else {
@@ -63,9 +63,9 @@ public class GetParentsTag extends TagSupport {
 			}
 		}
 		Collections.reverse(parents);
-		
-		int depth = Integer.parseInt(startDepth,10);
-		if(depth <= parents.size()){
+
+		int depth = Integer.parseInt(startDepth, 10);
+		if (depth <= parents.size()) {
 			parents = parents.subList(depth, parents.size());
 		} else {
 			parents.clear();
@@ -80,7 +80,7 @@ public class GetParentsTag extends TagSupport {
 	/**
 	 * Gets the resource.
 	 * 
-	 * @return the base resource
+	 * @return the resource
 	 */
 	public Resource getResource() {
 		return resource;
@@ -107,7 +107,7 @@ public class GetParentsTag extends TagSupport {
 	/**
 	 * Sets the resource.
 	 * 
-	 * @param base
+	 * @param resource
 	 *            the new resource
 	 */
 	public void setResource(Resource resource) {
@@ -116,10 +116,11 @@ public class GetParentsTag extends TagSupport {
 
 	/**
 	 * The depth at which to start, for example given a path of:
-	 * /content/page1/page2/page3 and a start depth of 3, the parents
-	 * page2/page3 would be returned
+	 * /content/page1/page2/page3 and a start depth of 3, the parents page2/page3
+	 * would be returned
 	 * 
 	 * @param startDepth
+	 *            the start depth from which to retrieve the parent resources
 	 */
 	public void setStartDepth(String startDepth) {
 		this.startDepth = startDepth;
diff --git a/src/main/java/org/apache/sling/scripting/jsp/taglib/ListChildrenTag.java b/src/main/java/org/apache/sling/scripting/jsp/taglib/ListChildrenTag.java
index b58674b..f04e566 100644
--- a/src/main/java/org/apache/sling/scripting/jsp/taglib/ListChildrenTag.java
+++ b/src/main/java/org/apache/sling/scripting/jsp/taglib/ListChildrenTag.java
@@ -26,7 +26,7 @@ import org.slf4j.LoggerFactory;
 
 /**
  * Tag for listing the children of a Resource. The children will be returned as
- * an Iterator<Resource> in the specified variable.
+ * an Iterator of Resource objects in the specified variable.
  */
 public class ListChildrenTag extends TagSupport {
 
diff --git a/src/main/java/org/apache/sling/scripting/jsp/taglib/SlingFunctions.java b/src/main/java/org/apache/sling/scripting/jsp/taglib/SlingFunctions.java
index e4d79cc..12425a2 100644
--- a/src/main/java/org/apache/sling/scripting/jsp/taglib/SlingFunctions.java
+++ b/src/main/java/org/apache/sling/scripting/jsp/taglib/SlingFunctions.java
@@ -50,6 +50,8 @@ public class SlingFunctions {
 	 * @param adapter
 	 *            the class to which to adapt the adaptable
 	 * @return the adapted class instance
+	 * @throws ClassNotFoundException
+	 *             the adapter class was not found by the Classloader
 	 */
 	public static Object adaptTo(Adaptable adaptable, String adapter) throws ClassNotFoundException {
 		log.trace("adaptTo");
@@ -88,6 +90,8 @@ public class SlingFunctions {
 	 * language.
 	 * 
 	 * @param resourceResolver
+	 *            the resource resolver to use to find resources with the specified
+	 *            query
 	 * @param query
 	 *            The query string to use to find the resources.
 	 * @param language
@@ -255,7 +259,7 @@ public class SlingFunctions {
 	 *            the key for the value to retrieve
 	 * @param defaultOrType
 	 *            either the default value or the class to which to coerce the value
-	 * @return
+	 * @return the value for the specified key or the default
 	 */
 	@SuppressWarnings("unchecked")
 	public static final <E> E getValue(ValueMap properties, String key, Object defaultOrType) {

-- 
To stop receiving notification emails like this one, please contact
dklco@apache.org.