You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 10:21:28 UTC

[sling-org-apache-sling-testing-sling-mock] 19/26: fix some javadoc errors and warnings

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

rombert pushed a commit to annotated tag org.apache.sling.testing.sling-mock-1.1.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit 5b4c01c3ba1fee60feb73c641e53a8973bbf6013
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Thu Nov 6 00:32:42 2014 +0000

    fix some javadoc errors and warnings
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock@1637018 13f79535-47bb-0310-9956-ffa450edef68
---
 .../mock/sling/context/SlingContextImpl.java       | 10 ++-
 .../testing/mock/sling/junit/SlingContext.java     | 75 +++-------------------
 .../mock/sling/junit/SlingContextCallback.java     |  4 +-
 .../sling/servlet/MockSlingHttpServletRequest.java |  1 +
 4 files changed, 22 insertions(+), 68 deletions(-)

diff --git a/src/main/java/org/apache/sling/testing/mock/sling/context/SlingContextImpl.java b/src/main/java/org/apache/sling/testing/mock/sling/context/SlingContextImpl.java
index 65076aa..229b1e1 100644
--- a/src/main/java/org/apache/sling/testing/mock/sling/context/SlingContextImpl.java
+++ b/src/main/java/org/apache/sling/testing/mock/sling/context/SlingContextImpl.java
@@ -104,6 +104,7 @@ public class SlingContextImpl {
     
     /**
      * Initialize mocked resource resolver factory.
+     * @return Resource resolver factory
      */
     protected ResourceResolverFactory newResourceResolverFactory() {
         return ContextResourceResolverFactory.get(this.resourceResolverType);
@@ -277,6 +278,7 @@ public class SlingContextImpl {
 
     /**
      * Registers a service in the mocked OSGi environment.
+     * @param <T> Service type
      * @param service Service instance
      * @return Registered service instance
      */
@@ -286,6 +288,7 @@ public class SlingContextImpl {
 
     /**
      * Registers a service in the mocked OSGi environment.
+     * @param <T> Service type
      * @param serviceClass Service class
      * @param service Service instance
      * @return Registered service instance
@@ -296,6 +299,7 @@ public class SlingContextImpl {
 
     /**
      * Registers a service in the mocked OSGi environment.
+     * @param <T> Service type
      * @param serviceClass Service class
      * @param service Service instance
      * @param properties Service properties (optional)
@@ -314,6 +318,7 @@ public class SlingContextImpl {
     /**
      * Injects dependencies, activates and registers a service in the mocked
      * OSGi environment.
+     * @param <T> Service type
      * @param service Service instance
      * @return Registered service instance
      */
@@ -324,6 +329,7 @@ public class SlingContextImpl {
     /**
      * Injects dependencies, activates and registers a service in the mocked
      * OSGi environment.
+     * @param <T> Service type
      * @param service Service instance
      * @param properties Service properties (optional)
      * @return Registered service instance
@@ -337,6 +343,7 @@ public class SlingContextImpl {
 
     /**
      * Lookup a single service
+     * @param <ServiceType> Service type
      * @param serviceType The type (interface) of the service.
      * @return The service instance, or null if the service is not available.
      */
@@ -346,10 +353,11 @@ public class SlingContextImpl {
 
     /**
      * Lookup one or several services
+     * @param <ServiceType> Service type
      * @param serviceType The type (interface) of the service.
      * @param filter An optional filter (LDAP-like, see OSGi spec)
      * @return The services object or null.
-     * @throws InvalidServiceFilterSyntaxException If the <code>filter</code>
+     * @throws org.apache.sling.api.scripting.InvalidServiceFilterSyntaxException If the <code>filter</code>
      *             string is not a valid OSGi service filter string.
      */
     public final <ServiceType> ServiceType[] getServices(final Class<ServiceType> serviceType, final String filter) {
diff --git a/src/main/java/org/apache/sling/testing/mock/sling/junit/SlingContext.java b/src/main/java/org/apache/sling/testing/mock/sling/junit/SlingContext.java
index 51ea608..56413d3 100644
--- a/src/main/java/org/apache/sling/testing/mock/sling/junit/SlingContext.java
+++ b/src/main/java/org/apache/sling/testing/mock/sling/junit/SlingContext.java
@@ -37,34 +37,15 @@ public final class SlingContext extends SlingContextImpl implements TestRule {
     private final TestRule delegate;
 
     /**
-     * Initialize Sling context.
-     * <p>
-     * If context is initialized with:
-     * </p>
-     * <ul>
-     * <li>No resource resolver type - default is used
-     * {@link MockSling#DEFAULT_RESOURCERESOLVER_TYPE}.</li>
-     * <li>One resource resolver type - exactly this is used.</li>
-     * <li>More than one: all unit test methods are executed for all resource
-     * resolver types using {@link ListGenerator}.</li>
-     * </ul>
+     * Initialize Sling context with default resource resolver type:
+     * {@link org.apache.sling.testing.mock.sling.MockSling#DEFAULT_RESOURCERESOLVER_TYPE}.
      */
     public SlingContext() {
         this(null, null, null);
     }
 
     /**
-     * Initialize Sling context.
-     * <p>
-     * If context is initialized with:
-     * </p>
-     * <ul>
-     * <li>No resource resolver type - default is used
-     * {@link MockSling#DEFAULT_RESOURCERESOLVER_TYPE}.</li>
-     * <li>One resource resolver type - exactly this is used.</li>
-     * <li>More than one: all unit test methods are executed for all resource
-     * resolver types using {@link ListGenerator}.</li>
-     * </ul>
+     * Initialize Sling context with resource resolver type.
      * @param resourceResolverType Resource resolver type.
      */
     public SlingContext(final ResourceResolverType resourceResolverType) {
@@ -72,17 +53,8 @@ public final class SlingContext extends SlingContextImpl implements TestRule {
     }
 
     /**
-     * Initialize Sling context.
-     * <p>
-     * If context is initialized with:
-     * </p>
-     * <ul>
-     * <li>No resource resolver type - default is used
-     * {@link MockSling#DEFAULT_RESOURCERESOLVER_TYPE}.</li>
-     * <li>One resource resolver type - exactly this is used.</li>
-     * <li>More than one: all unit test methods are executed for all resource
-     * resolver types using {@link ListGenerator}.</li>
-     * </ul>
+     * Initialize Sling context with default resource resolver type:
+     * {@link org.apache.sling.testing.mock.sling.MockSling#DEFAULT_RESOURCERESOLVER_TYPE}.
      * @param setUpCallback Allows the application to register an own callback
      *            function that is called after the built-in setup rules are
      *            executed.
@@ -92,17 +64,7 @@ public final class SlingContext extends SlingContextImpl implements TestRule {
     }
 
     /**
-     * Initialize Sling context.
-     * <p>
-     * If context is initialized with:
-     * </p>
-     * <ul>
-     * <li>No resource resolver type - default is used
-     * {@link MockSling#DEFAULT_RESOURCERESOLVER_TYPE}.</li>
-     * <li>One resource resolver type - exactly this is used.</li>
-     * <li>More than one: all unit test methods are executed for all resource
-     * resolver types using {@link ListGenerator}.</li>
-     * </ul>
+     * Initialize Sling context with resource resolver type.
      * @param setUpCallback Allows the application to register an own callback
      *            function that is called after the built-in setup rules are
      *            executed.
@@ -113,17 +75,8 @@ public final class SlingContext extends SlingContextImpl implements TestRule {
     }
 
     /**
-     * Initialize Sling context.
-     * <p>
-     * If context is initialized with:
-     * </p>
-     * <ul>
-     * <li>No resource resolver type - default is used
-     * {@link MockSling#DEFAULT_RESOURCERESOLVER_TYPE}.</li>
-     * <li>One resource resolver type - exactly this is used.</li>
-     * <li>More than one: all unit test methods are executed for all resource
-     * resolver types using {@link ListGenerator}.</li>
-     * </ul>
+     * Initialize Sling context with default resource resolver type:
+     * {@link org.apache.sling.testing.mock.sling.MockSling#DEFAULT_RESOURCERESOLVER_TYPE}.
      * @param setUpCallback Allows the application to register an own callback
      *            function that is called after the built-in setup rules are
      *            executed.
@@ -136,17 +89,7 @@ public final class SlingContext extends SlingContextImpl implements TestRule {
     }
     
     /**
-     * Initialize Sling context.
-     * <p>
-     * If context is initialized with:
-     * </p>
-     * <ul>
-     * <li>No resource resolver type - default is used
-     * {@link MockSling#DEFAULT_RESOURCERESOLVER_TYPE}.</li>
-     * <li>One resource resolver type - exactly this is used.</li>
-     * <li>More than one: all unit test methods are executed for all resource
-     * resolver types using {@link ListGenerator}.</li>
-     * </ul>
+     * Initialize Sling context with resource resolver type.
      * @param setUpCallback Allows the application to register an own callback
      *            function that is called after the built-in setup rules are
      *            executed.
diff --git a/src/main/java/org/apache/sling/testing/mock/sling/junit/SlingContextCallback.java b/src/main/java/org/apache/sling/testing/mock/sling/junit/SlingContextCallback.java
index 913b832..908301c 100644
--- a/src/main/java/org/apache/sling/testing/mock/sling/junit/SlingContextCallback.java
+++ b/src/main/java/org/apache/sling/testing/mock/sling/junit/SlingContextCallback.java
@@ -24,13 +24,15 @@ import org.apache.sling.api.resource.PersistenceException;
 
 /**
  * Callback-interface for application-specific setup and teardown operations to
- * customize the {@link AemContext} JUnit rule.
+ * customize the {@link SlingContext} JUnit rule.
  */
 public interface SlingContextCallback {
 
     /**
      * Execute callback action
      * @param context Sling context
+     * @throws IOException
+     * @throws PersistenceException
      */
     void execute(SlingContext context) throws IOException, PersistenceException;
 
diff --git a/src/main/java/org/apache/sling/testing/mock/sling/servlet/MockSlingHttpServletRequest.java b/src/main/java/org/apache/sling/testing/mock/sling/servlet/MockSlingHttpServletRequest.java
index eaad0bf..b776bf4 100644
--- a/src/main/java/org/apache/sling/testing/mock/sling/servlet/MockSlingHttpServletRequest.java
+++ b/src/main/java/org/apache/sling/testing/mock/sling/servlet/MockSlingHttpServletRequest.java
@@ -110,6 +110,7 @@ public class MockSlingHttpServletRequest extends SlingAdaptable implements Sling
 
     /**
      * @param resourceResolver Resource resolver
+     * @param bundleContext Bundle context
      */
     public MockSlingHttpServletRequest(ResourceResolver resourceResolver, BundleContext bundleContext) {
         this.resourceResolver = resourceResolver;

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.