Author: markt
Date: Thu Oct 23 16:31:04 2014
New Revision: 1633872
URL: http://svn.apache.org/r1633872
Log:
Fix some Java 8 Javadoc warnings in the tests
Modified:
tomcat/trunk/test/org/apache/catalina/authenticator/TestSSOnonLoginAndDigestAuthenticator.java
tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java
tomcat/trunk/test/org/apache/catalina/connector/TestOutputBuffer.java
tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java
tomcat/trunk/test/org/apache/catalina/connector/TestResponse.java
tomcat/trunk/test/org/apache/catalina/core/TestNamingContextListener.java
tomcat/trunk/test/org/apache/catalina/core/TestSwallowAbortedUploads.java
tomcat/trunk/test/org/apache/catalina/filters/TestCorsFilter.java
tomcat/trunk/test/org/apache/catalina/filters/TestCsrfPreventionFilter2.java
tomcat/trunk/test/org/apache/catalina/filters/TestExpiresFilter.java
tomcat/trunk/test/org/apache/catalina/filters/TestRemoteIpFilter.java
tomcat/trunk/test/org/apache/catalina/filters/TesterHttpServletResponse.java
Modified:
tomcat/trunk/test/org/apache/catalina/authenticator/TestSSOnonLoginAndDigestAuthenticator.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/authenticator/TestSSOnonLoginAndDigestAuthenticator.java?rev=1633872&r1=1633871&r2=1633872&view=diff
==============================================================================
---
tomcat/trunk/test/org/apache/catalina/authenticator/TestSSOnonLoginAndDigestAuthenticator.java
(original)
+++
tomcat/trunk/test/org/apache/catalina/authenticator/TestSSOnonLoginAndDigestAuthenticator.java
Thu Oct 23 16:31:04 2014
@@ -86,7 +86,7 @@ public class TestSSOnonLoginAndDigestAut
private List<String> cookies;
- /**
+ /*
* Try to access an unprotected resource without an
* established SSO session.
* This should be permitted.
@@ -108,7 +108,7 @@ public class TestSSOnonLoginAndDigestAut
false, true, 403);
}
- /**
+ /*
* Logon to access a protected resource using DIGEST authentication,
* which will establish an SSO session.
* Wait until the SSO session times-out, then try to re-access
Modified: tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java?rev=1633872&r1=1633871&r2=1633872&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java
(original)
+++ tomcat/trunk/test/org/apache/catalina/comet/TestCometProcessor.java Thu Oct
23 16:31:04 2014
@@ -350,7 +350,7 @@ public class TestCometProcessor extends
}
}
- /**
+ /*
* Tests if the Comet connection is closed if the Tomcat connector is
* stopped.
*/
Modified: tomcat/trunk/test/org/apache/catalina/connector/TestOutputBuffer.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/connector/TestOutputBuffer.java?rev=1633872&r1=1633871&r2=1633872&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/connector/TestOutputBuffer.java
(original)
+++ tomcat/trunk/test/org/apache/catalina/connector/TestOutputBuffer.java Thu
Oct 23 16:31:04 2014
@@ -35,7 +35,7 @@ import org.apache.tomcat.util.buf.ByteCh
public class TestOutputBuffer extends TomcatBaseTest{
- /**
+ /*
* Expect that the buffered results are slightly slower since Tomcat now
has
* an internal buffer so an extra one just adds overhead.
*
Modified: tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java?rev=1633872&r1=1633871&r2=1633872&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java (original)
+++ tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java Thu Oct 23
16:31:04 2014
@@ -255,7 +255,7 @@ public class TestRequest extends TomcatB
}
- /**
+ /*
* Test case for
* <a href="https://issues.apache.org/bugzilla/show_bug.cgi?id=38113">bug
* 38118</a>.
@@ -301,7 +301,7 @@ public class TestRequest extends TomcatB
}
}
- /**
+ /*
* Test case for {@link Request#login(String, String)} and
* {@link Request#logout()}.
*/
Modified: tomcat/trunk/test/org/apache/catalina/connector/TestResponse.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/connector/TestResponse.java?rev=1633872&r1=1633871&r2=1633872&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/connector/TestResponse.java (original)
+++ tomcat/trunk/test/org/apache/catalina/connector/TestResponse.java Thu Oct
23 16:31:04 2014
@@ -100,7 +100,7 @@ public class TestResponse extends Tomcat
}
- /**
+ /*
* Tests an issue noticed during the investigation of BZ 52811.
*/
@Test
Modified:
tomcat/trunk/test/org/apache/catalina/core/TestNamingContextListener.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/core/TestNamingContextListener.java?rev=1633872&r1=1633871&r2=1633872&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/core/TestNamingContextListener.java
(original)
+++ tomcat/trunk/test/org/apache/catalina/core/TestNamingContextListener.java
Thu Oct 23 16:31:04 2014
@@ -41,7 +41,7 @@ public class TestNamingContextListener e
private static final String BUG54096_NameB = "envB";
private static final String BUG54096_ValueB = "B";
- /**
+ /*
* Test JNDI is available to ServletContextListeners.
*/
@Test
Modified:
tomcat/trunk/test/org/apache/catalina/core/TestSwallowAbortedUploads.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/core/TestSwallowAbortedUploads.java?rev=1633872&r1=1633871&r2=1633872&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/core/TestSwallowAbortedUploads.java
(original)
+++ tomcat/trunk/test/org/apache/catalina/core/TestSwallowAbortedUploads.java
Thu Oct 23 16:31:04 2014
@@ -53,7 +53,7 @@ public class TestSwallowAbortedUploads e
private static Log log =
LogFactory.getLog(TestSwallowAbortedUploads.class);
- /**
+ /*
* Test whether size limited uploads correctly handle connection draining.
*/
public Exception doAbortedUploadTest(AbortedUploadClient client, boolean
limited,
@@ -71,7 +71,7 @@ public class TestSwallowAbortedUploads e
return ex;
}
- /**
+ /*
* Test whether aborted POST correctly handle connection draining.
*/
public Exception doAbortedPOSTTest(AbortedPOSTClient client, int status,
Modified: tomcat/trunk/test/org/apache/catalina/filters/TestCorsFilter.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/filters/TestCorsFilter.java?rev=1633872&r1=1633871&r2=1633872&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/filters/TestCorsFilter.java (original)
+++ tomcat/trunk/test/org/apache/catalina/filters/TestCorsFilter.java Thu Oct
23 16:31:04 2014
@@ -31,7 +31,7 @@ import org.junit.Test;
public class TestCorsFilter {
private FilterChain filterChain = new TesterFilterChain();
- /**
+ /*
* Tests if a GET request is treated as simple request.
*
* @See http://www.w3.org/TR/cors/#simple-method
@@ -63,7 +63,7 @@ public class TestCorsFilter {
CorsFilter.CORSRequestType.SIMPLE.name().toLowerCase()));
}
- /**
+ /*
* Tests if a POST request is treated as simple request.
*
* @See http://www.w3.org/TR/cors/#simple-method
@@ -96,7 +96,7 @@ public class TestCorsFilter {
CorsFilter.CORSRequestType.SIMPLE.name().toLowerCase()));
}
- /**
+ /*
* Tests if a HEAD request is treated as simple request.
*
* @See http://www.w3.org/TR/cors/#simple-method
@@ -128,7 +128,7 @@ public class TestCorsFilter {
CorsFilter.CORSRequestType.SIMPLE.name().toLowerCase()));
}
- /**
+ /*
* Test the presence of specific origin in response, when '*' is not used.
*
* @throws IOException
@@ -161,7 +161,7 @@ public class TestCorsFilter {
CorsFilter.CORSRequestType.SIMPLE.name().toLowerCase()));
}
- /**
+ /*
* Tests the prsence of the origin (and not '*') in the response, when
* supports credentials is enabled alongwith any origin, '*'.
*
@@ -199,7 +199,7 @@ public class TestCorsFilter {
CorsFilter.CORSRequestType.SIMPLE.name().toLowerCase()));
}
- /**
+ /*
* Tests the presence of the origin (and not '*') in the response, when
* supports credentials is enabled alongwith any origin, '*'.
*
@@ -235,7 +235,7 @@ public class TestCorsFilter {
CorsFilter.CORSRequestType.SIMPLE.name().toLowerCase()));
}
- /**
+ /*
* Tests the presence of exposed headers in response, if configured.
*
* @throws IOException
@@ -272,7 +272,7 @@ public class TestCorsFilter {
CorsFilter.CORSRequestType.SIMPLE.name().toLowerCase()));
}
- /**
+ /*
* Checks if an OPTIONS request is processed as pre-flight.
*
* @throws IOException
@@ -312,7 +312,7 @@ public class TestCorsFilter {
"Content-Type"));
}
- /**
+ /*
* Checks if an OPTIONS request is processed as pre-flight where any origin
* is enabled.
*
@@ -354,7 +354,7 @@ public class TestCorsFilter {
"Content-Type"));
}
- /**
+ /*
* Checks if an OPTIONS request is processed as pre-flight.
*
* @throws IOException
@@ -496,7 +496,7 @@ public class TestCorsFilter {
"Content-Type"));
}
- /**
+ /*
* Negative test, when a CORS request arrives, with a null origin.
*/
@Test
@@ -596,7 +596,7 @@ public class TestCorsFilter {
// worked as expected.
}
- /**
+ /*
* Tests if a non-simple request is given to simple request handler.
*
* @throws IOException
@@ -621,7 +621,7 @@ public class TestCorsFilter {
corsFilter.handleSimpleCORS(request, response, filterChain);
}
- /**
+ /*
* When a non-preflight request is given to a pre-flight request handler.
*
* @throws IOException
@@ -690,7 +690,7 @@ public class TestCorsFilter {
Assert.assertEquals(CorsFilter.CORSRequestType.SIMPLE, requestType);
}
- /**
+ /*
* Happy path test, when a valid CORS Simple request arrives.
*
* @throws ServletException
@@ -709,7 +709,7 @@ public class TestCorsFilter {
Assert.assertEquals(CorsFilter.CORSRequestType.SIMPLE, requestType);
}
- /**
+ /*
* Happy path test, when a valid CORS Simple request arrives.
*
* @throws ServletException
@@ -728,7 +728,7 @@ public class TestCorsFilter {
Assert.assertEquals(CorsFilter.CORSRequestType.ACTUAL, requestType);
}
- /**
+ /*
* Happy path test, when a valid CORS Simple request arrives.
*
* @throws ServletException
@@ -749,7 +749,7 @@ public class TestCorsFilter {
Assert.assertEquals(CorsFilter.CORSRequestType.ACTUAL, requestType);
}
- /**
+ /*
* Happy path test, when a valid CORS Pre-flight request arrives.
*
* @throws ServletException
@@ -774,16 +774,12 @@ public class TestCorsFilter {
Assert.assertEquals(CorsFilter.CORSRequestType.PRE_FLIGHT,
requestType);
}
- /**
+ /*
* when a valid CORS Pre-flight request arrives, with no
* Access-Control-Request-Method
- *
- * @throws ServletException
- * @throws IOException
*/
@Test
- public void testCheckPreFlightRequestTypeNoACRM() throws ServletException,
- IOException {
+ public void testCheckPreFlightRequestTypeNoACRM() throws ServletException {
TesterHttpServletRequest request = new TesterHttpServletRequest();
request.setHeader(CorsFilter.REQUEST_HEADER_ORIGIN,
TesterFilterConfigs.HTTP_TOMCAT_APACHE_ORG);
@@ -797,16 +793,13 @@ public class TestCorsFilter {
Assert.assertEquals(CorsFilter.CORSRequestType.ACTUAL, requestType);
}
- /**
+ /*
* when a valid CORS Pre-flight request arrives, with empty
* Access-Control-Request-Method
- *
- * @throws ServletException
- * @throws IOException
*/
@Test
public void testCheckPreFlightRequestTypeEmptyACRM()
- throws ServletException, IOException {
+ throws ServletException {
TesterHttpServletRequest request = new TesterHttpServletRequest();
request.setHeader(CorsFilter.REQUEST_HEADER_ORIGIN,
TesterFilterConfigs.HTTP_TOMCAT_APACHE_ORG);
@@ -823,7 +816,7 @@ public class TestCorsFilter {
requestType);
}
- /**
+ /*
* Happy path test, when a valid CORS Pre-flight request arrives.
*
* @throws ServletException
@@ -846,7 +839,7 @@ public class TestCorsFilter {
Assert.assertEquals(CorsFilter.CORSRequestType.PRE_FLIGHT,
requestType);
}
- /**
+ /*
* Section 6.2.3
*
* @throws ServletException
@@ -871,7 +864,7 @@ public class TestCorsFilter {
response.getStatus());
}
- /**
+ /*
* Section Section 6.2.5
*
* @throws ServletException
@@ -896,7 +889,7 @@ public class TestCorsFilter {
response.getStatus());
}
- /**
+ /*
* Section Section 6.2.6
*
* @throws ServletException
@@ -924,7 +917,7 @@ public class TestCorsFilter {
response.getStatus());
}
- /**
+ /*
* Section Section 6.2.7
*
* @throws ServletException
@@ -974,7 +967,7 @@ public class TestCorsFilter {
response.getStatus());
}
- /**
+ /*
* Happy path test, when a valid CORS Pre-flight request arrives.
*
* @throws ServletException
@@ -1000,7 +993,7 @@ public class TestCorsFilter {
Assert.assertEquals(CorsFilter.CORSRequestType.PRE_FLIGHT,
requestType);
}
- /**
+ /*
* Negative test, when a CORS request arrives, with an empty origin.
*
* @throws ServletException
@@ -1021,7 +1014,7 @@ public class TestCorsFilter {
requestType);
}
- /**
+ /*
* Tests for failure, when a different domain is used, that's not in the
* allowed list of origins.
*
@@ -1043,7 +1036,7 @@ public class TestCorsFilter {
response.getStatus());
}
- /**
+ /*
* Tests for failure, when a different sub-domain is used, that's not in
the
* allowed list of origins.
*
@@ -1066,7 +1059,7 @@ public class TestCorsFilter {
response.getStatus());
}
- /**
+ /*
* PUT is not an allowed request method.
*
* @throws ServletException
@@ -1088,7 +1081,7 @@ public class TestCorsFilter {
response.getStatus());
}
- /**
+ /*
* When requestMethod is null
*
* @throws ServletException
@@ -1108,7 +1101,7 @@ public class TestCorsFilter {
requestType);
}
- /**
+ /*
* "http://tomcat.apache.org" is an allowed origin and
* "https://tomcat.apache.org" is not, because scheme doesn't match
*
@@ -1129,7 +1122,7 @@ public class TestCorsFilter {
requestType);
}
- /**
+ /*
* "http://tomcat.apache.org" is an allowed origin and
* "http://tomcat.apache.org:8080" is not, because ports doesn't match
*
@@ -1151,14 +1144,12 @@ public class TestCorsFilter {
response.getStatus());
}
- /**
+ /*
* Tests for failure, when an invalid {@link HttpServletRequest} is
* encountered.
- *
- * @throws ServletException
*/
@Test(expected = IllegalArgumentException.class)
- public void testCheckRequestTypeNull() throws ServletException {
+ public void testCheckRequestTypeNull() {
HttpServletRequest request = null;
CorsFilter corsFilter = new CorsFilter();
corsFilter.checkRequestType(request);
@@ -1275,7 +1266,7 @@ public class TestCorsFilter {
Assert.assertTrue(corsFilter.getPreflightMaxAge() == 0);
}
- /**
+ /*
* If an init param is null, it's default value will be used.
*
* @throws ServletException
Modified:
tomcat/trunk/test/org/apache/catalina/filters/TestCsrfPreventionFilter2.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/filters/TestCsrfPreventionFilter2.java?rev=1633872&r1=1633871&r2=1633872&view=diff
==============================================================================
---
tomcat/trunk/test/org/apache/catalina/filters/TestCsrfPreventionFilter2.java
(original)
+++
tomcat/trunk/test/org/apache/catalina/filters/TestCsrfPreventionFilter2.java
Thu Oct 23 16:31:04 2014
@@ -25,7 +25,7 @@ import org.apache.catalina.filters.CsrfP
public class TestCsrfPreventionFilter2 {
- /**
+ /*
* When this test fails, it tends to enter a long running loop but it will
* eventually finish (after ~70s on a 8-core Windows box).
*/
Modified: tomcat/trunk/test/org/apache/catalina/filters/TestExpiresFilter.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/filters/TestExpiresFilter.java?rev=1633872&r1=1633871&r2=1633872&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/filters/TestExpiresFilter.java
(original)
+++ tomcat/trunk/test/org/apache/catalina/filters/TestExpiresFilter.java Thu
Oct 23 16:31:04 2014
@@ -159,7 +159,7 @@ public class TestExpiresFilter extends T
}
}
- /**
+ /*
* Test that a resource with empty content is also processed
*/
@Test
Modified: tomcat/trunk/test/org/apache/catalina/filters/TestRemoteIpFilter.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/filters/TestRemoteIpFilter.java?rev=1633872&r1=1633871&r2=1633872&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/filters/TestRemoteIpFilter.java
(original)
+++ tomcat/trunk/test/org/apache/catalina/filters/TestRemoteIpFilter.java Thu
Oct 23 16:31:04 2014
@@ -539,7 +539,7 @@ public class TestRemoteIpFilter extends
actualRequest.getAttribute(AccessLog.REMOTE_HOST_ATTRIBUTE));
}
- /**
+ /*
* Test {@link RemoteIpFilter} in Tomcat standalone server
*/
@Test
Modified:
tomcat/trunk/test/org/apache/catalina/filters/TesterHttpServletResponse.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/filters/TesterHttpServletResponse.java?rev=1633872&r1=1633871&r2=1633872&view=diff
==============================================================================
---
tomcat/trunk/test/org/apache/catalina/filters/TesterHttpServletResponse.java
(original)
+++
tomcat/trunk/test/org/apache/catalina/filters/TesterHttpServletResponse.java
Thu Oct 23 16:31:04 2014
@@ -131,13 +131,14 @@ public class TesterHttpServletResponse i
public void setError() {/* NOOP */}
public boolean isError() { return false; }
/**
- * @throws IOException
+ * @return Always null
+ * @throws IOException Never happens
*/
public ServletOutputStream createOutputStream() throws IOException {
return null;
}
/**
- * @throws IOException
+ * @throws IOException Never happens
*/
public void finishResponse() throws IOException {/* NOOP */}
public int getContentLength() { return -1; }
@@ -146,24 +147,24 @@ public class TesterHttpServletResponse i
public PrintWriter getReporter() { return null; }
public void recycle() {/* NOOP */}
/**
- * @param b
- * @throws IOException
+ * @param b Unused
+ * @throws IOException Never happens
*/
public void write(int b) throws IOException {
// NOOP
}
/**
- * @param b
- * @throws IOException
+ * @param b Unused
+ * @throws IOException Never happens
*/
public void write(byte b[]) throws IOException {
// NOOP
}
/**
- * @param b
- * @param off
- * @param len
- * @throws IOException
+ * @param b Unused
+ * @param off Unused
+ * @param len Unused
+ * @throws IOException Never happens
*/
public void write(byte b[], int off, int len) throws IOException {
// NOOP
@@ -213,19 +214,19 @@ public class TesterHttpServletResponse i
public boolean containsHeader(String name) { return false; }
@Override
public String encodeRedirectURL(String url) { return null; }
- /** @deprecated */
+ /** @deprecated Do not use */
@Override
@Deprecated
public String encodeRedirectUrl(String url) { return null; }
@Override
public String encodeURL(String url) { return null; }
- /** @deprecated */
+ /** @deprecated Do not use */
@Override
@Deprecated
public String encodeUrl(String url) { return null; }
/**
*
- * @throws IOException
+ * @throws IOException Never happens
*/
public void sendAcknowledgement() throws IOException {/* NOOP */}
@Override
@@ -240,7 +241,7 @@ public class TesterHttpServletResponse i
public void setDateHeader(String name, long value) {/* NOOP */}
@Override
public void setIntHeader(String name, int value) {/* NOOP */}
- /** @deprecated */
+ /** @deprecated Do not use */
@Override
@Deprecated
public void setStatus(int status, String message) {/* NOOP */}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]