[java-metadata-aggregator] branch main updated: Javadoc fixes

Ian Young ian at iay.org.uk
Wed Jan 31 18:56:59 UTC 2024


This is an automated email from the git hooks/post-receive script.

iay pushed a commit to branch main
in repository java-metadata-aggregator.

View the commit online:
http://git.shibboleth.net/view/?p=java-metadata-aggregator.git;a=commit;h=5ddeb3932b4d2992040215874a9524b9bce5c0a6

The following commit(s) were added to refs/heads/main by this push:
     new 5ddeb39  Javadoc fixes
5ddeb39 is described below

commit 5ddeb3932b4d2992040215874a9524b9bce5c0a6
Author: Ian Young <ian at iay.org.uk>
AuthorDate: Wed Jan 31 18:56:54 2024 +0000

    Javadoc fixes
---
 .../metadata/pipeline/CompositeStage.java          |  4 +-
 .../metadata/pipeline/PipelineAndStrategy.java     |  3 +
 .../shibboleth/ScopeValidationStageLitmusTest.java | 96 +++++++++++++++++++---
 .../string/AsDomainNameStringValidatorTest.java    |  6 +-
 .../string/AsLiteralTailStringValidatorTest.java   |  6 +-
 5 files changed, 99 insertions(+), 16 deletions(-)

diff --git a/mda-framework/src/main/java/net/shibboleth/metadata/pipeline/CompositeStage.java b/mda-framework/src/main/java/net/shibboleth/metadata/pipeline/CompositeStage.java
index 12f5fd7..70e91bf 100644
--- a/mda-framework/src/main/java/net/shibboleth/metadata/pipeline/CompositeStage.java
+++ b/mda-framework/src/main/java/net/shibboleth/metadata/pipeline/CompositeStage.java
@@ -38,7 +38,7 @@ import net.shibboleth.shared.primitive.LoggerFactory;
  * composition to the be referenced and reused.
  *
  * <p>
- * Provides a simple implementation of the {@link Pipeline<T>} interface.
+ * Provides a simple implementation of the {@link Pipeline} interface.
  * </p>
  *
  * @param <T> type of metadata this stage, and its composed stages, operate upon
