[java-idp-integration-tests] branch master updated: JPAR-131 - Fix doclint issues

Ian Young ian at iay.org.uk
Mon Dec 30 11:19:49 EST 2019


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

iay pushed a commit to branch master
in repository java-idp-integration-tests.

View the commit online:
http://git.shibboleth.net/view/?p=java-idp-integration-tests.git;a=commit;h=0af473ec97271f31c7d45d48e3521db2115931cc

The following commit(s) were added to refs/heads/master by this push:
       new  0af473e   JPAR-131 - Fix doclint issues
0af473e is described below

commit 0af473ec97271f31c7d45d48e3521db2115931cc
Author: Ian Young <ian at iay.org.uk>
AuthorDate: Mon Dec 30 16:19:44 2019 +0000

    JPAR-131 - Fix doclint issues
    
    https://issues.shibboleth.net/jira/browse/JPAR-131
---
 .../shibboleth/idp/test/AbstractServerProcess.java |   2 +-
 .../shibboleth/idp/test/BaseIntegrationTest.java   | 111 +++++++++++++++------
 .../java/net/shibboleth/idp/test/BrowserData.java  |   8 +-
 .../idp/test/CustomSauceOnDemandTestListener.java  |   2 -
 .../idp/test/cas/CASIntegrationTest.java           |   3 +-
 .../test/saml1/AbstractSAML1IntegrationTest.java   |   2 +-
 .../test/saml2/AbstractSAML2IntegrationTest.java   |  20 ++--
 .../saml2/SAML2AttributeQueryIntegrationTest.java  |  10 +-
 8 files changed, 106 insertions(+), 52 deletions(-)

diff --git a/src/test/java/net/shibboleth/idp/test/AbstractServerProcess.java b/src/test/java/net/shibboleth/idp/test/AbstractServerProcess.java
index e59fee0..d8a96b8 100644
--- a/src/test/java/net/shibboleth/idp/test/AbstractServerProcess.java
+++ b/src/test/java/net/shibboleth/idp/test/AbstractServerProcess.java
@@ -408,7 +408,7 @@ public class AbstractServerProcess extends AbstractInitializableComponent implem
          * Constructor.
          *
          * @param retries maximum number of times to retry
