[tomcat] branch 10.0.x updated: Expand code comments

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.0.x by this push:
 new 539c572  Expand code comments
539c572 is described below

commit 539c5721840c3f2f58c0651b7e171158a2d6b674
Author: Mark Thomas 
AuthorDate: Wed Nov 24 09:25:19 2021 +

Expand code comments
---
 java/org/apache/catalina/connector/Request.java | 14 --
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/connector/Request.java 
b/java/org/apache/catalina/connector/Request.java
index da40d08..f192552 100644
--- a/java/org/apache/catalina/connector/Request.java
+++ b/java/org/apache/catalina/connector/Request.java
@@ -2624,13 +2624,23 @@ public class Request implements HttpServletRequest {
 if (gssCredential != null) {
 int left = -1;
 try {
+// Concurrent calls to this method from an expired session
+// can trigger an ISE. If one thread calls logout() below
+// before another thread calls getRemainingLifetime() then
+// then since logout() eventually calls
+// GSSCredential.dispose(), the subsequent call to
+// GSSCredential.getRemainingLifetime() will throw an ISE.
+// Avoiding the ISE would require locking in this method to
+// protect against concurrent access to the GSSCredential.
+// That would have a small performance impact. The ISE is
+// rare so it is caught and handled rather than avoided.
 left = gssCredential.getRemainingLifetime();
 } catch (GSSException | IllegalStateException e) {
 log.warn(sm.getString("coyoteRequest.gssLifetimeFail",
 userPrincipal.getName()), e);
 }
-// zero is expired.
-// Should never be less than zero but handle those values too
+// zero is expired. Exception above will mean left == -1
+// Treat both as expired.
 if (left <= 0) {
 // GSS credential has expired. Need to re-authenticate.
 try {

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 9.0.x updated: Expand code comments

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new cd1e61b  Expand code comments
cd1e61b is described below

commit cd1e61b9abef886a212fe24883bdab465706e8ac
Author: Mark Thomas 
AuthorDate: Wed Nov 24 09:25:19 2021 +

Expand code comments
---
 java/org/apache/catalina/connector/Request.java | 14 --
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/connector/Request.java 
b/java/org/apache/catalina/connector/Request.java
index 7d4a949..0d2c5ff 100644
--- a/java/org/apache/catalina/connector/Request.java
+++ b/java/org/apache/catalina/connector/Request.java
@@ -2656,13 +2656,23 @@ public class Request implements HttpServletRequest {
 if (gssCredential != null) {
 int left = -1;
 try {
+// Concurrent calls to this method from an expired session
+// can trigger an ISE. If one thread calls logout() below
+// before another thread calls getRemainingLifetime() then
+// then since logout() eventually calls
+// GSSCredential.dispose(), the subsequent call to
+// GSSCredential.getRemainingLifetime() will throw an ISE.
+// Avoiding the ISE would require locking in this method to
+// protect against concurrent access to the GSSCredential.
+// That would have a small performance impact. The ISE is
+// rare so it is caught and handled rather than avoided.
 left = gssCredential.getRemainingLifetime();
 } catch (GSSException | IllegalStateException e) {
 log.warn(sm.getString("coyoteRequest.gssLifetimeFail",
 userPrincipal.getName()), e);
 }
-// zero is expired.
-// Should never be less than zero but handle those values too
+// zero is expired. Exception above will mean left == -1
+// Treat both as expired.
 if (left <= 0) {
 // GSS credential has expired. Need to re-authenticate.
 try {

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch main updated (b0795bf -> 78338b9)

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


from b0795bf  Add parameter for the Panama OpenSSL variant
 add 78338b9  Expand code comments

No new revisions were added by this update.

Summary of changes:
 java/org/apache/catalina/connector/Request.java | 14 --
 1 file changed, 12 insertions(+), 2 deletions(-)

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 8.5.x updated: Expand code comments

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 9a132b6  Expand code comments
9a132b6 is described below

commit 9a132b60be805c3a90da0bc97fabfd9302bad944
Author: Mark Thomas 
AuthorDate: Wed Nov 24 09:25:19 2021 +

Expand code comments
---
 java/org/apache/catalina/connector/Request.java | 14 --
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/connector/Request.java 
b/java/org/apache/catalina/connector/Request.java
index 98b61f3..50d3174 100644
--- a/java/org/apache/catalina/connector/Request.java
+++ b/java/org/apache/catalina/connector/Request.java
@@ -2671,13 +2671,23 @@ public class Request implements HttpServletRequest {
 if (gssCredential != null) {
 int left = -1;
 try {
+// Concurrent calls to this method from an expired session
+// can trigger an ISE. If one thread calls logout() below
+// before another thread calls getRemainingLifetime() then
+// then since logout() eventually calls
+// GSSCredential.dispose(), the subsequent call to
+// GSSCredential.getRemainingLifetime() will throw an ISE.
+// Avoiding the ISE would require locking in this method to
+// protect against concurrent access to the GSSCredential.
+// That would have a small performance impact. The ISE is
+// rare so it is caught and handled rather than avoided.
 left = gssCredential.getRemainingLifetime();
 } catch (GSSException | IllegalStateException e) {
 log.warn(sm.getString("coyoteRequest.gssLifetimeFail",
 userPrincipal.getName()), e);
 }
-// zero is expired.
-// Should never be less than zero but handle those values too
+// zero is expired. Exception above will mean left == -1
+// Treat both as expired.
 if (left <= 0) {
 // GSS credential has expired. Need to re-authenticate.
 try {

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch main updated: Remove extra space

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new 5d65317  Remove extra space
5d65317 is described below

commit 5d6531768774db49f0457565f886bc7018db9390
Author: Mark Thomas 
AuthorDate: Wed Nov 24 11:29:02 2021 +

Remove extra space
---
 java/org/apache/catalina/core/StandardContext.java  | 2 +-
 java/org/apache/jasper/runtime/JspSourceDirectives.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/core/StandardContext.java 
b/java/org/apache/catalina/core/StandardContext.java
index ebc5448..f5e7fb5 100644
--- a/java/org/apache/catalina/core/StandardContext.java
+++ b/java/org/apache/catalina/core/StandardContext.java
@@ -697,7 +697,7 @@ public class StandardContext extends ContainerBase
 
 /**
  * Enables the RMI Target memory leak detection to be controlled. This is
- * necessary since the detection can only work  if some of the modularity
+ * necessary since the detection can only work if some of the modularity
  * checks are disabled.
  */
 private boolean clearReferencesRmiTargets = true;
diff --git a/java/org/apache/jasper/runtime/JspSourceDirectives.java 
b/java/org/apache/jasper/runtime/JspSourceDirectives.java
index cb531ac..a9fb46c 100644
--- a/java/org/apache/jasper/runtime/JspSourceDirectives.java
+++ b/java/org/apache/jasper/runtime/JspSourceDirectives.java
@@ -19,7 +19,7 @@ package org.apache.jasper.runtime;
 /**
  * Provides runtime access to selected compile time directives. Page directives
  * are not added to this interface until there is a requirement to access them
- *  at runtime.
+ * at runtime.
  */
 public interface JspSourceDirectives {
 

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch main updated: Remove link to Tomcat 7 docs

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new 2b0a03f  Remove link to Tomcat 7 docs
2b0a03f is described below

commit 2b0a03f5ff3dc40db1018f2aad4883e508147513
Author: Mark Thomas 
AuthorDate: Wed Nov 24 11:29:23 2021 +

Remove link to Tomcat 7 docs
---
 README.md | 1 -
 1 file changed, 1 deletion(-)

diff --git a/README.md b/README.md
index dedb841..e1e224a 100644
--- a/README.md
+++ b/README.md
@@ -47,7 +47,6 @@ The most up-to-date documentation for each version can be 
found at:
 - [Tomcat 10.0](https://tomcat.apache.org/tomcat-10.0-doc/)
 - [Tomcat 9](https://tomcat.apache.org/tomcat-9.0-doc/)
 - [Tomcat 8](https://tomcat.apache.org/tomcat-8.5-doc/)
-- [Tomcat 7](https://tomcat.apache.org/tomcat-7.0-doc/)
 
 ### Installation
 

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] 03/06: Remove link to 7.0.x docs. Add link for 10.1.x.

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit ee1eace7cd6722df7dfd20499174b47ed5a53229
Author: Mark Thomas 
AuthorDate: Wed Nov 24 12:15:56 2021 +

Remove link to 7.0.x docs. Add link for 10.1.x.
---
 README.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index ec1353d..e1e224a 100644
--- a/README.md
+++ b/README.md
@@ -43,10 +43,10 @@ The documentation available as of the date of this release 
is
 included in the docs webapp which ships with tomcat. You can access that webapp
 by starting tomcat and visiting  in your browser.
 The most up-to-date documentation for each version can be found at:
-- [Tomcat 10](https://tomcat.apache.org/tomcat-10.0-doc/)
+- [Tomcat 10.1](https://tomcat.apache.org/tomcat-10.1-doc/)
+- [Tomcat 10.0](https://tomcat.apache.org/tomcat-10.0-doc/)
 - [Tomcat 9](https://tomcat.apache.org/tomcat-9.0-doc/)
 - [Tomcat 8](https://tomcat.apache.org/tomcat-8.5-doc/)
-- [Tomcat 7](https://tomcat.apache.org/tomcat-7.0-doc/)
 
 ### Installation
 

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] 01/06: Javadoc improvements back-ported from 10.1.x

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 9152dcb3c6382948f171353fa3f276ee77290a33
Author: Mark Thomas 
AuthorDate: Wed Nov 24 12:09:48 2021 +

Javadoc improvements back-ported from 10.1.x
---
 .../catalina/core/ApplicationFilterConfig.java | 16 ++-
 java/org/apache/catalina/filters/CorsFilter.java   |  2 +-
 java/org/apache/catalina/mapper/Mapper.java|  3 +-
 .../org/apache/catalina/mapper/MapperListener.java |  6 ++--
 .../apache/catalina/webresources/StandardRoot.java |  2 +-
 java/org/apache/coyote/ajp/AjpProcessor.java   |  2 +-
 java/org/apache/coyote/http2/HpackDecoder.java |  2 +-
 java/org/apache/coyote/http2/Http2Parser.java  |  2 +-
 .../apache/jasper/compiler/AttributeParser.java|  6 
 java/org/apache/jasper/compiler/ELParser.java  |  3 +-
 .../tomcat/dbcp/dbcp2/BasicDataSourceFactory.java  |  4 +--
 .../tomcat/util/bcel/classfile/ClassParser.java| 32 +++---
 .../tomcat/util/bcel/classfile/ConstantDouble.java |  3 +-
 .../tomcat/util/bcel/classfile/ConstantFloat.java  |  3 +-
 .../util/bcel/classfile/ConstantInteger.java   |  3 +-
 .../tomcat/util/bcel/classfile/ConstantLong.java   |  3 +-
 .../tomcat/util/bcel/classfile/ConstantPool.java   |  4 +--
 java/org/apache/tomcat/util/buf/UriUtil.java   |  4 +--
 .../apache/tomcat/util/http/parser/TokenList.java  |  4 +--
 .../tomcat/websocket/WsWebSocketContainer.java | 11 +---
 .../startup/TestContextConfigAnnotation.java   |  6 +---
 .../classes/websocket/drawboard/Client.java|  3 +-
 .../WEB-INF/classes/websocket/drawboard/Room.java  | 18 ++--
 23 files changed, 73 insertions(+), 69 deletions(-)

diff --git a/java/org/apache/catalina/core/ApplicationFilterConfig.java 
b/java/org/apache/catalina/core/ApplicationFilterConfig.java
index aede350..3b81f73 100644
--- a/java/org/apache/catalina/core/ApplicationFilterConfig.java
+++ b/java/org/apache/catalina/core/ApplicationFilterConfig.java
@@ -85,9 +85,10 @@ public final class ApplicationFilterConfig implements 
FilterConfig, Serializable
  * @exception InstantiationException if an exception occurs while
  *  instantiating the filter object
  * @exception ServletException if thrown by the filter's init() method
- * @throws NamingException
- * @throws SecurityException
- * @throws IllegalArgumentException
+ * @throws NamingException If a JNDI lookup fails
+ * @throws SecurityException If a security manager prevents the creation
+ * @throws IllegalArgumentException If the provided configuration is not
+ * valid
  */
 ApplicationFilterConfig(Context context, FilterDef filterDef)
 throws ClassCastException, ReflectiveOperationException, 
ServletException,
@@ -232,10 +233,11 @@ public final class ApplicationFilterConfig implements 
FilterConfig, Serializable
  * @exception InstantiationException if an exception occurs while
  *  instantiating the filter object
  * @exception ServletException if thrown by the filter's init() method
- * @throws NamingException
- * @throws ReflectiveOperationException
- * @throws SecurityException
- * @throws IllegalArgumentException
+ * @throws NamingException If a JNDI lookup fails
+ * @throws ReflectiveOperationException If the creation of the filter fails
+ * @throws SecurityException If a security manager prevents the creation
+ * @throws IllegalArgumentException If the provided configuration is not
+ * valid
  */
 Filter getFilter() throws ClassCastException, 
ReflectiveOperationException, ServletException,
 NamingException, IllegalArgumentException, SecurityException {
diff --git a/java/org/apache/catalina/filters/CorsFilter.java 
b/java/org/apache/catalina/filters/CorsFilter.java
index f64d7ad..b3d187e 100644
--- a/java/org/apache/catalina/filters/CorsFilter.java
+++ b/java/org/apache/catalina/filters/CorsFilter.java
@@ -706,7 +706,7 @@ public class CorsFilter extends GenericFilter {
  * @param preflightMaxAge
  *The amount of seconds the user agent is allowed to cache the
  *result of the pre-flight request.
- * @throws ServletException
+ * @throws ServletException If the configuration is invalid
  */
 private void parseAndStore(final String allowedOrigins,
 final String allowedHttpMethods, final String allowedHttpHeaders,
diff --git a/java/org/apache/catalina/mapper/Mapper.java 
b/java/org/apache/catalina/mapper/Mapper.java
index a5f9dc2..f51a69c 100644
--- a/java/org/apache/catalina/mapper/Mapper.java
+++ b/java/org/apache/catalina/mapper/Mapper.java
@@ -730,7 +730,8 @@ public final class Mapper {
 
 /**
  * Map the specified URI.
- * @throws IOException
+ * @throws IOException If an error occurs while manip

[tomcat] branch 10.0.x updated (539c572 -> 92242a7)

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


from 539c572  Expand code comments
 new 9152dcb  Javadoc improvements back-ported from 10.1.x
 new 9f77bad  Align comments and spacing with 10.1.x
 new ee1eace  Remove link to 7.0.x docs. Add link for 10.1.x.
 new 78b72a3  Align with 10.1.x
 new 4871108  Align with 10.1.x. Remove Tomcat 8 specific reference
 new 92242a7  Align with 10.1.x - remove unnecessary synchronization

The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 README.md  |  4 +--
 conf/server.xml|  3 +-
 java/org/apache/catalina/connector/Request.java|  1 -
 .../catalina/core/ApplicationFilterConfig.java | 16 +
 .../catalina/core/DefaultInstanceManager.java  | 42 +-
 .../core/JreMemoryLeakPreventionListener.java  |  6 ++--
 java/org/apache/catalina/filters/CorsFilter.java   |  2 +-
 java/org/apache/catalina/mapper/Mapper.java|  3 +-
 .../org/apache/catalina/mapper/MapperListener.java |  6 ++--
 .../apache/catalina/session/StandardSession.java   |  1 -
 .../apache/catalina/webresources/JarContents.java  |  5 ++-
 .../apache/catalina/webresources/StandardRoot.java |  2 +-
 java/org/apache/coyote/Request.java|  1 -
 java/org/apache/coyote/ajp/AjpProcessor.java   |  2 +-
 java/org/apache/coyote/http2/HpackDecoder.java |  2 +-
 java/org/apache/coyote/http2/Http2Parser.java  |  2 +-
 .../apache/jasper/compiler/AttributeParser.java|  6 
 java/org/apache/jasper/compiler/ELParser.java  |  3 +-
 .../tomcat/dbcp/dbcp2/BasicDataSourceFactory.java  |  4 +--
 .../tomcat/util/bcel/classfile/ClassParser.java| 32 -
 .../tomcat/util/bcel/classfile/ConstantDouble.java |  3 +-
 .../tomcat/util/bcel/classfile/ConstantFloat.java  |  3 +-
 .../util/bcel/classfile/ConstantInteger.java   |  3 +-
 .../tomcat/util/bcel/classfile/ConstantLong.java   |  3 +-
 .../tomcat/util/bcel/classfile/ConstantPool.java   |  4 +--
 java/org/apache/tomcat/util/buf/UriUtil.java   |  4 +--
 .../org/apache/tomcat/util/compat/Jre16Compat.java |  4 ++-
 java/org/apache/tomcat/util/compat/JreCompat.java  |  2 +-
 .../tomcat/util/descriptor/web/SessionConfig.java  |  1 -
 .../apache/tomcat/util/http/parser/TokenList.java  |  4 +--
 .../tomcat/util/net/openssl/OpenSSLContext.java|  1 +
 .../tomcat/websocket/WsWebSocketContainer.java | 11 +++---
 res/rat/rat-excludes.txt   |  3 +-
 .../apache/catalina/core/TesterTldListener.java|  4 +--
 .../startup/TestContextConfigAnnotation.java   |  6 +---
 webapps/docs/windows-auth-howto.xml|  2 +-
 .../classes/websocket/drawboard/Client.java|  3 +-
 .../WEB-INF/classes/websocket/drawboard/Room.java  | 18 +-
 38 files changed, 105 insertions(+), 117 deletions(-)

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] 02/06: Align comments and spacing with 10.1.x

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 9f77bad6c030dc5d12525970106681ae581c69a8
Author: Mark Thomas 
AuthorDate: Wed Nov 24 12:14:31 2021 +

Align comments and spacing with 10.1.x
---
 conf/server.xml| 3 +--
 java/org/apache/catalina/connector/Request.java| 1 -
 java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java | 6 ++
 java/org/apache/catalina/session/StandardSession.java  | 1 -
 java/org/apache/catalina/webresources/JarContents.java | 5 ++---
 java/org/apache/coyote/Request.java| 1 -
 java/org/apache/tomcat/util/compat/Jre16Compat.java| 4 +++-
 java/org/apache/tomcat/util/compat/JreCompat.java  | 2 +-
 java/org/apache/tomcat/util/descriptor/web/SessionConfig.java  | 1 -
 java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java| 1 +
 res/rat/rat-excludes.txt   | 3 +--
 11 files changed, 11 insertions(+), 17 deletions(-)

diff --git a/conf/server.xml b/conf/server.xml
index 5bd92eb..72bda52 100644
--- a/conf/server.xml
+++ b/conf/server.xml
@@ -78,8 +78,7 @@
 
diff --git a/java/org/apache/catalina/connector/Request.java 
b/java/org/apache/catalina/connector/Request.java
index f192552..69e9ce6 100644
--- a/java/org/apache/catalina/connector/Request.java
+++ b/java/org/apache/catalina/connector/Request.java
@@ -1796,7 +1796,6 @@ public class Request implements HttpServletRequest {
 
 //  HttpRequest Methods
 
-
 /**
  * Add a Cookie to the set of Cookies associated with this Request.
  *
diff --git a/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java 
b/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
index baa34c2..b8e0f22 100644
--- a/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
+++ b/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
@@ -204,7 +204,6 @@ public class JreMemoryLeakPreventionListener implements 
LifecycleListener {
 }
 
 
-
 @Override
 public void lifecycleEvent(LifecycleEvent event) {
 // Initialise these classes when Tomcat starts
@@ -231,8 +230,7 @@ public class JreMemoryLeakPreventionListener implements 
LifecycleListener {
 
 ClassLoader loader = 
Thread.currentThread().getContextClassLoader();
 
-try
-{
+try {
 // Use the system classloader as the victim for all this
 // ClassLoader pinning we're about to do.
 Thread.currentThread().setContextClassLoader(
@@ -248,7 +246,7 @@ public class JreMemoryLeakPreventionListener implements 
LifecycleListener {
  * - Batik
  * - others TBD
  *
- * Note tha a call to sun.awt.AppContext.getAppContext() 
results
+ * Note that a call to sun.awt.AppContext.getAppContext() 
results
  * in a thread being started named AWT-AppKit that requires a
  * graphical environment to be available.
  */
diff --git a/java/org/apache/catalina/session/StandardSession.java 
b/java/org/apache/catalina/session/StandardSession.java
index 0c41865..db32b32 100644
--- a/java/org/apache/catalina/session/StandardSession.java
+++ b/java/org/apache/catalina/session/StandardSession.java
@@ -1123,7 +1123,6 @@ public class StandardSession implements HttpSession, 
Session, Serializable {
 
 // --HttpSession Public Methods
 
-
 /**
  * Return the object bound with the specified name in this session, or
  * null if no object is bound with that name.
diff --git a/java/org/apache/catalina/webresources/JarContents.java 
b/java/org/apache/catalina/webresources/JarContents.java
index 0afa9fa..2718072 100644
--- a/java/org/apache/catalina/webresources/JarContents.java
+++ b/java/org/apache/catalina/webresources/JarContents.java
@@ -58,7 +58,6 @@ public final class JarContents {
 bits1 = new BitSet(TABLE_SIZE);
 bits2 = new BitSet(TABLE_SIZE);
 
-// Enumerations. When will they update this API?!
 while (entries.hasMoreElements()) {
 JarEntry entry = entries.nextElement();
 String name = entry.getName();
@@ -140,9 +139,9 @@ public final class JarContents {
 startPos++;
 }
 
-// calculate the hash lazyly and return a boolean value for this path
+// calculate the hash lazily and return a boolean value for this path
 return (bits1.get(hashcode(path, startPos, HASH_PRIME_1) % TABLE_SIZE) 
&&
 bits2.get(hashcode(path, startPos, HASH_PRIME_2) % 
TABLE_SIZE));
 }
 
-}

[tomcat] 04/06: Align with 10.1.x

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 78b72a3619a5db2bd784c94550cd60ebe68db9e3
Author: Mark Thomas 
AuthorDate: Wed Nov 24 12:16:46 2021 +

Align with 10.1.x

Change method to one that works with Servlet <=5 and >=6
Uncomment failure case handling.
---
 test/org/apache/catalina/core/TesterTldListener.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/org/apache/catalina/core/TesterTldListener.java 
b/test/org/apache/catalina/core/TesterTldListener.java
index e79d92e..37c6dbf 100644
--- a/test/org/apache/catalina/core/TesterTldListener.java
+++ b/test/org/apache/catalina/core/TesterTldListener.java
@@ -38,7 +38,7 @@ public class TesterTldListener implements 
ServletContextListener {
 
 // Try and use one of the Servlet 3.0 methods that should be blocked
 try {
-sc.getEffectiveMajorVersion();
+sc.getServletRegistrations();
 log.append("FAIL-01");
 } catch (UnsupportedOperationException uoe) {
 log.append("PASS-01");
@@ -53,7 +53,7 @@ public class TesterTldListener implements 
ServletContextListener {
 if (servletContext == sce.getServletContext()) {
 log.append("PASS-02");
 } else {
-//log.append("FAIL-03");
+log.append("FAIL-03");
 }
 }
 }

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] 06/06: Align with 10.1.x - remove unnecessary synchronization

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 92242a7e31a7d0716d33553b6fa9435efa92a649
Author: Mark Thomas 
AuthorDate: Wed Nov 24 12:25:50 2021 +

Align with 10.1.x - remove unnecessary synchronization
---
 .../catalina/core/DefaultInstanceManager.java  | 42 +-
 1 file changed, 16 insertions(+), 26 deletions(-)

diff --git a/java/org/apache/catalina/core/DefaultInstanceManager.java 
b/java/org/apache/catalina/core/DefaultInstanceManager.java
index c82f1cc..9557c05 100644
--- a/java/org/apache/catalina/core/DefaultInstanceManager.java
+++ b/java/org/apache/catalina/core/DefaultInstanceManager.java
@@ -225,13 +225,11 @@ public class DefaultInstanceManager implements 
InstanceManager {
 AnnotationCacheEntry[] annotations = annotationCache.get(clazz);
 for (AnnotationCacheEntry entry : annotations) {
 if (entry.getType() == AnnotationCacheEntryType.POST_CONSTRUCT) {
+// This will always return a new Method instance
+// Making this instance accessible does not affect other 
instances
 Method postConstruct = getMethod(clazz, entry);
-synchronized (postConstruct) {
-boolean accessibility = postConstruct.isAccessible();
-postConstruct.setAccessible(true);
-postConstruct.invoke(instance);
-postConstruct.setAccessible(accessibility);
-}
+postConstruct.setAccessible(true);
+postConstruct.invoke(instance);
 }
 }
 }
@@ -263,13 +261,11 @@ public class DefaultInstanceManager implements 
InstanceManager {
 }
 for (AnnotationCacheEntry entry : annotations) {
 if (entry.getType() == AnnotationCacheEntryType.PRE_DESTROY) {
+// This will always return a new Method instance
+// Making this instance accessible does not affect other 
instances
 Method preDestroy = getMethod(clazz, entry);
-synchronized (preDestroy) {
-boolean accessibility = preDestroy.isAccessible();
-preDestroy.setAccessible(true);
-preDestroy.invoke(instance);
-preDestroy.setAccessible(accessibility);
-}
+preDestroy.setAccessible(true);
+preDestroy.invoke(instance);
 }
 }
 }
@@ -572,7 +568,6 @@ public class DefaultInstanceManager implements 
InstanceManager {
 throws NamingException, IllegalAccessException {
 
 Object lookedupResource;
-boolean accessibility;
 
 String normalizedName = normalize(name);
 
@@ -583,12 +578,10 @@ public class DefaultInstanceManager implements 
InstanceManager {
 context.lookup(clazz.getName() + "/" + field.getName());
 }
 
-synchronized (field) {
-accessibility = field.isAccessible();
-field.setAccessible(true);
-field.set(instance, lookedupResource);
-field.setAccessible(accessibility);
-}
+// This will always be a new Field instance
+// Making this instance accessible does not affect other instances
+field.setAccessible(true);
+field.set(instance, lookedupResource);
 }
 
 /**
@@ -614,7 +607,6 @@ public class DefaultInstanceManager implements 
InstanceManager {
 }
 
 Object lookedupResource;
-boolean accessibility;
 
 String normalizedName = normalize(name);
 
@@ -625,12 +617,10 @@ public class DefaultInstanceManager implements 
InstanceManager {
 clazz.getName() + "/" + 
Introspection.getPropertyName(method));
 }
 
-synchronized (method) {
-accessibility = method.isAccessible();
-method.setAccessible(true);
-method.invoke(instance, lookedupResource);
-method.setAccessible(accessibility);
-}
+// This will always be a new Method instance
+// Making this instance accessible does not affect other instances
+method.setAccessible(true);
+method.invoke(instance, lookedupResource);
 }
 
 private static void loadProperties(Set classNames, String 
resourceName,

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] 05/06: Align with 10.1.x. Remove Tomcat 8 specific reference

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 48711081f46393d6a5ad9c35607b0244f4a1ea93
Author: Mark Thomas 
AuthorDate: Wed Nov 24 12:17:05 2021 +

Align with 10.1.x. Remove Tomcat 8 specific reference
---
 webapps/docs/windows-auth-howto.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webapps/docs/windows-auth-howto.xml 
b/webapps/docs/windows-auth-howto.xml
index 200eb18..f944166 100644
--- a/webapps/docs/windows-auth-howto.xml
+++ b/webapps/docs/windows-auth-howto.xml
@@ -192,7 +192,7 @@ com.sun.security.jgss.krb5.accept {
   Ubuntu Server 12.04.3 LTS 64-bit
   Tomcat 8.0.x (r1546570)
   
-  It should work with any Tomcat 8 release although it is recommended that
+  It should work with any Tomcat release although it is recommended that
   the latest stable release is used.
   The configuration is the same as for Windows but with the following
   changes:

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 9.0.x updated (cd1e61b -> 436b5d3)

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


from cd1e61b  Expand code comments
 new 68ad1a0  Javadoc improvements back-ported from 10.1.x
 new 1f1274b  Align comments and spacing with 10.1.x
 new e4b336f  Remove link to 7.0.x docs. Add link for 10.1.x.
 new 2dac837  Align with 10.1.x
 new 2cc67ca  Align with 10.1.x. Remove Tomcat 8 specific reference
 new 436b5d3  Align with 10.1.x - remove unnecessary synchronization

The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 README.md  |  4 +--
 conf/server.xml|  3 +-
 java/org/apache/catalina/connector/Request.java|  1 -
 .../catalina/core/ApplicationFilterConfig.java | 16 +
 .../catalina/core/DefaultInstanceManager.java  | 42 +-
 .../core/JreMemoryLeakPreventionListener.java  |  6 ++--
 java/org/apache/catalina/filters/CorsFilter.java   |  2 +-
 java/org/apache/catalina/mapper/Mapper.java|  3 +-
 .../org/apache/catalina/mapper/MapperListener.java |  6 ++--
 .../apache/catalina/session/StandardSession.java   |  1 -
 .../apache/catalina/webresources/JarContents.java  |  5 ++-
 .../apache/catalina/webresources/StandardRoot.java |  2 +-
 java/org/apache/coyote/Request.java|  1 -
 java/org/apache/coyote/ajp/AjpProcessor.java   |  2 +-
 java/org/apache/coyote/http2/HpackDecoder.java |  2 +-
 java/org/apache/coyote/http2/Http2Parser.java  |  2 +-
 .../apache/jasper/compiler/AttributeParser.java|  6 
 java/org/apache/jasper/compiler/ELParser.java  |  3 +-
 .../tomcat/dbcp/dbcp2/BasicDataSourceFactory.java  |  4 +--
 .../tomcat/util/bcel/classfile/ClassParser.java| 32 -
 .../tomcat/util/bcel/classfile/ConstantDouble.java |  3 +-
 .../tomcat/util/bcel/classfile/ConstantFloat.java  |  3 +-
 .../util/bcel/classfile/ConstantInteger.java   |  3 +-
 .../tomcat/util/bcel/classfile/ConstantLong.java   |  3 +-
 .../tomcat/util/bcel/classfile/ConstantPool.java   |  4 +--
 java/org/apache/tomcat/util/buf/UriUtil.java   |  4 +--
 .../org/apache/tomcat/util/compat/Jre16Compat.java |  4 ++-
 java/org/apache/tomcat/util/compat/JreCompat.java  |  2 +-
 .../tomcat/util/descriptor/web/SessionConfig.java  |  1 -
 .../apache/tomcat/util/http/parser/TokenList.java  |  4 +--
 .../tomcat/util/net/openssl/OpenSSLContext.java|  1 +
 .../tomcat/websocket/WsWebSocketContainer.java | 11 +++---
 res/rat/rat-excludes.txt   |  3 +-
 .../apache/catalina/core/TesterTldListener.java|  4 +--
 .../startup/TestContextConfigAnnotation.java   |  6 +---
 webapps/docs/windows-auth-howto.xml|  2 +-
 .../classes/websocket/drawboard/Client.java|  3 +-
 .../WEB-INF/classes/websocket/drawboard/Room.java  | 18 +-
 38 files changed, 105 insertions(+), 117 deletions(-)

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] 01/06: Javadoc improvements back-ported from 10.1.x

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 68ad1a022290b0e7ddad9d287ea1ddea21d114aa
Author: Mark Thomas 
AuthorDate: Wed Nov 24 12:09:48 2021 +

Javadoc improvements back-ported from 10.1.x
---
 .../catalina/core/ApplicationFilterConfig.java | 16 ++-
 java/org/apache/catalina/filters/CorsFilter.java   |  2 +-
 java/org/apache/catalina/mapper/Mapper.java|  3 +-
 .../org/apache/catalina/mapper/MapperListener.java |  6 ++--
 .../apache/catalina/webresources/StandardRoot.java |  2 +-
 java/org/apache/coyote/ajp/AjpProcessor.java   |  2 +-
 java/org/apache/coyote/http2/HpackDecoder.java |  2 +-
 java/org/apache/coyote/http2/Http2Parser.java  |  2 +-
 .../apache/jasper/compiler/AttributeParser.java|  6 
 java/org/apache/jasper/compiler/ELParser.java  |  3 +-
 .../tomcat/dbcp/dbcp2/BasicDataSourceFactory.java  |  4 +--
 .../tomcat/util/bcel/classfile/ClassParser.java| 32 +++---
 .../tomcat/util/bcel/classfile/ConstantDouble.java |  3 +-
 .../tomcat/util/bcel/classfile/ConstantFloat.java  |  3 +-
 .../util/bcel/classfile/ConstantInteger.java   |  3 +-
 .../tomcat/util/bcel/classfile/ConstantLong.java   |  3 +-
 .../tomcat/util/bcel/classfile/ConstantPool.java   |  4 +--
 java/org/apache/tomcat/util/buf/UriUtil.java   |  4 +--
 .../apache/tomcat/util/http/parser/TokenList.java  |  4 +--
 .../tomcat/websocket/WsWebSocketContainer.java | 11 +---
 .../startup/TestContextConfigAnnotation.java   |  6 +---
 .../classes/websocket/drawboard/Client.java|  3 +-
 .../WEB-INF/classes/websocket/drawboard/Room.java  | 18 ++--
 23 files changed, 73 insertions(+), 69 deletions(-)

diff --git a/java/org/apache/catalina/core/ApplicationFilterConfig.java 
b/java/org/apache/catalina/core/ApplicationFilterConfig.java
index 8ae9852..c33040c 100644
--- a/java/org/apache/catalina/core/ApplicationFilterConfig.java
+++ b/java/org/apache/catalina/core/ApplicationFilterConfig.java
@@ -84,9 +84,10 @@ public final class ApplicationFilterConfig implements 
FilterConfig, Serializable
  * @exception InstantiationException if an exception occurs while
  *  instantiating the filter object
  * @exception ServletException if thrown by the filter's init() method
- * @throws NamingException
- * @throws SecurityException
- * @throws IllegalArgumentException
+ * @throws NamingException If a JNDI lookup fails
+ * @throws SecurityException If a security manager prevents the creation
+ * @throws IllegalArgumentException If the provided configuration is not
+ * valid
  */
 ApplicationFilterConfig(Context context, FilterDef filterDef)
 throws ClassCastException, ReflectiveOperationException, 
ServletException,
@@ -231,10 +232,11 @@ public final class ApplicationFilterConfig implements 
FilterConfig, Serializable
  * @exception InstantiationException if an exception occurs while
  *  instantiating the filter object
  * @exception ServletException if thrown by the filter's init() method
- * @throws NamingException
- * @throws ReflectiveOperationException
- * @throws SecurityException
- * @throws IllegalArgumentException
+ * @throws NamingException If a JNDI lookup fails
+ * @throws ReflectiveOperationException If the creation of the filter fails
+ * @throws SecurityException If a security manager prevents the creation
+ * @throws IllegalArgumentException If the provided configuration is not
+ * valid
  */
 Filter getFilter() throws ClassCastException, 
ReflectiveOperationException, ServletException,
 NamingException, IllegalArgumentException, SecurityException {
diff --git a/java/org/apache/catalina/filters/CorsFilter.java 
b/java/org/apache/catalina/filters/CorsFilter.java
index 17620a2..3e54568 100644
--- a/java/org/apache/catalina/filters/CorsFilter.java
+++ b/java/org/apache/catalina/filters/CorsFilter.java
@@ -707,7 +707,7 @@ public class CorsFilter extends GenericFilter {
  * @param preflightMaxAge
  *The amount of seconds the user agent is allowed to cache the
  *result of the pre-flight request.
- * @throws ServletException
+ * @throws ServletException If the configuration is invalid
  */
 private void parseAndStore(final String allowedOrigins,
 final String allowedHttpMethods, final String allowedHttpHeaders,
diff --git a/java/org/apache/catalina/mapper/Mapper.java 
b/java/org/apache/catalina/mapper/Mapper.java
index 81ee8d9..73ebc45 100644
--- a/java/org/apache/catalina/mapper/Mapper.java
+++ b/java/org/apache/catalina/mapper/Mapper.java
@@ -730,7 +730,8 @@ public final class Mapper {
 
 /**
  * Map the specified URI.
- * @throws IOException
+ * @throws IOException If an error occurs while manipu

[tomcat] 06/06: Align with 10.1.x - remove unnecessary synchronization

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 436b5d302c00a1fc797db09681f45a72e1e594aa
Author: Mark Thomas 
AuthorDate: Wed Nov 24 12:25:50 2021 +

Align with 10.1.x - remove unnecessary synchronization
---
 .../catalina/core/DefaultInstanceManager.java  | 42 +-
 1 file changed, 16 insertions(+), 26 deletions(-)

diff --git a/java/org/apache/catalina/core/DefaultInstanceManager.java 
b/java/org/apache/catalina/core/DefaultInstanceManager.java
index ee966de..588c367 100644
--- a/java/org/apache/catalina/core/DefaultInstanceManager.java
+++ b/java/org/apache/catalina/core/DefaultInstanceManager.java
@@ -224,13 +224,11 @@ public class DefaultInstanceManager implements 
InstanceManager {
 AnnotationCacheEntry[] annotations = annotationCache.get(clazz);
 for (AnnotationCacheEntry entry : annotations) {
 if (entry.getType() == AnnotationCacheEntryType.POST_CONSTRUCT) {
+// This will always return a new Method instance
+// Making this instance accessible does not affect other 
instances
 Method postConstruct = getMethod(clazz, entry);
-synchronized (postConstruct) {
-boolean accessibility = postConstruct.isAccessible();
-postConstruct.setAccessible(true);
-postConstruct.invoke(instance);
-postConstruct.setAccessible(accessibility);
-}
+postConstruct.setAccessible(true);
+postConstruct.invoke(instance);
 }
 }
 }
@@ -262,13 +260,11 @@ public class DefaultInstanceManager implements 
InstanceManager {
 }
 for (AnnotationCacheEntry entry : annotations) {
 if (entry.getType() == AnnotationCacheEntryType.PRE_DESTROY) {
+// This will always return a new Method instance
+// Making this instance accessible does not affect other 
instances
 Method preDestroy = getMethod(clazz, entry);
-synchronized (preDestroy) {
-boolean accessibility = preDestroy.isAccessible();
-preDestroy.setAccessible(true);
-preDestroy.invoke(instance);
-preDestroy.setAccessible(accessibility);
-}
+preDestroy.setAccessible(true);
+preDestroy.invoke(instance);
 }
 }
 }
@@ -571,7 +567,6 @@ public class DefaultInstanceManager implements 
InstanceManager {
 throws NamingException, IllegalAccessException {
 
 Object lookedupResource;
-boolean accessibility;
 
 String normalizedName = normalize(name);
 
@@ -582,12 +577,10 @@ public class DefaultInstanceManager implements 
InstanceManager {
 context.lookup(clazz.getName() + "/" + field.getName());
 }
 
-synchronized (field) {
-accessibility = field.isAccessible();
-field.setAccessible(true);
-field.set(instance, lookedupResource);
-field.setAccessible(accessibility);
-}
+// This will always be a new Field instance
+// Making this instance accessible does not affect other instances
+field.setAccessible(true);
+field.set(instance, lookedupResource);
 }
 
 /**
@@ -613,7 +606,6 @@ public class DefaultInstanceManager implements 
InstanceManager {
 }
 
 Object lookedupResource;
-boolean accessibility;
 
 String normalizedName = normalize(name);
 
@@ -624,12 +616,10 @@ public class DefaultInstanceManager implements 
InstanceManager {
 clazz.getName() + "/" + 
Introspection.getPropertyName(method));
 }
 
-synchronized (method) {
-accessibility = method.isAccessible();
-method.setAccessible(true);
-method.invoke(instance, lookedupResource);
-method.setAccessible(accessibility);
-}
+// This will always be a new Method instance
+// Making this instance accessible does not affect other instances
+method.setAccessible(true);
+method.invoke(instance, lookedupResource);
 }
 
 private static void loadProperties(Set classNames, String 
resourceName,

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] 02/06: Align comments and spacing with 10.1.x

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 1f1274b3e69bc621eba3564e1cb6fc7797a15df1
Author: Mark Thomas 
AuthorDate: Wed Nov 24 12:14:31 2021 +

Align comments and spacing with 10.1.x
---
 conf/server.xml| 3 +--
 java/org/apache/catalina/connector/Request.java| 1 -
 java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java | 6 ++
 java/org/apache/catalina/session/StandardSession.java  | 1 -
 java/org/apache/catalina/webresources/JarContents.java | 5 ++---
 java/org/apache/coyote/Request.java| 1 -
 java/org/apache/tomcat/util/compat/Jre16Compat.java| 4 +++-
 java/org/apache/tomcat/util/compat/JreCompat.java  | 2 +-
 java/org/apache/tomcat/util/descriptor/web/SessionConfig.java  | 1 -
 java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java| 1 +
 res/rat/rat-excludes.txt   | 3 +--
 11 files changed, 11 insertions(+), 17 deletions(-)

diff --git a/conf/server.xml b/conf/server.xml
index 5915407..1e8139d 100644
--- a/conf/server.xml
+++ b/conf/server.xml
@@ -79,8 +79,7 @@
 
diff --git a/java/org/apache/catalina/connector/Request.java 
b/java/org/apache/catalina/connector/Request.java
index 0d2c5ff..ff599aa 100644
--- a/java/org/apache/catalina/connector/Request.java
+++ b/java/org/apache/catalina/connector/Request.java
@@ -1828,7 +1828,6 @@ public class Request implements HttpServletRequest {
 
 //  HttpRequest Methods
 
-
 /**
  * Add a Cookie to the set of Cookies associated with this Request.
  *
diff --git a/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java 
b/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
index baa34c2..b8e0f22 100644
--- a/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
+++ b/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
@@ -204,7 +204,6 @@ public class JreMemoryLeakPreventionListener implements 
LifecycleListener {
 }
 
 
-
 @Override
 public void lifecycleEvent(LifecycleEvent event) {
 // Initialise these classes when Tomcat starts
@@ -231,8 +230,7 @@ public class JreMemoryLeakPreventionListener implements 
LifecycleListener {
 
 ClassLoader loader = 
Thread.currentThread().getContextClassLoader();
 
-try
-{
+try {
 // Use the system classloader as the victim for all this
 // ClassLoader pinning we're about to do.
 Thread.currentThread().setContextClassLoader(
@@ -248,7 +246,7 @@ public class JreMemoryLeakPreventionListener implements 
LifecycleListener {
  * - Batik
  * - others TBD
  *
- * Note tha a call to sun.awt.AppContext.getAppContext() 
results
+ * Note that a call to sun.awt.AppContext.getAppContext() 
results
  * in a thread being started named AWT-AppKit that requires a
  * graphical environment to be available.
  */
diff --git a/java/org/apache/catalina/session/StandardSession.java 
b/java/org/apache/catalina/session/StandardSession.java
index 6b3ef4c..d1aa575 100644
--- a/java/org/apache/catalina/session/StandardSession.java
+++ b/java/org/apache/catalina/session/StandardSession.java
@@ -1132,7 +1132,6 @@ public class StandardSession implements HttpSession, 
Session, Serializable {
 
 // --HttpSession Public Methods
 
-
 /**
  * Return the object bound with the specified name in this session, or
  * null if no object is bound with that name.
diff --git a/java/org/apache/catalina/webresources/JarContents.java 
b/java/org/apache/catalina/webresources/JarContents.java
index 0afa9fa..2718072 100644
--- a/java/org/apache/catalina/webresources/JarContents.java
+++ b/java/org/apache/catalina/webresources/JarContents.java
@@ -58,7 +58,6 @@ public final class JarContents {
 bits1 = new BitSet(TABLE_SIZE);
 bits2 = new BitSet(TABLE_SIZE);
 
-// Enumerations. When will they update this API?!
 while (entries.hasMoreElements()) {
 JarEntry entry = entries.nextElement();
 String name = entry.getName();
@@ -140,9 +139,9 @@ public final class JarContents {
 startPos++;
 }
 
-// calculate the hash lazyly and return a boolean value for this path
+// calculate the hash lazily and return a boolean value for this path
 return (bits1.get(hashcode(path, startPos, HASH_PRIME_1) % TABLE_SIZE) 
&&
 bits2.get(hashcode(path, startPos, HASH_PRIME_2) % 
TABLE_SIZE));
 }
 
-}
\

[tomcat] 03/06: Remove link to 7.0.x docs. Add link for 10.1.x.

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit e4b336fbbb83e668619a260aec0a90b4a51b9733
Author: Mark Thomas 
AuthorDate: Wed Nov 24 12:15:56 2021 +

Remove link to 7.0.x docs. Add link for 10.1.x.
---
 README.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index ec1353d..e1e224a 100644
--- a/README.md
+++ b/README.md
@@ -43,10 +43,10 @@ The documentation available as of the date of this release 
is
 included in the docs webapp which ships with tomcat. You can access that webapp
 by starting tomcat and visiting  in your browser.
 The most up-to-date documentation for each version can be found at:
-- [Tomcat 10](https://tomcat.apache.org/tomcat-10.0-doc/)
+- [Tomcat 10.1](https://tomcat.apache.org/tomcat-10.1-doc/)
+- [Tomcat 10.0](https://tomcat.apache.org/tomcat-10.0-doc/)
 - [Tomcat 9](https://tomcat.apache.org/tomcat-9.0-doc/)
 - [Tomcat 8](https://tomcat.apache.org/tomcat-8.5-doc/)
-- [Tomcat 7](https://tomcat.apache.org/tomcat-7.0-doc/)
 
 ### Installation
 

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] 04/06: Align with 10.1.x

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 2dac837102dab045d379308539e8f0ee9ea5be1b
Author: Mark Thomas 
AuthorDate: Wed Nov 24 12:16:46 2021 +

Align with 10.1.x

Change method to one that works with Servlet <=5 and >=6
Uncomment failure case handling.
---
 test/org/apache/catalina/core/TesterTldListener.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/org/apache/catalina/core/TesterTldListener.java 
b/test/org/apache/catalina/core/TesterTldListener.java
index 7844886..0036f5b 100644
--- a/test/org/apache/catalina/core/TesterTldListener.java
+++ b/test/org/apache/catalina/core/TesterTldListener.java
@@ -38,7 +38,7 @@ public class TesterTldListener implements 
ServletContextListener {
 
 // Try and use one of the Servlet 3.0 methods that should be blocked
 try {
-sc.getEffectiveMajorVersion();
+sc.getServletRegistrations();
 log.append("FAIL-01");
 } catch (UnsupportedOperationException uoe) {
 log.append("PASS-01");
@@ -53,7 +53,7 @@ public class TesterTldListener implements 
ServletContextListener {
 if (servletContext == sce.getServletContext()) {
 log.append("PASS-02");
 } else {
-//log.append("FAIL-03");
+log.append("FAIL-03");
 }
 }
 }

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] 05/06: Align with 10.1.x. Remove Tomcat 8 specific reference

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 2cc67ca6b0a6efb1df0eafb441ec2b38d7065c66
Author: Mark Thomas 
AuthorDate: Wed Nov 24 12:17:05 2021 +

Align with 10.1.x. Remove Tomcat 8 specific reference
---
 webapps/docs/windows-auth-howto.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webapps/docs/windows-auth-howto.xml 
b/webapps/docs/windows-auth-howto.xml
index 200eb18..f944166 100644
--- a/webapps/docs/windows-auth-howto.xml
+++ b/webapps/docs/windows-auth-howto.xml
@@ -192,7 +192,7 @@ com.sun.security.jgss.krb5.accept {
   Ubuntu Server 12.04.3 LTS 64-bit
   Tomcat 8.0.x (r1546570)
   
-  It should work with any Tomcat 8 release although it is recommended that
+  It should work with any Tomcat release although it is recommended that
   the latest stable release is used.
   The configuration is the same as for Windows but with the following
   changes:

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 8.5.x updated (9a132b6 -> f048bb9)

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


from 9a132b6  Expand code comments
 new e60a531  Javadoc improvements back-ported from 10.1.x
 new 94b9638  Align comments and spacing with 10.1.x
 new fd0d4be  Remove link to 7.0.x docs. Add link for 10.1.x.
 new b58a2ad  Align with 10.1.x
 new 2c01fd6  Align with 10.1.x. Remove Tomcat 8 specific reference
 new f048bb9  Align with 10.1.x - remove unnecessary synchronization

The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 README.md  |  4 +--
 conf/server.xml|  3 +-
 java/org/apache/catalina/connector/Request.java|  1 -
 .../catalina/core/DefaultInstanceManager.java  | 42 +-
 .../core/JreMemoryLeakPreventionListener.java  |  4 +--
 java/org/apache/catalina/filters/CorsFilter.java   |  2 +-
 java/org/apache/catalina/mapper/Mapper.java|  3 +-
 .../org/apache/catalina/mapper/MapperListener.java |  6 ++--
 .../apache/catalina/session/StandardSession.java   |  1 -
 .../apache/catalina/webresources/StandardRoot.java |  2 +-
 java/org/apache/coyote/Request.java|  1 -
 java/org/apache/coyote/ajp/AjpProcessor.java   |  2 +-
 java/org/apache/coyote/http2/HpackDecoder.java |  2 +-
 .../apache/jasper/compiler/AttributeParser.java|  6 
 java/org/apache/jasper/compiler/ELParser.java  |  3 +-
 .../tomcat/util/bcel/classfile/ClassParser.java| 32 -
 .../tomcat/util/bcel/classfile/ConstantDouble.java |  3 +-
 .../tomcat/util/bcel/classfile/ConstantFloat.java  |  3 +-
 .../util/bcel/classfile/ConstantInteger.java   |  3 +-
 .../tomcat/util/bcel/classfile/ConstantLong.java   |  3 +-
 .../tomcat/util/bcel/classfile/ConstantPool.java   |  4 +--
 java/org/apache/tomcat/util/buf/UriUtil.java   |  4 +--
 .../tomcat/util/descriptor/web/SessionConfig.java  |  1 -
 .../apache/tomcat/util/http/parser/TokenList.java  |  4 +--
 .../tomcat/util/net/openssl/OpenSSLContext.java|  1 +
 .../tomcat/websocket/WsWebSocketContainer.java | 11 +++---
 res/rat/rat-excludes.txt   |  3 +-
 .../apache/catalina/core/TesterTldListener.java|  4 +--
 .../startup/TestContextConfigAnnotation.java   |  6 +---
 webapps/docs/windows-auth-howto.xml|  2 +-
 .../classes/websocket/drawboard/Client.java|  3 +-
 .../WEB-INF/classes/websocket/drawboard/Room.java  | 18 +-
 32 files changed, 86 insertions(+), 101 deletions(-)

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] 05/06: Align with 10.1.x. Remove Tomcat 8 specific reference

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 2c01fd65323943278b9ccd06abf042f02f395e50
Author: Mark Thomas 
AuthorDate: Wed Nov 24 12:17:05 2021 +

Align with 10.1.x. Remove Tomcat 8 specific reference
---
 webapps/docs/windows-auth-howto.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webapps/docs/windows-auth-howto.xml 
b/webapps/docs/windows-auth-howto.xml
index 1104225..385e76d 100644
--- a/webapps/docs/windows-auth-howto.xml
+++ b/webapps/docs/windows-auth-howto.xml
@@ -188,7 +188,7 @@ com.sun.security.jgss.krb5.accept {
   Ubuntu Server 12.04.3 LTS 64-bit
   Tomcat 8.0.x (r1546570)
   
-  It should work with any Tomcat 8 release although it is recommended that
+  It should work with any Tomcat release although it is recommended that
   the latest stable release is used.
   The configuration is the same as for Windows but with the following
   changes:

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] 01/06: Javadoc improvements back-ported from 10.1.x

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit e60a531e2ff1a2c386ec977a5fb23dda0e1d01cd
Author: Mark Thomas 
AuthorDate: Wed Nov 24 12:09:48 2021 +

Javadoc improvements back-ported from 10.1.x
---
 java/org/apache/catalina/filters/CorsFilter.java   |  2 +-
 java/org/apache/catalina/mapper/Mapper.java|  3 +-
 .../org/apache/catalina/mapper/MapperListener.java |  6 ++--
 .../apache/catalina/webresources/StandardRoot.java |  2 +-
 java/org/apache/coyote/ajp/AjpProcessor.java   |  2 +-
 java/org/apache/coyote/http2/HpackDecoder.java |  2 +-
 .../apache/jasper/compiler/AttributeParser.java|  6 
 java/org/apache/jasper/compiler/ELParser.java  |  3 +-
 .../tomcat/util/bcel/classfile/ClassParser.java| 32 +++---
 .../tomcat/util/bcel/classfile/ConstantDouble.java |  3 +-
 .../tomcat/util/bcel/classfile/ConstantFloat.java  |  3 +-
 .../util/bcel/classfile/ConstantInteger.java   |  3 +-
 .../tomcat/util/bcel/classfile/ConstantLong.java   |  3 +-
 .../tomcat/util/bcel/classfile/ConstantPool.java   |  4 +--
 java/org/apache/tomcat/util/buf/UriUtil.java   |  4 +--
 .../apache/tomcat/util/http/parser/TokenList.java  |  4 +--
 .../tomcat/websocket/WsWebSocketContainer.java | 11 +---
 .../startup/TestContextConfigAnnotation.java   |  6 +---
 .../classes/websocket/drawboard/Client.java|  3 +-
 .../WEB-INF/classes/websocket/drawboard/Room.java  | 18 ++--
 20 files changed, 61 insertions(+), 59 deletions(-)

diff --git a/java/org/apache/catalina/filters/CorsFilter.java 
b/java/org/apache/catalina/filters/CorsFilter.java
index 63eb1fc..2017315 100644
--- a/java/org/apache/catalina/filters/CorsFilter.java
+++ b/java/org/apache/catalina/filters/CorsFilter.java
@@ -724,7 +724,7 @@ public class CorsFilter implements Filter {
  * @param preflightMaxAge
  *The amount of seconds the user agent is allowed to cache the
  *result of the pre-flight request.
- * @throws ServletException
+ * @throws ServletException If the configuration is invalid
  */
 private void parseAndStore(final String allowedOrigins,
 final String allowedHttpMethods, final String allowedHttpHeaders,
diff --git a/java/org/apache/catalina/mapper/Mapper.java 
b/java/org/apache/catalina/mapper/Mapper.java
index 30d10a2..eb1222d 100644
--- a/java/org/apache/catalina/mapper/Mapper.java
+++ b/java/org/apache/catalina/mapper/Mapper.java
@@ -730,7 +730,8 @@ public final class Mapper {
 
 /**
  * Map the specified URI.
- * @throws IOException
+ * @throws IOException If an error occurs while manipulating the URI during
+ * the mapping
  */
 @SuppressWarnings("deprecation") // contextPath
 private final void internalMap(CharChunk host, CharChunk uri,
diff --git a/java/org/apache/catalina/mapper/MapperListener.java 
b/java/org/apache/catalina/mapper/MapperListener.java
index b918e8d..2c0cc05 100644
--- a/java/org/apache/catalina/mapper/MapperListener.java
+++ b/java/org/apache/catalina/mapper/MapperListener.java
@@ -512,7 +512,8 @@ public class MapperListener extends LifecycleMBeanBase
 /**
  * Add this mapper to the container and all child containers
  *
- * @param container
+ * @param container the container (and any associated childern) to which
+ *the mapper is to be added
  */
 private void addListeners(Container container) {
 container.addContainerListener(this);
@@ -526,7 +527,8 @@ public class MapperListener extends LifecycleMBeanBase
 /**
  * Remove this mapper from the container and all child containers
  *
- * @param container
+ * @param container the container (and any associated childern) from which
+ *the mapper is to be removed
  */
 private void removeListeners(Container container) {
 container.removeContainerListener(this);
diff --git a/java/org/apache/catalina/webresources/StandardRoot.java 
b/java/org/apache/catalina/webresources/StandardRoot.java
index b42ed21..6d3a462 100644
--- a/java/org/apache/catalina/webresources/StandardRoot.java
+++ b/java/org/apache/catalina/webresources/StandardRoot.java
@@ -236,7 +236,7 @@ public class StandardRoot extends LifecycleMBeanBase 
implements WebResourceRoot
  * that the path is a String that starts with '/' and checks that the path
  * can be normalized without stepping outside of the root.
  *
- * @param path
+ * @param path The path to validate
  * @return  the normalized path
  */
 private String validate(String path) {
diff --git a/java/org/apache/coyote/ajp/AjpProcessor.java 
b/java/org/apache/coyote/ajp/AjpProcessor.java
index f656b45..69db2e4 100644
--- a/java/org/apache/coyote/ajp/AjpProcessor.java
+++ b/java/org/apache/coyote/ajp/AjpProcessor.java
@@ -1323,7 +1323,

[tomcat] 03/06: Remove link to 7.0.x docs. Add link for 10.1.x.

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit fd0d4be71927ac72a01259c0e98e6e6602123b3f
Author: Mark Thomas 
AuthorDate: Wed Nov 24 12:15:56 2021 +

Remove link to 7.0.x docs. Add link for 10.1.x.
---
 README.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index ec1353d..e1e224a 100644
--- a/README.md
+++ b/README.md
@@ -43,10 +43,10 @@ The documentation available as of the date of this release 
is
 included in the docs webapp which ships with tomcat. You can access that webapp
 by starting tomcat and visiting  in your browser.
 The most up-to-date documentation for each version can be found at:
-- [Tomcat 10](https://tomcat.apache.org/tomcat-10.0-doc/)
+- [Tomcat 10.1](https://tomcat.apache.org/tomcat-10.1-doc/)
+- [Tomcat 10.0](https://tomcat.apache.org/tomcat-10.0-doc/)
 - [Tomcat 9](https://tomcat.apache.org/tomcat-9.0-doc/)
 - [Tomcat 8](https://tomcat.apache.org/tomcat-8.5-doc/)
-- [Tomcat 7](https://tomcat.apache.org/tomcat-7.0-doc/)
 
 ### Installation
 

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] 02/06: Align comments and spacing with 10.1.x

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 94b96382fbb3160d134fefa9767ee64c58457722
Author: Mark Thomas 
AuthorDate: Wed Nov 24 12:14:31 2021 +

Align comments and spacing with 10.1.x
---
 conf/server.xml| 3 +--
 java/org/apache/catalina/connector/Request.java| 1 -
 java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java | 4 +---
 java/org/apache/catalina/session/StandardSession.java  | 1 -
 java/org/apache/coyote/Request.java| 1 -
 java/org/apache/tomcat/util/descriptor/web/SessionConfig.java  | 1 -
 java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java| 1 +
 res/rat/rat-excludes.txt   | 3 +--
 8 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/conf/server.xml b/conf/server.xml
index 5915407..1e8139d 100644
--- a/conf/server.xml
+++ b/conf/server.xml
@@ -79,8 +79,7 @@
 
diff --git a/java/org/apache/catalina/connector/Request.java 
b/java/org/apache/catalina/connector/Request.java
index 50d3174..6914b0e 100644
--- a/java/org/apache/catalina/connector/Request.java
+++ b/java/org/apache/catalina/connector/Request.java
@@ -1836,7 +1836,6 @@ public class Request implements HttpServletRequest {
 
 //  HttpRequest Methods
 
-
 /**
  * Add a Cookie to the set of Cookies associated with this Request.
  *
diff --git a/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java 
b/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
index 58f1382..314ebbc 100644
--- a/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
+++ b/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
@@ -229,7 +229,6 @@ public class JreMemoryLeakPreventionListener implements 
LifecycleListener {
 }
 
 
-
 @Override
 public void lifecycleEvent(LifecycleEvent event) {
 // Initialise these classes when Tomcat starts
@@ -256,8 +255,7 @@ public class JreMemoryLeakPreventionListener implements 
LifecycleListener {
 
 ClassLoader loader = 
Thread.currentThread().getContextClassLoader();
 
-try
-{
+try {
 // Use the system classloader as the victim for all this
 // ClassLoader pinning we're about to do.
 Thread.currentThread().setContextClassLoader(
diff --git a/java/org/apache/catalina/session/StandardSession.java 
b/java/org/apache/catalina/session/StandardSession.java
index e7bdfeb..2d1f296 100644
--- a/java/org/apache/catalina/session/StandardSession.java
+++ b/java/org/apache/catalina/session/StandardSession.java
@@ -1132,7 +1132,6 @@ public class StandardSession implements HttpSession, 
Session, Serializable {
 
 // --HttpSession Public Methods
 
-
 /**
  * Return the object bound with the specified name in this session, or
  * null if no object is bound with that name.
diff --git a/java/org/apache/coyote/Request.java 
b/java/org/apache/coyote/Request.java
index 94c5d0f..b82856d 100644
--- a/java/org/apache/coyote/Request.java
+++ b/java/org/apache/coyote/Request.java
@@ -102,7 +102,6 @@ public final class Request {
 
 private final MimeHeaders headers = new MimeHeaders();
 
-
 /**
  * Path parameters
  */
diff --git a/java/org/apache/tomcat/util/descriptor/web/SessionConfig.java 
b/java/org/apache/tomcat/util/descriptor/web/SessionConfig.java
index 5c4d300..a282bd3 100644
--- a/java/org/apache/tomcat/util/descriptor/web/SessionConfig.java
+++ b/java/org/apache/tomcat/util/descriptor/web/SessionConfig.java
@@ -100,5 +100,4 @@ public class SessionConfig {
 sessionTrackingModes.add(
 SessionTrackingMode.valueOf(sessionTrackingMode));
 }
-
 }
diff --git a/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java 
b/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java
index 807a79b..6d98744 100644
--- a/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java
+++ b/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java
@@ -198,6 +198,7 @@ public class OpenSSLContext implements 
org.apache.tomcat.util.net.SSLContext {
 }
 }
 
+
 protected static boolean checkConf(OpenSSLConf conf, long cctx) throws 
Exception {
 boolean result = true;
 OpenSSLConfCmd cmd;
diff --git a/res/rat/rat-excludes.txt b/res/rat/rat-excludes.txt
index a8e6be3..a033c97 100644
--- a/res/rat/rat-excludes.txt
+++ b/res/rat/rat-excludes.txt
@@ -27,8 +27,7 @@
 
   - *.manifest, MANIFEST.MF JAR manifest files cannot contain license
 
-  - package-list and script.js files in API documentation (javadoc) are
-generated
+  - Files in API documentation (javadoc) th

[tomcat] 04/06: Align with 10.1.x

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit b58a2ada3adba4658d3e8de1ce7067eb90b29bc4
Author: Mark Thomas 
AuthorDate: Wed Nov 24 12:16:46 2021 +

Align with 10.1.x

Change method to one that works with Servlet <=5 and >=6
Uncomment failure case handling.
---
 test/org/apache/catalina/core/TesterTldListener.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/org/apache/catalina/core/TesterTldListener.java 
b/test/org/apache/catalina/core/TesterTldListener.java
index 7844886..0036f5b 100644
--- a/test/org/apache/catalina/core/TesterTldListener.java
+++ b/test/org/apache/catalina/core/TesterTldListener.java
@@ -38,7 +38,7 @@ public class TesterTldListener implements 
ServletContextListener {
 
 // Try and use one of the Servlet 3.0 methods that should be blocked
 try {
-sc.getEffectiveMajorVersion();
+sc.getServletRegistrations();
 log.append("FAIL-01");
 } catch (UnsupportedOperationException uoe) {
 log.append("PASS-01");
@@ -53,7 +53,7 @@ public class TesterTldListener implements 
ServletContextListener {
 if (servletContext == sce.getServletContext()) {
 log.append("PASS-02");
 } else {
-//log.append("FAIL-03");
+log.append("FAIL-03");
 }
 }
 }

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] 06/06: Align with 10.1.x - remove unnecessary synchronization

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit f048bb97299ad1f37bd09c2b62db7fccea24336c
Author: Mark Thomas 
AuthorDate: Wed Nov 24 12:25:50 2021 +

Align with 10.1.x - remove unnecessary synchronization
---
 .../catalina/core/DefaultInstanceManager.java  | 42 +-
 1 file changed, 16 insertions(+), 26 deletions(-)

diff --git a/java/org/apache/catalina/core/DefaultInstanceManager.java 
b/java/org/apache/catalina/core/DefaultInstanceManager.java
index d34d213..c104d45 100644
--- a/java/org/apache/catalina/core/DefaultInstanceManager.java
+++ b/java/org/apache/catalina/core/DefaultInstanceManager.java
@@ -224,13 +224,11 @@ public class DefaultInstanceManager implements 
InstanceManager {
 AnnotationCacheEntry[] annotations = annotationCache.get(clazz);
 for (AnnotationCacheEntry entry : annotations) {
 if (entry.getType() == AnnotationCacheEntryType.POST_CONSTRUCT) {
+// This will always return a new Method instance
+// Making this instance accessible does not affect other 
instances
 Method postConstruct = getMethod(clazz, entry);
-synchronized (postConstruct) {
-boolean accessibility = postConstruct.isAccessible();
-postConstruct.setAccessible(true);
-postConstruct.invoke(instance);
-postConstruct.setAccessible(accessibility);
-}
+postConstruct.setAccessible(true);
+postConstruct.invoke(instance);
 }
 }
 }
@@ -262,13 +260,11 @@ public class DefaultInstanceManager implements 
InstanceManager {
 }
 for (AnnotationCacheEntry entry : annotations) {
 if (entry.getType() == AnnotationCacheEntryType.PRE_DESTROY) {
+// This will always return a new Method instance
+// Making this instance accessible does not affect other 
instances
 Method preDestroy = getMethod(clazz, entry);
-synchronized (preDestroy) {
-boolean accessibility = preDestroy.isAccessible();
-preDestroy.setAccessible(true);
-preDestroy.invoke(instance);
-preDestroy.setAccessible(accessibility);
-}
+preDestroy.setAccessible(true);
+preDestroy.invoke(instance);
 }
 }
 }
@@ -570,7 +566,6 @@ public class DefaultInstanceManager implements 
InstanceManager {
 throws NamingException, IllegalAccessException {
 
 Object lookedupResource;
-boolean accessibility;
 
 String normalizedName = normalize(name);
 
@@ -581,12 +576,10 @@ public class DefaultInstanceManager implements 
InstanceManager {
 context.lookup(clazz.getName() + "/" + field.getName());
 }
 
-synchronized (field) {
-accessibility = field.isAccessible();
-field.setAccessible(true);
-field.set(instance, lookedupResource);
-field.setAccessible(accessibility);
-}
+// This will always be a new Field instance
+// Making this instance accessible does not affect other instances
+field.setAccessible(true);
+field.set(instance, lookedupResource);
 }
 
 /**
@@ -612,7 +605,6 @@ public class DefaultInstanceManager implements 
InstanceManager {
 }
 
 Object lookedupResource;
-boolean accessibility;
 
 String normalizedName = normalize(name);
 
@@ -623,12 +615,10 @@ public class DefaultInstanceManager implements 
InstanceManager {
 clazz.getName() + "/" + 
Introspection.getPropertyName(method));
 }
 
-synchronized (method) {
-accessibility = method.isAccessible();
-method.setAccessible(true);
-method.invoke(instance, lookedupResource);
-method.setAccessible(accessibility);
-}
+// This will always be a new Method instance
+// Making this instance accessible does not affect other instances
+method.setAccessible(true);
+method.invoke(instance, lookedupResource);
 }
 
 private static void loadProperties(Set classNames, String 
resourceName,

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch main updated: Try increasing further before exploring other options

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new 89fb981  Try increasing further before exploring other options
89fb981 is described below

commit 89fb981cda537ed4b7a2955a2eba7402e7e32dc5
Author: Mark Thomas 
AuthorDate: Wed Nov 24 13:58:27 2021 +

Try increasing further before exploring other options
---
 test/org/apache/jasper/servlet/TestJspServlet.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/test/org/apache/jasper/servlet/TestJspServlet.java 
b/test/org/apache/jasper/servlet/TestJspServlet.java
index a875399..bb77086 100644
--- a/test/org/apache/jasper/servlet/TestJspServlet.java
+++ b/test/org/apache/jasper/servlet/TestJspServlet.java
@@ -58,8 +58,9 @@ public class TestJspServlet  extends TomcatBaseTest {
 
 tomcat.start();
 
+// When using JaCoCo, the CI system seems to need a longer timeout
 int rc = methodUrl("http://localhost:"; + getPort() + "/test/bug56568",
-new ByteChunk(), 1, null, null, "PUT");
+new ByteChunk(), 3, null, null, "PUT");
 
 // Make sure we get the original 500 response and not a 405 response
 // which would indicate that error.jsp is complaining about being 
called

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 10.0.x updated: Try increasing further before exploring other options

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.0.x by this push:
 new b6c03cf  Try increasing further before exploring other options
b6c03cf is described below

commit b6c03cf0bc3fff628a653dfa2b5582e388f211ed
Author: Mark Thomas 
AuthorDate: Wed Nov 24 13:58:27 2021 +

Try increasing further before exploring other options
---
 test/org/apache/jasper/servlet/TestJspServlet.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/test/org/apache/jasper/servlet/TestJspServlet.java 
b/test/org/apache/jasper/servlet/TestJspServlet.java
index a875399..bb77086 100644
--- a/test/org/apache/jasper/servlet/TestJspServlet.java
+++ b/test/org/apache/jasper/servlet/TestJspServlet.java
@@ -58,8 +58,9 @@ public class TestJspServlet  extends TomcatBaseTest {
 
 tomcat.start();
 
+// When using JaCoCo, the CI system seems to need a longer timeout
 int rc = methodUrl("http://localhost:"; + getPort() + "/test/bug56568",
-new ByteChunk(), 1, null, null, "PUT");
+new ByteChunk(), 3, null, null, "PUT");
 
 // Make sure we get the original 500 response and not a 405 response
 // which would indicate that error.jsp is complaining about being 
called

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch main updated: Another test where the CI system seems to need longer

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new 49df1a2  Another test where the CI system seems to need longer
49df1a2 is described below

commit 49df1a2e8d7c92981ed679d1afc10cba231c61c2
Author: Mark Thomas 
AuthorDate: Wed Nov 24 14:12:34 2021 +

Another test where the CI system seems to need longer
---
 test/org/apache/catalina/core/TestStandardContextValve.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/org/apache/catalina/core/TestStandardContextValve.java 
b/test/org/apache/catalina/core/TestStandardContextValve.java
index 12879e1..1805137 100644
--- a/test/org/apache/catalina/core/TestStandardContextValve.java
+++ b/test/org/apache/catalina/core/TestStandardContextValve.java
@@ -74,7 +74,7 @@ public class TestStandardContextValve extends TomcatBaseTest {
 
 // Need to allow time (but not too long in case the test fails) for
 // ServletRequestListener to complete
-int i = 20;
+int i = 40;
 while (i > 0) {
 if (trace.toString().endsWith("Destroy")) {
 break;
@@ -125,7 +125,7 @@ public class TestStandardContextValve extends 
TomcatBaseTest {
 
 // Need to allow time (but not too long in case the test fails) for
 // ServletRequestListener to complete
-int i = 20;
+int i = 40;
 while (i > 0) {
 if (trace.toString().endsWith("Destroy")) {
 break;

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 10.0.x updated: Another test where the CI system seems to need longer

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.0.x by this push:
 new 46e9270  Another test where the CI system seems to need longer
46e9270 is described below

commit 46e9270912ebb45471abdbf22b262c49faa63b3b
Author: Mark Thomas 
AuthorDate: Wed Nov 24 14:12:34 2021 +

Another test where the CI system seems to need longer
---
 test/org/apache/catalina/core/TestStandardContextValve.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/org/apache/catalina/core/TestStandardContextValve.java 
b/test/org/apache/catalina/core/TestStandardContextValve.java
index 12879e1..1805137 100644
--- a/test/org/apache/catalina/core/TestStandardContextValve.java
+++ b/test/org/apache/catalina/core/TestStandardContextValve.java
@@ -74,7 +74,7 @@ public class TestStandardContextValve extends TomcatBaseTest {
 
 // Need to allow time (but not too long in case the test fails) for
 // ServletRequestListener to complete
-int i = 20;
+int i = 40;
 while (i > 0) {
 if (trace.toString().endsWith("Destroy")) {
 break;
@@ -125,7 +125,7 @@ public class TestStandardContextValve extends 
TomcatBaseTest {
 
 // Need to allow time (but not too long in case the test fails) for
 // ServletRequestListener to complete
-int i = 20;
+int i = 40;
 while (i > 0) {
 if (trace.toString().endsWith("Destroy")) {
 break;

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 9.0.x updated: Another test where the CI system seems to need longer

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 072fe5a  Another test where the CI system seems to need longer
072fe5a is described below

commit 072fe5a97c148bbf67c054dcb9f141b1a8984a2e
Author: Mark Thomas 
AuthorDate: Wed Nov 24 14:12:34 2021 +

Another test where the CI system seems to need longer
---
 test/org/apache/catalina/core/TestStandardContextValve.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/org/apache/catalina/core/TestStandardContextValve.java 
b/test/org/apache/catalina/core/TestStandardContextValve.java
index 8974d58..fd26472 100644
--- a/test/org/apache/catalina/core/TestStandardContextValve.java
+++ b/test/org/apache/catalina/core/TestStandardContextValve.java
@@ -74,7 +74,7 @@ public class TestStandardContextValve extends TomcatBaseTest {
 
 // Need to allow time (but not too long in case the test fails) for
 // ServletRequestListener to complete
-int i = 20;
+int i = 40;
 while (i > 0) {
 if (trace.toString().endsWith("Destroy")) {
 break;
@@ -125,7 +125,7 @@ public class TestStandardContextValve extends 
TomcatBaseTest {
 
 // Need to allow time (but not too long in case the test fails) for
 // ServletRequestListener to complete
-int i = 20;
+int i = 40;
 while (i > 0) {
 if (trace.toString().endsWith("Destroy")) {
 break;

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 8.5.x updated: Another test where the CI system seems to need longer

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 7f68668  Another test where the CI system seems to need longer
7f68668 is described below

commit 7f686681959e34e028f1f6fc536dddb34f5425c2
Author: Mark Thomas 
AuthorDate: Wed Nov 24 14:12:34 2021 +

Another test where the CI system seems to need longer
---
 test/org/apache/catalina/core/TestStandardContextValve.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/org/apache/catalina/core/TestStandardContextValve.java 
b/test/org/apache/catalina/core/TestStandardContextValve.java
index 8974d58..fd26472 100644
--- a/test/org/apache/catalina/core/TestStandardContextValve.java
+++ b/test/org/apache/catalina/core/TestStandardContextValve.java
@@ -74,7 +74,7 @@ public class TestStandardContextValve extends TomcatBaseTest {
 
 // Need to allow time (but not too long in case the test fails) for
 // ServletRequestListener to complete
-int i = 20;
+int i = 40;
 while (i > 0) {
 if (trace.toString().endsWith("Destroy")) {
 break;
@@ -125,7 +125,7 @@ public class TestStandardContextValve extends 
TomcatBaseTest {
 
 // Need to allow time (but not too long in case the test fails) for
 // ServletRequestListener to complete
-int i = 20;
+int i = 40;
 while (i > 0) {
 if (trace.toString().endsWith("Destroy")) {
 break;

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch main updated: Add missing call

2021-11-24 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new 7639bd0  Add missing call
7639bd0 is described below

commit 7639bd0f6bb90436c19fed8e04ff7a4e8e5e544e
Author: remm 
AuthorDate: Wed Nov 24 15:59:51 2021 +0100

Add missing call
---
 .../java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/modules/openssl-java17/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java
 
b/modules/openssl-java17/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java
index 69f1f71..ad07d20 100644
--- 
a/modules/openssl-java17/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java
+++ 
b/modules/openssl-java17/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java
@@ -1146,7 +1146,7 @@ public class OpenSSLContext implements 
org.apache.tomcat.util.net.SSLContext {
 //
sslHostConfig.getCertificateRevocationListFile()),
 //SSLHostConfig.adjustRelativePath(
 //
sslHostConfig.getCertificateRevocationListPath()));
-MemoryAddress certificateStore = (state.sslCtx);
+MemoryAddress certificateStore = 
SSL_CTX_get_cert_store(state.sslCtx);
 if (sslHostConfig.getCertificateRevocationListFile() != null) {
 MemoryAddress x509Lookup = 
X509_STORE_add_lookup(certificateStore, X509_LOOKUP_file());
 var certificateRevocationListFileNative =

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 9.0.x updated: Fix BZ 65684 - avoid NPE

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 6a4381c  Fix BZ 65684 - avoid NPE
6a4381c is described below

commit 6a4381c2c6684a08b345dd4fade261b317be9d88
Author: Mark Thomas 
AuthorDate: Wed Nov 24 17:53:14 2021 +

Fix BZ 65684 - avoid NPE

https://bz.apache.org/bugzilla/show_bug.cgi?id=65684
---
 java/org/apache/juli/ClassLoaderLogManager.java | 21 +++--
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/java/org/apache/juli/ClassLoaderLogManager.java 
b/java/org/apache/juli/ClassLoaderLogManager.java
index 42e8f11..227b4e1 100644
--- a/java/org/apache/juli/ClassLoaderLogManager.java
+++ b/java/org/apache/juli/ClassLoaderLogManager.java
@@ -292,24 +292,25 @@ public class ClassLoaderLogManager extends LogManager {
 
 
 private synchronized String findProperty(String name) {
-ClassLoader classLoader = Thread.currentThread()
-.getContextClassLoader();
+ClassLoader classLoader = 
Thread.currentThread().getContextClassLoader();
 ClassLoaderLogInfo info = getClassLoaderInfo(classLoader);
 String result = info.props.getProperty(name);
 // If the property was not found, and the current classloader had no
 // configuration (property list is empty), look for the parent 
classloader
 // properties.
 if ((result == null) && (info.props.isEmpty())) {
-ClassLoader current = classLoader.getParent();
-while (current != null) {
-info = classLoaderLoggers.get(current);
-if (info != null) {
-result = info.props.getProperty(name);
-if ((result != null) || (!info.props.isEmpty())) {
-break;
+if (classLoader != null) {
+ClassLoader current = classLoader.getParent();
+while (current != null) {
+info = classLoaderLoggers.get(current);
+if (info != null) {
+result = info.props.getProperty(name);
+if ((result != null) || (!info.props.isEmpty())) {
+break;
+}
 }
+current = current.getParent();
 }
-current = current.getParent();
 }
 if (result == null) {
 result = super.getProperty(name);

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 9.0.x updated: Add a change log entry

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 3eb1b67  Add a change log entry
3eb1b67 is described below

commit 3eb1b6760d0e94f9483648589926694d253a2b3e
Author: Mark Thomas 
AuthorDate: Wed Nov 24 17:55:21 2021 +

Add a change log entry
---
 webapps/docs/changelog.xml | 4 
 1 file changed, 4 insertions(+)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index b3d2397..469fc4b 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -111,6 +111,10 @@
 Make SPNEGO authentication more robust for the case where the provided
 credential has expired. (markt)
   
+  
+65684: Fix a potential NullPointerException 
when
+using JULI. (markt)
+  
 
   
   

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 8.5.x updated: Fix BZ 65684 - avoid NPE

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new ea07e06  Fix BZ 65684 - avoid NPE
ea07e06 is described below

commit ea07e0686a1caa006d66eb557d81f210409bc6ea
Author: Mark Thomas 
AuthorDate: Wed Nov 24 17:53:14 2021 +

Fix BZ 65684 - avoid NPE

https://bz.apache.org/bugzilla/show_bug.cgi?id=65684
---
 java/org/apache/juli/ClassLoaderLogManager.java | 21 +++--
 webapps/docs/changelog.xml  |  4 
 2 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/java/org/apache/juli/ClassLoaderLogManager.java 
b/java/org/apache/juli/ClassLoaderLogManager.java
index a9dc664..421fce0 100644
--- a/java/org/apache/juli/ClassLoaderLogManager.java
+++ b/java/org/apache/juli/ClassLoaderLogManager.java
@@ -300,24 +300,25 @@ public class ClassLoaderLogManager extends LogManager {
 
 
 private synchronized String findProperty(String name) {
-ClassLoader classLoader = Thread.currentThread()
-.getContextClassLoader();
+ClassLoader classLoader = 
Thread.currentThread().getContextClassLoader();
 ClassLoaderLogInfo info = getClassLoaderInfo(classLoader);
 String result = info.props.getProperty(name);
 // If the property was not found, and the current classloader had no
 // configuration (property list is empty), look for the parent 
classloader
 // properties.
 if ((result == null) && (info.props.isEmpty())) {
-ClassLoader current = classLoader.getParent();
-while (current != null) {
-info = classLoaderLoggers.get(current);
-if (info != null) {
-result = info.props.getProperty(name);
-if ((result != null) || (!info.props.isEmpty())) {
-break;
+if (classLoader != null) {
+ClassLoader current = classLoader.getParent();
+while (current != null) {
+info = classLoaderLoggers.get(current);
+if (info != null) {
+result = info.props.getProperty(name);
+if ((result != null) || (!info.props.isEmpty())) {
+break;
+}
 }
+current = current.getParent();
 }
-current = current.getParent();
 }
 if (result == null) {
 result = super.getProperty(name);
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 7afc6de..6a9b145 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -111,6 +111,10 @@
 Make SPNEGO authentication more robust for the case where the provided
 credential has expired. (markt)
   
+  
+65684: Fix a potential NullPointerException 
when
+using JULI. (markt)
+  
 
   
   

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 10.0.x updated: Fix BZ 65684 - avoid NPE

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.0.x by this push:
 new 5f9a29b  Fix BZ 65684 - avoid NPE
5f9a29b is described below

commit 5f9a29b90e4a1c256dc127e2786aa835182742ea
Author: Mark Thomas 
AuthorDate: Wed Nov 24 17:53:14 2021 +

Fix BZ 65684 - avoid NPE

https://bz.apache.org/bugzilla/show_bug.cgi?id=65684
---
 java/org/apache/juli/ClassLoaderLogManager.java | 21 +++--
 webapps/docs/changelog.xml  |  4 
 2 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/java/org/apache/juli/ClassLoaderLogManager.java 
b/java/org/apache/juli/ClassLoaderLogManager.java
index 42e8f11..227b4e1 100644
--- a/java/org/apache/juli/ClassLoaderLogManager.java
+++ b/java/org/apache/juli/ClassLoaderLogManager.java
@@ -292,24 +292,25 @@ public class ClassLoaderLogManager extends LogManager {
 
 
 private synchronized String findProperty(String name) {
-ClassLoader classLoader = Thread.currentThread()
-.getContextClassLoader();
+ClassLoader classLoader = 
Thread.currentThread().getContextClassLoader();
 ClassLoaderLogInfo info = getClassLoaderInfo(classLoader);
 String result = info.props.getProperty(name);
 // If the property was not found, and the current classloader had no
 // configuration (property list is empty), look for the parent 
classloader
 // properties.
 if ((result == null) && (info.props.isEmpty())) {
-ClassLoader current = classLoader.getParent();
-while (current != null) {
-info = classLoaderLoggers.get(current);
-if (info != null) {
-result = info.props.getProperty(name);
-if ((result != null) || (!info.props.isEmpty())) {
-break;
+if (classLoader != null) {
+ClassLoader current = classLoader.getParent();
+while (current != null) {
+info = classLoaderLoggers.get(current);
+if (info != null) {
+result = info.props.getProperty(name);
+if ((result != null) || (!info.props.isEmpty())) {
+break;
+}
 }
+current = current.getParent();
 }
-current = current.getParent();
 }
 if (result == null) {
 result = super.getProperty(name);
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 4b8ad00..24fe3bd 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -111,6 +111,10 @@
 Make SPNEGO authentication more robust for the case where the provided
 credential has expired. (markt)
   
+  
+65684: Fix a potential NullPointerException 
when
+using JULI. (markt)
+  
 
   
   

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch main updated: Fix BZ 65684 - avoid NPE

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new f608410  Fix BZ 65684 - avoid NPE
f608410 is described below

commit f608410811cbfff0df9c5d584c99d161ff7ee527
Author: Mark Thomas 
AuthorDate: Wed Nov 24 17:53:14 2021 +

Fix BZ 65684 - avoid NPE

https://bz.apache.org/bugzilla/show_bug.cgi?id=65684
---
 java/org/apache/juli/ClassLoaderLogManager.java | 21 +++--
 webapps/docs/changelog.xml  |  4 
 2 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/java/org/apache/juli/ClassLoaderLogManager.java 
b/java/org/apache/juli/ClassLoaderLogManager.java
index 0882c85..91d8871 100644
--- a/java/org/apache/juli/ClassLoaderLogManager.java
+++ b/java/org/apache/juli/ClassLoaderLogManager.java
@@ -280,24 +280,25 @@ public class ClassLoaderLogManager extends LogManager {
 
 
 private synchronized String findProperty(String name) {
-ClassLoader classLoader = Thread.currentThread()
-.getContextClassLoader();
+ClassLoader classLoader = 
Thread.currentThread().getContextClassLoader();
 ClassLoaderLogInfo info = getClassLoaderInfo(classLoader);
 String result = info.props.getProperty(name);
 // If the property was not found, and the current classloader had no
 // configuration (property list is empty), look for the parent 
classloader
 // properties.
 if ((result == null) && (info.props.isEmpty())) {
-ClassLoader current = classLoader.getParent();
-while (current != null) {
-info = classLoaderLoggers.get(current);
-if (info != null) {
-result = info.props.getProperty(name);
-if ((result != null) || (!info.props.isEmpty())) {
-break;
+if (classLoader != null) {
+ClassLoader current = classLoader.getParent();
+while (current != null) {
+info = classLoaderLoggers.get(current);
+if (info != null) {
+result = info.props.getProperty(name);
+if ((result != null) || (!info.props.isEmpty())) {
+break;
+}
 }
+current = current.getParent();
 }
-current = current.getParent();
 }
 if (result == null) {
 result = super.getProperty(name);
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 54b8758..e77ab39 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -127,6 +127,10 @@
 Limit cookie support to RFC 6265 to align with recent updates to the
 Servlet specification. (markt)
   
+  
+65684: Fix a potential NullPointerException 
when
+using JULI. (markt)
+  
 
   
   

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 65684] NullPointerException in Tomcat's ClassLoaderLogManager when logging.properties is empty

2021-11-24 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65684

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #1 from Mark Thomas  ---
Thanks for the report.

This has been fixed and the fix will be included in:
- 10.1.x for 10.1.0-M8 onwards
- 10.0.x for 10.0.14 onwards
- 9.0.x for 9.0.56 onwards
- 8.5.x for 8.5.74 onwards

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 65571] ClientAbortException in Tomcat 9.0.50 and 9.0.52

2021-11-24 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65571

--- Comment #4 from Mark Thomas  ---
Ping. We still need the information listed in comment #1

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch main updated: Fix bad scope handling

2021-11-24 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new 46debaa  Fix bad scope handling
46debaa is described below

commit 46debaa2af3f397758d0eafd8a21878ed85f8770
Author: remm 
AuthorDate: Wed Nov 24 23:04:56 2021 +0100

Fix bad scope handling

Finally have working implicit scope for the context.
Naming all scopes "scope" was probably not a good idea, and also
figuring out what cannot be in a local confined scope is of course
tricky. Use the implicit scope for everything instead.
---
 .../util/net/openssl/panama/OpenSSLContext.java| 533 ++---
 .../util/net/openssl/panama/OpenSSLEngine.java |   4 +-
 2 files changed, 262 insertions(+), 275 deletions(-)

diff --git 
a/modules/openssl-java17/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java
 
b/modules/openssl-java17/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java
index ad07d20..d665b57 100644
--- 
a/modules/openssl-java17/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java
+++ 
b/modules/openssl-java17/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java
@@ -30,8 +30,6 @@ import java.io.File;
 import java.lang.invoke.MethodHandle;
 import java.lang.invoke.MethodHandles;
 import java.lang.invoke.MethodType;
-import java.lang.ref.Cleaner;
-import java.lang.ref.Cleaner.Cleanable;
 import java.nio.charset.StandardCharsets;
 import java.security.PrivateKey;
 import java.security.SecureRandom;
@@ -149,8 +147,6 @@ public class OpenSSLContext implements 
org.apache.tomcat.util.net.SSLContext {
 }
 }
 
-private static final Cleaner cleaner = Cleaner.create();
-
 private final SSLHostConfig sslHostConfig;
 private final SSLHostConfigCertificate certificate;
 private final boolean alpn;
@@ -171,7 +167,7 @@ public class OpenSSLContext implements 
org.apache.tomcat.util.net.SSLContext {
 }
 
 private final ContextState state;
-private final Cleanable cleanable;
+private final ResourceScope scope;
 
 private static String[] getCiphers(MemoryAddress sslCtx) {
 MemoryAddress sk = SSL_CTX_get_ciphers(sslCtx);
@@ -202,7 +198,7 @@ public class OpenSSLContext implements 
org.apache.tomcat.util.net.SSLContext {
 
 this.sslHostConfig = certificate.getSSLHostConfig();
 this.certificate = certificate;
-ResourceScope scope = ResourceScope.newSharedScope();
+scope = ResourceScope.newImplicitScope();
 
 MemoryAddress sslCtx = MemoryAddress.NULL;
 MemoryAddress confCtx = MemoryAddress.NULL;
@@ -339,7 +335,7 @@ public class OpenSSLContext implements 
org.apache.tomcat.util.net.SSLContext {
 } catch(Exception e) {
 throw new SSLException(sm.getString("openssl.errorSSLCtxInit"), e);
 } finally {
-state = new ContextState(scope, sslCtx, confCtx, 
negotiableProtocolsBytes);
+state = new ContextState(sslCtx, confCtx, 
negotiableProtocolsBytes);
 /*
  * When an SSLHostConfig is replaced at runtime, it is not 
possible to
  * call destroy() on the associated OpenSSLContext since it is 
likely
@@ -348,11 +344,10 @@ public class OpenSSLContext implements 
org.apache.tomcat.util.net.SSLContext {
  * OpenSSLSessionContext) to ensure that the OpenSSLContext remains
  * ineligible for GC while those connections are alive. Once those
  * connections complete, the OpenSSLContext will become eligible 
for GC
- * and this method will ensure that the associated native 
resources are
- * cleaned up.
+ * and the implicit scope will ensure that the associated native
+ * resources are cleaned up.
  */
-states.put(Long.valueOf(sslCtx.address().toRawLongValue()), state);
-cleanable = cleaner.register(this, state);
+scope.addCloseAction(state);
 
 if (!success) {
 destroy();
@@ -372,9 +367,7 @@ public class OpenSSLContext implements 
org.apache.tomcat.util.net.SSLContext {
 
 
 @Override
-public synchronized void destroy() {
-states.remove(Long.valueOf(state.sslCtx.address().toRawLongValue()));
-cleanable.clean();
+public void destroy() {
 }
 
 
@@ -561,7 +554,7 @@ public class OpenSSLContext implements 
org.apache.tomcat.util.net.SSLContext {
 }
 
 // List the ciphers that the client is permitted to negotiate
-if (SSL_CTX_set_cipher_list(state.sslCtx, 
CLinker.toCString(sslHostConfig.getCiphers(), state.scope)) <= 0) {
+if (SSL_CTX_set_cipher_list(state.sslCtx, 
CLinker.toCString(sslHostConfig.getCiphers(), scope)) <= 0) {
 log.warn(sm.ge

[tomcat] branch 9.0.x updated: Increase timeout for CI

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 22314d7  Increase timeout for CI
22314d7 is described below

commit 22314d74361532917a0f1e1b790a7c10d98c9a7b
Author: Mark Thomas 
AuthorDate: Thu Nov 25 07:36:16 2021 +

Increase timeout for CI
---
 test/org/apache/jasper/servlet/TestJspServlet.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/test/org/apache/jasper/servlet/TestJspServlet.java 
b/test/org/apache/jasper/servlet/TestJspServlet.java
index 8f71da1..ecc0bf8 100644
--- a/test/org/apache/jasper/servlet/TestJspServlet.java
+++ b/test/org/apache/jasper/servlet/TestJspServlet.java
@@ -58,8 +58,9 @@ public class TestJspServlet  extends TomcatBaseTest {
 
 tomcat.start();
 
+// When using JaCoCo, the CI system seems to need a longer timeout
 int rc = methodUrl("http://localhost:"; + getPort() + "/test/bug56568",
-new ByteChunk(), 1, null, null, "PUT");
+new ByteChunk(), 3, null, null, "PUT");
 
 // Make sure we get the original 500 response and not a 405 response
 // which would indicate that error.jsp is complaining about being 
called

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 8.5.x updated: Increase timeout for CI

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new f2d0400  Increase timeout for CI
f2d0400 is described below

commit f2d0400c92b1abb4d8c6c4eaacbc322d22ae38b3
Author: Mark Thomas 
AuthorDate: Thu Nov 25 07:36:16 2021 +

Increase timeout for CI
---
 test/org/apache/jasper/servlet/TestJspServlet.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/test/org/apache/jasper/servlet/TestJspServlet.java 
b/test/org/apache/jasper/servlet/TestJspServlet.java
index 8f71da1..ecc0bf8 100644
--- a/test/org/apache/jasper/servlet/TestJspServlet.java
+++ b/test/org/apache/jasper/servlet/TestJspServlet.java
@@ -58,8 +58,9 @@ public class TestJspServlet  extends TomcatBaseTest {
 
 tomcat.start();
 
+// When using JaCoCo, the CI system seems to need a longer timeout
 int rc = methodUrl("http://localhost:"; + getPort() + "/test/bug56568",
-new ByteChunk(), 1, null, null, "PUT");
+new ByteChunk(), 3, null, null, "PUT");
 
 // Make sure we get the original 500 response and not a 405 response
 // which would indicate that error.jsp is complaining about being 
called

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 9.0.x updated: Switch from Cobertura to JaCoCo for code coverage

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 3e313f3  Switch from Cobertura to JaCoCo for code coverage
3e313f3 is described below

commit 3e313f361e39a77d0d813b26c3cd934a3b616c77
Author: Mark Thomas 
AuthorDate: Mon Nov 8 12:41:36 2021 +

Switch from Cobertura to JaCoCo for code coverage
---
 build.properties.default   |  23 ++--
 build.xml  | 324 ++---
 webapps/docs/changelog.xml |   9 ++
 3 files changed, 151 insertions(+), 205 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index 70c235c..444ed56 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -62,12 +62,11 @@ test.verbose=true
 
 # Number of parallel threads to use for testing. The recommended value is one
 # thread per core.
-# Note: Cobertura code coverage currently requires this to be set to 1. Setting
-#   a value above one will disable code coverage if enabled.
 test.threads=1
 
-# Note the Cobertura code coverage tool is GPLv2 licensed
-test.cobertura=false
+# Note the JaCoCo code coverage tool is EPLv2 licensed
+# Enabling code coverage extends the time taken to run the tests by ~50%
+test.coverage=false
 
 # Note the FindBugs is LGPL licensed
 execute.findbugs=false
@@ -275,14 +274,14 @@ 
checkstyle.home=${base.path}/checkstyle-${checkstyle.version}
 checkstyle.jar=${checkstyle.home}/checkstyle-${checkstyle.version}-all.jar
 
checkstyle.loc=${base-gh.loc}/checkstyle/checkstyle/releases/download/checkstyle-${checkstyle.version}/checkstyle-${checkstyle.version}-all.jar
 
-# - Cobertura code coverage tool -
-cobertura.version=2.1.1
-cobertura.checksum.enabled=true
-cobertura.checksum.algorithm=MD5|SHA-1
-cobertura.checksum.value=4f46638aa8e4d89565c038092398ea06|99cb44d36555feedcedc46263c23c2f5394ef342
-cobertura.home=${base.path}/cobertura-${cobertura.version}
-cobertura.jar=${cobertura.home}/cobertura-${cobertura.version}.jar
-cobertura.loc=${base-sf.loc}/cobertura/cobertura-${cobertura.version}-bin.tar.gz
+# - JaCoCo code coverage tool -
+jacoco.version=0.8.7
+jacoco.checksum.enabled=true
+jacoco.checksum.algorithm=MD5|SHA-1
+jacoco.checksum.value=174fde230d1090a5622119d5096bce07|983a52a030f4123b671840a27426ed73479f45cc
+jacoco.home=${base.path}/jacoco-${jacoco.version}
+jacoco.jar=${jacoco.home}/lib/jacocoant.jar
+jacoco.loc=${base-maven.loc}/org/jacoco/jacoco/${jacoco.version}/jacoco-${jacoco.version}.zip
 
 # - SpotBugs (originally FindBugs) -
 findbugs.version=4.2.3
diff --git a/build.xml b/build.xml
index 4566582..1fd83ff 100644
--- a/build.xml
+++ b/build.xml
@@ -16,7 +16,10 @@
   limitations under the License.
 -->
 
+  xmlns:if="ant:if"
+  xmlns:unless="ant:unless"
+  xmlns:jacoco="antlib:org.jacoco.ant"
+  >
 
   
 
@@ -181,11 +184,9 @@
   
   
 
-  
-  
-  
-  
-  
+  
+  
+  
 
   
   
@@ -1848,10 +1849,7 @@
   
 
   
-
-  
+  
depends="setup-jacoco,test-nio,test-nio2,test-apr,coverage-report,test-status" 
/>
 
   
@@ -1889,42 +1887,24 @@
   
 
   
-
-  
-
-  
+  depends="test-compile,deploy,test-openssl-exists" 
if="${execute.test.nio}">
 
   
 
   
-
-  
-
-  
+  depends="test-compile,deploy,test-openssl-exists" 
if="${execute.test.nio2}">
 
   
 
   
 
   
 
-  
-
-  
-
   
 
@@ -1956,164 +1936,108 @@
 
 
   
-  
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-  
-  
-
-
-
-
-
-
-
-
-
-
-
-
-  
-
-
-
-  
-
-  
+  
+
+
+  
+  
+  
+  
+  
+
+  
+  
+  
+  
+  
+  
+
+  
+
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+
+  
+
+  
+  
+  
+  
+
+
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+
+  
+  
+  
+
+  
+
+  
 
   
 
-  
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-  
-
-  
-
-  
-
-
-  

[tomcat] branch 9.0.x updated: Move to correct version

2021-11-24 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new d065a7a  Move to correct version
d065a7a is described below

commit d065a7a43548743a6fa23e231438f40a7bad27d0
Author: Mark Thomas 
AuthorDate: Thu Nov 25 07:42:15 2021 +

Move to correct version
---
 webapps/docs/changelog.xml | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 029405b..6075bfc 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -139,6 +139,15 @@
   
 
   
+  
+
+  
+Switch from Cobertura to JaCoCo for code coverage as Cobertura does not
+support code coverage for code compiled for Java 11 onwards. It also
+removes the need to use a single thread to run the tests. (markt)
+  
+
+  
 
 
   
@@ -229,15 +238,6 @@
   
 
   
-  
-
-  
-Switch from Cobertura to JaCoCo for code coverage as Cobertura does not
-support code coverage for code compiled for Java 11 onwards. It also
-removes the need to use a single thread to run the tests. (markt)
-  
-
-  
 
 
   

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org