@@ -125,7 +125,7 @@ public class CompositeStage<T> extends AbstractStage<T> implements Pipeline<T> {
      * 
      * @param stages list of the stages that compose this stage
      *
-     * @deprecated Replaced by {@link setStages}.
+     * @deprecated Replaced by {@link #setStages}.
      * @see #setStages
      */
     @Deprecated(since="0.10.0", forRemoval=true)
diff --git a/mda-framework/src/main/java/net/shibboleth/metadata/pipeline/PipelineAndStrategy.java b/mda-framework/src/main/java/net/shibboleth/metadata/pipeline/PipelineAndStrategy.java
index 4c96833..e0b6f5a 100644
--- a/mda-framework/src/main/java/net/shibboleth/metadata/pipeline/PipelineAndStrategy.java
+++ b/mda-framework/src/main/java/net/shibboleth/metadata/pipeline/PipelineAndStrategy.java
@@ -34,6 +34,9 @@ public record PipelineAndStrategy<T>(@Nonnull Pipeline<T> pipeline, @Nonnull Pre
 
     /**
      * Constructor.
+     *
+     * @param pipeline a {@link Pipeline} to which items will be sent
+     * @param strategy a {@link Predicate} used to determine which items will be sent to the pipeline
      */
     public PipelineAndStrategy {
         Constraint.isNotNull(pipeline, "Pipeline can not be null");
diff --git a/mda-framework/src/test/java/net/shibboleth/metadata/dom/saml/shibboleth/ScopeValidationStageLitmusTest.java b/mda-framework/src/test/java/net/shibboleth/metadata/dom/saml/shibboleth/ScopeValidationStageLitmusTest.java
index 7a9fd9d..a2c7cdb 100644
--- a/mda-framework/src/test/java/net/shibboleth/metadata/dom/saml/shibboleth/ScopeValidationStageLitmusTest.java
+++ b/mda-framework/src/test/java/net/shibboleth/metadata/dom/saml/shibboleth/ScopeValidationStageLitmusTest.java
@@ -47,7 +47,12 @@ public class ScopeValidationStageLitmusTest extends AbstractTestNGSpringContextT
         stage = makeStage();
     }
 
-    /** Acquire the configured stage from the Spring context. */
+    /**
+     * Acquire the configured stage from the Spring context.
+     *
+     * @return the configured {@link Stage}
+     * @throws Exception if there's a problem
+     */
     private Stage<Element> makeStage() throws Exception {
         assert applicationContext != null;
         @SuppressWarnings("unchecked")
@@ -56,7 +61,15 @@ public class ScopeValidationStageLitmusTest extends AbstractTestNGSpringContextT
         return stage;
     }
 
-    /** Build a <code>shibmd:Scope</code> {@link Element}. */
+    /**
+     * Build a <code>shibmd:Scope</code> {@link Element}.
+     *
+     * @param document the {@link Document} to build the {@link Element} with
+     * @param value text content for the <code>Scope</code> element
+     * @param isRegex the required <code>regexp</code> attribute value
+     *
+     * @return the constructed {@link Element}
+     */
     private Element buildScope(final @Nonnull Document document, final String value, final boolean isRegex) {
         final Element element = ElementSupport.constructElement(document, ShibbolethMetadataSupport.SCOPE_NAME);
         AttributeSupport.appendAttribute(element, ShibbolethMetadataSupport.REGEXP_ATTRIB_NAME,
@@ -65,14 +78,28 @@ public class ScopeValidationStageLitmusTest extends AbstractTestNGSpringContextT
         return element;
     }
 
-    /** Build a {@link Document} containing an appropriate <code>shibmd:Scope</code> {@link Element}. */
+    /**
+     * Build a {@link Document} containing an appropriate <code>shibmd:Scope</code> {@link Element}.
+     *
+     * @param value text content for the <code>Scope</code> element
+     * @param isRegex the required <code>regexp</code> attribute value
+     *
+     * @return the constructed {@link Document}
+     */
     private @Nonnull Document buildDocument(final String value, final boolean isRegex) {
         final Document document = dBuilder.newDocument();
         document.appendChild(buildScope(document, value, isRegex));
         return document;
     }
 
-    /** Run the test stage on a single {@link Item}. */
+    /**
+     * Run the test stage on a single {@link Item}.
+     *
+     * @param item the {@link Item} on which to run the stage
+     * @return a {@link List} of any {@link ErrorStatus} metadata generated by the test
+     *
+     * @throws Exception if there's a problem
+     */
     private List<ErrorStatus> runTest(final Item<Element> item) throws Exception {
         final List<Item<Element>> coll = new ArrayList<>();
         coll.add(item);
@@ -81,7 +108,13 @@ public class ScopeValidationStageLitmusTest extends AbstractTestNGSpringContextT
         return errors;
     }
 
-    /** Test a value-regexp combination we expect to be accepted. */
+    /**
+     * Test a value-regexp combination we expect to be accepted.
+     *
+     * @param value text content for the <code>Scope</code> element
+     * @param isRegex the required <code>regexp</code> attribute value
+     * @throws Exception if there's a problem
+     */
     private void good(final String value, final boolean isRegex) throws Exception {
         final Item<Element> item = new DOMElementItem(buildDocument(value, isRegex));
         final List<ErrorStatus> errors = runTest(item);
@@ -91,17 +124,34 @@ public class ScopeValidationStageLitmusTest extends AbstractTestNGSpringContextT
         }
     }
 
-    /** Test a non-regexp value we expect to be accepted. */
+    /**
+     * Test a non-regexp value we expect to be accepted.
+     *
+     * @param value value to test
+     * @throws Exception if there's a problem
+     */
     private void good(final String value) throws Exception {
         good(value, false);
     }
 
-    /** Test a regexp value we expect to be accepted. */
+    /**
+     * Test a regexp value we expect to be accepted.
+     *
+     * @param value value to test
+     * @throws Exception if there's a problem
+     */
     private void goodRegexp(final String value) throws Exception {
         good(value, true);
     }
 
-    /** Test a value-regexp combination we expect to be rejected. */
+    /**
+     * Test a value-regexp combination we expect to be rejected.
+     *
+     * @param value text content for the <code>Scope</code> element
+     * @param isRegex the required <code>regexp</code> attribute value
+     * @param why expected text of the reason for rejection
+     * @throws Exception if there's a problem
+     */
     private void bad(final String value, final boolean isRegex, final String why) throws Exception {
         final Item<Element> item = new DOMElementItem(buildDocument(value, isRegex));
         final List<ErrorStatus> errors = runTest(item);
@@ -111,22 +161,44 @@ public class ScopeValidationStageLitmusTest extends AbstractTestNGSpringContextT
         Assert.assertTrue(message.contains(why), "error '" + message + "' didn't contain '" + why + "'");
     }
 
-    /** Test a non-regexp value we expect to be rejected. */
+    /**
+     * Test a non-regexp value we expect to be rejected.
+     *
+     * @param value text content for the <code>Scope</code> element
+     * @throws Exception if there's a problem
+     */
     private void bad(final String value) throws Exception {
         bad(value, false, "");
     }
 
-    /** Test a non-regexp value we expect to be rejected. */
+    /**
+     * Test a non-regexp value we expect to be rejected.
+     *
+     * @param value text content for the <code>Scope</code> element
+     * @param why expected text of the reason for rejection
+     * @throws Exception if there's a problem
+     */
     private void bad(final String value, final String why) throws Exception {
         bad(value, false, why);
     }
 
-    /** Test a regexp value we expect to be rejected. */
+    /**
+     * Test a regexp value we expect to be rejected.
+     *
+     * @param value text content for the <code>Scope</code> element
+     * @param why expected text of the reason for rejection
+     * @throws Exception if there's a problem
+     */
     private void badRegexp(final String value, final String why) throws Exception {
         bad(value, true, why);
     }
 
-    /** Test a regexp value we expect to be rejected. */
+    /**
+     * Test a regexp value we expect to be rejected.
+     *
+     * @param value text content for the <code>Scope</code> element
+     * @throws Exception if there's a problem
+     */
     private void badRegexp(final String value) throws Exception {
         bad(value, true, "");
     }
diff --git a/mda-framework/src/test/java/net/shibboleth/metadata/validate/string/AsDomainNameStringValidatorTest.java b/mda-framework/src/test/java/net/shibboleth/metadata/validate/string/AsDomainNameStringValidatorTest.java
index 3025a28..02102fb 100644
--- a/mda-framework/src/test/java/net/shibboleth/metadata/validate/string/AsDomainNameStringValidatorTest.java
+++ b/mda-framework/src/test/java/net/shibboleth/metadata/validate/string/AsDomainNameStringValidatorTest.java
@@ -32,7 +32,11 @@ public class AsDomainNameStringValidatorTest {
             return action;
         }
 
-        /** Constructor. */
+        /**
+         * Constructor.
+         *
+         * @param a {@link Action} to return from validations
+         */
         public CountingValidator(final @Nonnull Action a) {
             action = a;
         }
diff --git a/mda-framework/src/test/java/net/shibboleth/metadata/validate/string/AsLiteralTailStringValidatorTest.java b/mda-framework/src/test/java/net/shibboleth/metadata/validate/string/AsLiteralTailStringValidatorTest.java
index bd7cbc2..184e661 100644
--- a/mda-framework/src/test/java/net/shibboleth/metadata/validate/string/AsLiteralTailStringValidatorTest.java
+++ b/mda-framework/src/test/java/net/shibboleth/metadata/validate/string/AsLiteralTailStringValidatorTest.java
@@ -32,7 +32,11 @@ public class AsLiteralTailStringValidatorTest {
             return action;
         }
 
-        /** Constructor. */
+        /**
+         * Constructor.
+         *
+         * @param a {@link Action} to return from validations
+         */
         public CountingCapturingValidator(final @Nonnull Action a) {
             action = a;
         }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list