-         * @param millis length of time to sleep in milliseconds between retry attempts
+         * @param retryInterval length of time to sleep in milliseconds between retry attempts
          */
         public FiniteWaitServiceUnavailableRetryStrategy(int retries, int retryInterval) {
             maxRetries = retries;
diff --git a/src/test/java/net/shibboleth/idp/test/BaseIntegrationTest.java b/src/test/java/net/shibboleth/idp/test/BaseIntegrationTest.java
index 3f5d378..5f891f4 100644
--- a/src/test/java/net/shibboleth/idp/test/BaseIntegrationTest.java
+++ b/src/test/java/net/shibboleth/idp/test/BaseIntegrationTest.java
@@ -88,33 +88,48 @@ import com.saucelabs.testng.SauceOnDemandAuthenticationProvider;
 
 /**
  * Abstract integration test which tests the IdP via the testbed using Selenium.
- * <p/>
+ * 
+ * <p>
  * The Maven POM unpacks the IdP and Jetty distributions, adds test views and flows from idp-conf, and adds deployment
  * of the testbed. The testbed provides an in-memory directory server.
- * <p/>
+ * </p>
+ * 
+ * <p>
  * The IdP and testbed webapps are run via Jetty's start.jar in a separate {@link Process}, see
  * {@link JettyServerProcess}.
- * <p/>
+ * </p>
+ * 
+ * <p>
  * Each concrete subclass is associated with an idp.home directory, which is created by copying the unpacked IdP
- * distribution, see {@link #setUpPaths()}. Consequently, each test method in a class uses the same idp.home directory.
+ * distribution, see {@link #setUpIdPPaths()}. Consequently, each test method in a class uses the same idp.home directory.
  * This per-class idp.home directory is deleted only if all tests pass. The per-class idp.home directory name is a
  * timestamp whose pattern is defined by {@link #idpHomePattern}.
  * </p>
+ * 
+ * <p>
  * Ports for Jetty and the in-memory directory server will be automatically selected between the range of 20000 - 30000,
  * see {@link #setUpAvailablePorts()}.
  * </p>
+ * 
+ * <p>
  * Test methods should start clients via {@link #startSeleniumClient(BrowserData)} and start the server via
  * {@link #startJettyServer()}.
- * <p/>
+ * </p>
+ * 
+ * <p>
  * By default, tests run using a local browser. By default the {@link HtmlUnitDriver} will be used. To override, set the
  * {@link #driver} to the desired {@link WebDriver}. See {@link #startSeleniumClient(BrowserData)} for one way to
  * override.
- * <p/>
+ * </p>
+ * 
+ * <p>
  * To run tests using remote browsers provided by Sauce Labs, set the {@link #SELENIUM_IS_REMOTE} system property and
  * set the {@link #SERVER_ADDRESS_PROPERTY} to the publicly accessible IP address of the server to which clients should
  * connect to. You will also probably need to set the {@link #PRIVATE_SERVER_ADDRESS_PROPERTY} to the IP address that
  * the server should be run on, which might be the same as the {@link #SERVER_ADDRESS_PROPERTY}.
- * <p/>
+ * </p>
+ * 
+ * <p>
  * With Sauce Labs, the browsers tested are defined by {@link SauceBrowserDataProvider#SAUCE_ONDEMAND_BROWSERS} in the
  * environment, which is a JSON string. See
  * <a href="https://docs.saucelabs.com/ci-integrations/jenkins/">https://docs.saucelabs.com/ci-integrations/jenkins/</a>
@@ -123,14 +138,21 @@ import com.saucelabs.testng.SauceOnDemandAuthenticationProvider;
  * 'firefox' browser, manipulate the {@link #desiredCapabilities} before calling
  * {@link #startSeleniumClient(BrowserData)}, for example:
  * </p>
+ * 
+ * <pre>
  * desiredCapabilities.setCapability("platform", "win8");
- * </p>
- * or
- * </p>
+ * </pre>
+ * 
+ * <p>or</p>
+ * 
+ * <pre>
  * desiredCapabilities.setCapability(org.openqa.selenium.remote.CapabilityType.Platform,
  * org.openqa.selenium.Platform.WIN8);
- * </p>
+ * </pre>
+ * 
+ * <p>
  * See {@link org.openqa.selenium.Platform}. Or, configure a new TestNG data provider.
+ * </p>
  */
 @Listeners({CustomSauceOnDemandTestListener.class})
 public abstract class BaseIntegrationTest
@@ -487,7 +509,7 @@ public abstract class BaseIntegrationTest
      * Must run after {@link #setUpEndpoints()} so that {@link PropertiesWithComments} does not add a breaking "=" to
      * "testbed.xml".
      * 
-     * @throws IOException
+     * @throws IOException ...
      */
     @BeforeClass(enabled = true, dependsOnMethods = {"setUpEndpoints"}) // must run after setUpEndpoints
     public void setUpJettyTestbed() throws IOException {
@@ -522,17 +544,25 @@ public abstract class BaseIntegrationTest
  
     /**
      * Set up addresses the web server listens on and clients connect to.
-     * <p/>
+     * 
+     * <p>
      * If the {@link #SERVER_ADDRESS_PROPERTY} system property exists, use it as the non-secure and secure server
      * address.
-     * <p/>
+     * </p>
+     * 
+     * <p>
      * If the {@link #PRIVATE_SERVER_ADDRESS_PROPERTY} system property exists, use it as the non-secure and secure
      * private server address.
+     * </p>
+     * 
      * <p>
      * The private server address may be different than the server address, for example, when the server is behind NAT.
-     * <p/>
+     * </p>
+     * 
+     * <p>
      * If the {@link #SERVER_ADDRESS_PROPERTY} system property exists but {@link #PRIVATE_SERVER_ADDRESS_PROPERTY} does
      * not, use it as both the non-secure and secure (1) server and (2) private server address.
+     * </p>
      */
     @BeforeClass
     public void setUpAddresses() {
@@ -668,7 +698,7 @@ public abstract class BaseIntegrationTest
     /**
      * Set up debug logging for the IdP.
      * 
-     * @throws Exception
+     * @throws Exception if something bad happens
      */
     @BeforeClass(enabled = true, dependsOnMethods = {"setUpIdPPaths"})
     public void setUpDebugLogging() throws Exception {
@@ -688,7 +718,7 @@ public abstract class BaseIntegrationTest
     /**
      * Set up example metadata provider for the IdP.
      * 
-     * @throws Exception
+     * @throws Exception if something bad happens
      */
     @BeforeClass(enabled = true, dependsOnMethods = {"setUpIdPPaths"})
     public void setUpExampleMetadataProvider() throws Exception {
@@ -704,7 +734,7 @@ public abstract class BaseIntegrationTest
     /**
      * Add StorageServlet to IdP webapp.
      * 
-     * @throws Exception
+     * @throws Exception if something bad happens
      */
     @BeforeClass(enabled = true, dependsOnMethods = {"setUpIdPPaths"})
     public void setUpStorageServlet() throws Exception {
@@ -758,7 +788,7 @@ public abstract class BaseIntegrationTest
     /**
      * Initialize XMLObject support classes.
      * 
-     * @throws InitializationException
+     * @throws InitializationException ...
      */
     @BeforeClass(dependsOnMethods = {"setIdPXMLSecurityManager"})
     public void initializeXMLbjectSupport() throws InitializationException {
@@ -770,12 +800,16 @@ public abstract class BaseIntegrationTest
     /**
      * Start the web driver.
      * 
-     * If the test is local, as defined by {@link #isLocal()}, then start a {@link HtmlUnitDriver}. Otherwise, start a
+     * If the test is remote, as defined by {@link #isRemote()}, then start a
      * {@link RemoteWebDriver} on Sauce Labs.
+     * Otherwise, start a {@link HtmlUnitDriver}.
      * 
+     * <p>
      * Note : this method must be called in each test.
+     * </p>
      * 
      * @param browserData the browser data
+     * 
      * @throws Exception if an error occurs
      */
     public void startSeleniumClient(@Nullable final BrowserData browserData) throws Exception {
@@ -807,10 +841,12 @@ public abstract class BaseIntegrationTest
     /**
      * Start the IdP server. Uses Jetty by default, and Tomcat if the system property 'tomcat' is true.
      * 
+     * <p>
      * Note : this method must be called in each test to allow for customization of the IdP configuration before the
      * server is started.
+     * </p>
      * 
-     * @throws ComponentInitializationException
+     * @throws ComponentInitializationException ...
      */
     public void startServer() throws ComponentInitializationException {
         if (Boolean.getBoolean("tomcat")) {
@@ -945,13 +981,18 @@ public abstract class BaseIntegrationTest
     /**
      * Replace contents of a file.
      * 
+     * <p>
      * The regular expression is replaced with the replacement string and the file is over-written.
+     * </p>
      * 
-     * See {@link String#replaceAll(String, String)} and {@link Files#write(Path, byte[], java.nio.file.OpenOption...).
+     * <p>
+     * See {@link String#replaceAll(String, String)} and {@link Files#write(Path, byte[], java.nio.file.OpenOption...)}.
+     * </p>
      * 
      * @param pathToFile path to the file
      * @param regex regular expression to be replaced
      * @param replacement string to be substituted for each match
+     * 
      * @throws IOException if the file cannot be overwritten
      */
     public static void replaceFile(@Nonnull final Path pathToFile, @Nonnull @NotEmpty final String regex,
@@ -1015,7 +1056,7 @@ public abstract class BaseIntegrationTest
     /**
      * Enable per attribute consent.
      *
-     * @throws IOException
+     * @throws IOException ...
      */
     public void enablePerAttributeConsent() throws IOException {
         replaceIdPProperty("idp.consent.allowPerAttribute", "true");
@@ -1024,7 +1065,7 @@ public abstract class BaseIntegrationTest
     /**
      * Activate terms-of-use flow and include attribute statement.
      *
-     * @throws Exception
+     * @throws Exception if something bad happens
      */
     public void enableCustomRelyingPartyConfiguration() throws Exception {
         final Path pathToRelyingPartyXML = Paths.get("conf", "relying-party.xml");
@@ -1045,7 +1086,7 @@ public abstract class BaseIntegrationTest
     /**
      * Disable Local Storage in conf/idp.properties.
      * 
-     * @throws Exception
+     * @throws Exception if something bad happens
      */
     public void disableLocalStorage() throws Exception {
         replaceIdPProperty("idp.storage.htmlLocalStorage", "false");
@@ -1054,7 +1095,7 @@ public abstract class BaseIntegrationTest
     /**
      * Enable logout in conf/idp.properties.
      * 
-     * @throws Exception
+     * @throws Exception if something bad happens
      */
     public void enableLogout() throws Exception {
         // server-side storage of user sessions
@@ -1070,7 +1111,7 @@ public abstract class BaseIntegrationTest
     /**
      * Enable CAS protocol for the default relying party.
      *
-     * @throws IOException
+     * @throws IOException ...
      */
     public void enableCASProtocol() throws IOException {
         final Path pathToRelyingPartyXML = Paths.get("conf", "relying-party.xml");
@@ -1084,7 +1125,7 @@ public abstract class BaseIntegrationTest
     /**
      * Add localhost to CAS service definition.
      * 
-     * @throws IOException
+     * @throws IOException ...
      */
     public void enableLocalhostCASServiceDefinition() throws IOException {
         final Path pathToCASProtocolXML = Paths.get("conf", "cas-protocol.xml");
@@ -1099,7 +1140,7 @@ public abstract class BaseIntegrationTest
     /**
      * Release eduPersonAffiliation by adding a wildcard regex to attribute-filter.xml.
      * 
-     * @throws IOException
+     * @throws IOException ...
      */
     public void enableLocalhostCASAttributes() throws IOException {
         final Path pathToLogbackXML = Paths.get("conf", "attribute-filter.xml");
@@ -1112,7 +1153,7 @@ public abstract class BaseIntegrationTest
     /**
      * Use attribute-resolver-ldap.xml instead of attribute-resolver.xml.
      * 
-     * @throws IOException
+     * @throws IOException ...
      */
     public void enableAttributeResolverLDAP() throws IOException {
         final Path pathToServicesXML = Paths.get("conf", "services.xml");
@@ -1124,7 +1165,7 @@ public abstract class BaseIntegrationTest
     /**
      * Log unencrypted SAML.
      * 
-     * @throws IOException
+     * @throws IOException ...
      */
     public void logUnencryptedSAML() throws IOException {
         final Path pathToLogbackXML = Paths.get("conf", "logback.xml");
@@ -1149,6 +1190,8 @@ public abstract class BaseIntegrationTest
 
     /**
      * Set up HtmlUnitDriver web driver.
+     * 
+     * @throws IOException ...
      */
     @BeforeMethod(enabled = false)
     public void setUpHtmlUnitDriver() throws IOException {
@@ -1158,6 +1201,8 @@ public abstract class BaseIntegrationTest
 
     /**
      * Set up Firefox web driver.
+     * 
+     * @throws IOException ...
      */
     @BeforeMethod(enabled = false)
     public void setUpFirefoxDriver() throws IOException {
@@ -1169,10 +1214,12 @@ public abstract class BaseIntegrationTest
     /**
      * Set up remote web driver to Sauce Labs.
      * 
+     * <p>
      * Prefers credentials from system properties/environment variables as provided by Jenkins over ~/.sauce-ondemand,
      * see {@link SauceOnDemandAuthentication}.
+     * </p>
      * 
-     * @throws IOException
+     * @throws IOException ...
      */
     @BeforeMethod(enabled = false, dependsOnMethods = {"setUpTestName"})
     public void setUpSauceDriver() throws IOException {
diff --git a/src/test/java/net/shibboleth/idp/test/BrowserData.java b/src/test/java/net/shibboleth/idp/test/BrowserData.java
index 1ddf7b4..17beb19 100644
--- a/src/test/java/net/shibboleth/idp/test/BrowserData.java
+++ b/src/test/java/net/shibboleth/idp/test/BrowserData.java
@@ -26,7 +26,7 @@ import net.shibboleth.utilities.java.support.primitive.StringSupport;
 
 /**
  * Bean which represents browser/OS/version triplet as provided by
- * {@link net.shibboleth.idp.test.BaseIntegrationTest#browserDataProvider}.
+ * {@link BaseIntegrationTest#sauceOnDemandBrowserDataProvider}.
  */
 public class BrowserData {
 
@@ -70,6 +70,8 @@ public class BrowserData {
      * Set the browser name.
      * 
      * @param browser the browser name
+     * 
+     * @return the {@link BrowserData}
      */
     public BrowserData setBrowser(@Nonnull @NotEmpty final String browser) {
         browserName = Constraint.isNotNull(StringSupport.trimOrNull(browser), "Browser cannot be null nor empty");
@@ -80,6 +82,8 @@ public class BrowserData {
      * Set the browser version.
      * 
      * @param version the browser version
+     * 
+     * @return the {@link BrowserData}
      */
     public BrowserData setVersion(@Nonnull @NotEmpty final String version) {
         browserVersion = Constraint.isNotNull(StringSupport.trimOrNull(version), "Version cannot be null nor empty");
@@ -90,6 +94,8 @@ public class BrowserData {
      * Set the browser OS.
      * 
      * @param os the browser OS
+     * 
+     * @return the {@link BrowserData}
      */
     public BrowserData setOS(@Nonnull @NotEmpty final String os) {
         browserOS = Constraint.isNotNull(StringSupport.trimOrNull(os), "OS cannot be null nor empty");
diff --git a/src/test/java/net/shibboleth/idp/test/CustomSauceOnDemandTestListener.java b/src/test/java/net/shibboleth/idp/test/CustomSauceOnDemandTestListener.java
index 16a808e..24eee79 100644
--- a/src/test/java/net/shibboleth/idp/test/CustomSauceOnDemandTestListener.java
+++ b/src/test/java/net/shibboleth/idp/test/CustomSauceOnDemandTestListener.java
@@ -64,8 +64,6 @@ public class CustomSauceOnDemandTestListener extends SauceOnDemandTestListener {
      * Print public job link if {@link #printPublicJobLinkOnSuccess} is true.
      * 
      * {@inheritDoc}
-     * 
-     * @param tr
      */
     @Override
     public void onTestSuccess(ITestResult tr) {
diff --git a/src/test/java/net/shibboleth/idp/test/cas/CASIntegrationTest.java b/src/test/java/net/shibboleth/idp/test/cas/CASIntegrationTest.java
index 1f545d2..91e19fc 100644
--- a/src/test/java/net/shibboleth/idp/test/cas/CASIntegrationTest.java
+++ b/src/test/java/net/shibboleth/idp/test/cas/CASIntegrationTest.java
@@ -69,7 +69,8 @@ public class CASIntegrationTest extends BaseIntegrationTest {
      * 
      * This method is likely fragile across browsers, it is known to work with Firefox and HtmlUnit.
      * 
-     * @param pageSource
+     * @param pageSource ...
+     * 
      * @return the CAS service response.
      */
     @Nullable
diff --git a/src/test/java/net/shibboleth/idp/test/saml1/AbstractSAML1IntegrationTest.java b/src/test/java/net/shibboleth/idp/test/saml1/AbstractSAML1IntegrationTest.java
index 50dc1e3..c2feed7 100644
--- a/src/test/java/net/shibboleth/idp/test/saml1/AbstractSAML1IntegrationTest.java
+++ b/src/test/java/net/shibboleth/idp/test/saml1/AbstractSAML1IntegrationTest.java
@@ -60,7 +60,7 @@ public class AbstractSAML1IntegrationTest extends BaseIntegrationTest {
     /**
      * Validate SAML 1 response
      * 
-     * @throws Exception
+     * @throws Exception if something goes wrong
      */
     public void validateResponse() throws Exception {
         validator.validateResponse(unmarshallResponse(getPageSource()));
diff --git a/src/test/java/net/shibboleth/idp/test/saml2/AbstractSAML2IntegrationTest.java b/src/test/java/net/shibboleth/idp/test/saml2/AbstractSAML2IntegrationTest.java
index 052b1c6..c0b8b04 100644
--- a/src/test/java/net/shibboleth/idp/test/saml2/AbstractSAML2IntegrationTest.java
+++ b/src/test/java/net/shibboleth/idp/test/saml2/AbstractSAML2IntegrationTest.java
@@ -95,7 +95,7 @@ public abstract class AbstractSAML2IntegrationTest extends BaseIntegrationTest {
     /**
      * Validate SAML 2 {@link Response}.
      * 
-     * @throws Exception
+     * @throws Exception if something goes wrong
      */
     public void validateResponse() throws Exception {
         validator.validateResponse(unmarshallResponse(getPageSource()));
@@ -104,7 +104,7 @@ public abstract class AbstractSAML2IntegrationTest extends BaseIntegrationTest {
     /**
      * Validate SAML 2 {@link LogoutResponse}.
      * 
-     * @throws Exception
+     * @throws Exception if something goes wrong
      */
     public void validateLogoutResponse() throws Exception {
 
@@ -120,13 +120,15 @@ public abstract class AbstractSAML2IntegrationTest extends BaseIntegrationTest {
     }
 
     /**
-     * Unmarshall the XML response into an {@link #XMLObject} object.
+     * Unmarshall the XML response into an {@link XMLObject} object.
      * 
-     * @param response
-     * @return
-     * @throws UnsupportedEncodingException
-     * @throws XMLParserException
-     * @throws UnmarshallingException
+     * @param response the response to unmarshall
+     * 
+     * @return the unmarshalled response
+     * 
+     * @throws UnsupportedEncodingException ...
+     * @throws XMLParserException ...
+     * @throws UnmarshallingException ...
      */
     @Nonnull
     public XMLObject unmarshallXMLObject(@Nullable final String response)
@@ -141,7 +143,7 @@ public abstract class AbstractSAML2IntegrationTest extends BaseIntegrationTest {
     }
 
     /**
-     * Unmarshall the XML response into a SAML 2 {@link #Response} object.
+     * Unmarshall the XML response into a SAML 2 {@link Response} object.
      * 
      * @param response the XML response
      * @return the SAML 2 Response object
diff --git a/src/test/java/net/shibboleth/idp/test/saml2/SAML2AttributeQueryIntegrationTest.java b/src/test/java/net/shibboleth/idp/test/saml2/SAML2AttributeQueryIntegrationTest.java
index 89ad2b1..b9acc28 100644
--- a/src/test/java/net/shibboleth/idp/test/saml2/SAML2AttributeQueryIntegrationTest.java
+++ b/src/test/java/net/shibboleth/idp/test/saml2/SAML2AttributeQueryIntegrationTest.java
@@ -114,7 +114,7 @@ public class SAML2AttributeQueryIntegrationTest extends AbstractSAML2Integration
     }
 
     /**
-     * Unmarshall the XML response into a SAML 2 {@link #Response} object.
+     * Unmarshall the XML response into a SAML 2 {@link Response} object.
      * 
      * This method differs from its parent class in that we are unmarshalling a SOAP response.
      * 
@@ -177,7 +177,7 @@ public class SAML2AttributeQueryIntegrationTest extends AbstractSAML2Integration
     /**
      * Change endpoint port from the default to whatever is in use.
      * 
-     * @throws MalformedURLException
+     * @throws MalformedURLException ...
      */
     protected void adjustEndpointPort() throws MalformedURLException {
         final WebElement endpointInput = driver.findElement(By.id("saml2-attribute-query-endpoint"));
@@ -208,7 +208,7 @@ public class SAML2AttributeQueryIntegrationTest extends AbstractSAML2Integration
     /**
      * Use in-memory storage service for consent.
      * 
-     * @throws IOException
+     * @throws IOException ...
      */
     protected void enableConsentStorageService() throws IOException {
         replaceIdPProperty("idp.consent.StorageService", "shibboleth.StorageService");
@@ -286,7 +286,7 @@ public class SAML2AttributeQueryIntegrationTest extends AbstractSAML2Integration
     /**
      * Validate SAML error response.
      * 
-     * @throws Exception
+     * @throws Exception if something bad happens
      */
     protected void validateErrorResponse() throws Exception {
         
@@ -300,7 +300,7 @@ public class SAML2AttributeQueryIntegrationTest extends AbstractSAML2Integration
     /**
      * Validate SAML 2 SSO {@link Response}.
      * 
-     * @throws Exception
+     * @throws Exception if something bad happens
      */
     protected void validateSSOResponse() throws Exception {
         ssoValidator.validateResponse(super.unmarshallResponse(getPageSource()));

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


More information about the commits mailing list