(tomcat) branch 9.0.x updated: Add javadoc
This is an automated email from the ASF dual-hosted git repository.
remm 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 47d9b1e124 Add javadoc
47d9b1e124 is described below
commit 47d9b1e1242ec14b5575341e48d065f9ae16fe2b
Author: remm
AuthorDate: Thu Apr 2 20:38:06 2026 +0200
Add javadoc
---
java/org/apache/catalina/AccessLog.java| 2 +
java/org/apache/catalina/Context.java | 1 -
java/org/apache/catalina/JmxEnabled.java | 4 ++
java/org/apache/catalina/WebResource.java | 40 +-
java/org/apache/catalina/WebResourceRoot.java | 12 ++
.../catalina/ant/AbstractCatalinaCommandTask.java | 23 +++
.../apache/catalina/ha/tcp/SendMessageData.java| 2 +
.../catalina/tribes/group/AbsoluteOrder.java | 25
.../tribes/tipis/AbstractReplicatedMap.java| 2 +
.../catalina/valves/AbstractAccessLogValve.java| 37 +++--
.../webresources/AbstractArchiveResource.java | 46 +
.../webresources/AbstractArchiveResourceSet.java | 47 ++
.../catalina/webresources/AbstractResource.java| 5 +++
java/org/apache/coyote/AbstractProtocol.java | 7
java/org/apache/coyote/UpgradeProtocol.java| 10 +
java/org/apache/el/ExpressionFactoryImpl.java | 2 +-
java/org/apache/jasper/compiler/TextOptimizer.java | 1 +
.../apache/tomcat/util/net/AbstractEndpoint.java | 2 +
18 files changed, 260 insertions(+), 8 deletions(-)
diff --git a/java/org/apache/catalina/AccessLog.java
b/java/org/apache/catalina/AccessLog.java
index 651bf033bd..bcdd4e7f66 100644
--- a/java/org/apache/catalina/AccessLog.java
+++ b/java/org/apache/catalina/AccessLog.java
@@ -81,6 +81,8 @@ public interface AccessLog {
void setRequestAttributesEnabled(boolean requestAttributesEnabled);
/**
+ * Checks if request attributes will be logged.
+ *
* @see #setRequestAttributesEnabled(boolean)
*
* @return true if the attributes will be logged, otherwise
false
diff --git a/java/org/apache/catalina/Context.java
b/java/org/apache/catalina/Context.java
index bfdbe2917d..9f809f123f 100644
--- a/java/org/apache/catalina/Context.java
+++ b/java/org/apache/catalina/Context.java
@@ -60,7 +60,6 @@ import org.apache.tomcat.util.http.CookieProcessor;
*
* The child containers attached to a Context are generally implementations of
Wrapper (representing individual servlet
* definitions).
- *
*/
public interface Context extends Container, ContextBind {
diff --git a/java/org/apache/catalina/JmxEnabled.java
b/java/org/apache/catalina/JmxEnabled.java
index d79d2b3d4f..06f40e6cda 100644
--- a/java/org/apache/catalina/JmxEnabled.java
+++ b/java/org/apache/catalina/JmxEnabled.java
@@ -27,6 +27,8 @@ import javax.management.ObjectName;
public interface JmxEnabled extends MBeanRegistration {
/**
+ * Returns the domain under which this component will be / has been
registered.
+ *
* @return the domain under which this component will be / has been
registered.
*/
String getDomain();
@@ -42,6 +44,8 @@ public interface JmxEnabled extends MBeanRegistration {
/**
+ * Returns the name under which this component has been registered with
JMX.
+ *
* @return the name under which this component has been registered with
JMX.
*/
ObjectName getObjectName();
diff --git a/java/org/apache/catalina/WebResource.java
b/java/org/apache/catalina/WebResource.java
index 7f046fd501..97322edfaa 100644
--- a/java/org/apache/catalina/WebResource.java
+++ b/java/org/apache/catalina/WebResource.java
@@ -26,17 +26,23 @@ import java.util.jar.Manifest;
*/
public interface WebResource {
/**
+ * Returns the last modified time.
+ *
* @return {@link java.io.File#lastModified()}.
*/
long getLastModified();
/**
+ * Returns the last modified time in HTTP format.
+ *
* @return the last modified time of this resource in the correct format
for the HTTP Last-Modified header as
* specified by RFC 2616.
*/
String getLastModifiedHttp();
/**
+ * Checks if this resource exists.
+ *
* @return {@link java.io.File#exists()}.
*/
boolean exists();
@@ -51,48 +57,64 @@ public interface WebResource {
boolean isVirtual();
/**
+ * Checks if this resource is a directory.
+ *
* @return {@link java.io.File#isDirectory()}.
*/
boolean isDirectory();
/**
+ * Checks if this resource is a file.
+ *
* @return {@link java.io.File#isFile()}.
*/
boolean isFile();
/**
+ * Deletes this resource.
+ *
* @return {@link java.io.File#delete()}.
*/
boolean delete();
/**
+ * Returns the name of this
(tomcat) branch 9.0.x updated: Add javadoc
This is an automated email from the ASF dual-hosted git repository.
remm 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 fc06ea89fe Add javadoc
fc06ea89fe is described below
commit fc06ea89fe44c78b7061fcf540b6da782750d92a
Author: remm
AuthorDate: Thu Apr 2 16:44:48 2026 +0200
Add javadoc
---
java/org/apache/tomcat/util/net/SocketWrapperBase.java | 4
1 file changed, 4 insertions(+)
diff --git a/java/org/apache/tomcat/util/net/SocketWrapperBase.java
b/java/org/apache/tomcat/util/net/SocketWrapperBase.java
index 9728aeac8c..3a183fd65c 100644
--- a/java/org/apache/tomcat/util/net/SocketWrapperBase.java
+++ b/java/org/apache/tomcat/util/net/SocketWrapperBase.java
@@ -963,6 +963,8 @@ public abstract class SocketWrapperBase {
/**
* Internal state tracker for vectored operations.
+ *
+ * @param The attachment type
*/
protected abstract class OperationState implements Runnable {
protected final boolean read;
@@ -1053,6 +1055,8 @@ public abstract class SocketWrapperBase {
/**
* Completion handler for vectored operations. This will check the
completion of the operation, then either continue
* or call the user provided completion handler.
+ *
+ * @param The attachment type
*/
protected class VectoredIOCompletionHandler implements
CompletionHandler> {
@Override
-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
(tomcat) branch 9.0.x updated: Add javadoc
This is an automated email from the ASF dual-hosted git repository.
remm 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 b8d45bd0c7 Add javadoc
b8d45bd0c7 is described below
commit b8d45bd0c74e160dd023461b59cc4820b2134890
Author: remm
AuthorDate: Thu Apr 2 15:28:34 2026 +0200
Add javadoc
---
java/org/apache/coyote/AbstractProtocol.java | 427 ++-
1 file changed, 417 insertions(+), 10 deletions(-)
diff --git a/java/org/apache/coyote/AbstractProtocol.java
b/java/org/apache/coyote/AbstractProtocol.java
index 84d12cd1e0..b285aae553 100644
--- a/java/org/apache/coyote/AbstractProtocol.java
+++ b/java/org/apache/coyote/AbstractProtocol.java
@@ -59,13 +59,11 @@ public abstract class AbstractProtocol implements
ProtocolHandler, MBeanRegis
*/
private static final StringManager sm =
StringManager.getManager(AbstractProtocol.class);
-
/**
* Counter used to generate unique JMX names for connectors using
automatic port binding.
*/
private static final AtomicInteger nameCounter = new AtomicInteger(0);
-
/**
* Unique ID for this connector. Only used if the connector is configured
to use a random port as the port will
* change if stop(), start() is called.
@@ -91,6 +89,11 @@ public abstract class AbstractProtocol implements
ProtocolHandler, MBeanRegis
private ScheduledFuture timeoutFuture = null;
private ScheduledFuture monitorFuture;
+/**
+ * Creates a new protocol handler.
+ *
+ * @param endpoint The endpoint for low-level network I/O
+ */
public AbstractProtocol(AbstractEndpoint endpoint) {
this.endpoint = endpoint;
ConnectionHandler cHandler = new ConnectionHandler<>(this);
@@ -137,6 +140,11 @@ public abstract class AbstractProtocol implements
ProtocolHandler, MBeanRegis
*/
protected ObjectName rgOname = null;
+/**
+ * Gets the MBean name for the Global Request Processor.
+ *
+ * @return the MBean name
+ */
public ObjectName getGlobalRequestProcessorMBeanName() {
return rgOname;
}
@@ -146,11 +154,21 @@ public abstract class AbstractProtocol implements
ProtocolHandler, MBeanRegis
*/
protected Adapter adapter;
+/**
+ * Sets the adapter.
+ *
+ * @param adapter The adapter
+ */
@Override
public void setAdapter(Adapter adapter) {
this.adapter = adapter;
}
+/**
+ * Gets the adapter.
+ *
+ * @return the adapter
+ */
@Override
public Adapter getAdapter() {
return adapter;
@@ -165,10 +183,20 @@ public abstract class AbstractProtocol implements
ProtocolHandler, MBeanRegis
*/
protected int processorCache = 200;
+/**
+ * Gets the processor cache size.
+ *
+ * @return the processor cache size
+ */
public int getProcessorCache() {
return this.processorCache;
}
+/**
+ * Sets the maximum number of idle processors to cache.
+ *
+ * @param processorCache The processor cache size (-1 for unlimited)
+ */
public void setProcessorCache(int processorCache) {
this.processorCache = processorCache;
}
@@ -189,6 +217,11 @@ public abstract class AbstractProtocol implements
ProtocolHandler, MBeanRegis
return clientCertProvider;
}
+/**
+ * Sets the JSSE provider to use for client certificate conversion.
+ *
+ * @param s The provider name
+ */
public void setClientCertProvider(String s) {
this.clientCertProvider = s;
}
@@ -196,15 +229,30 @@ public abstract class AbstractProtocol implements
ProtocolHandler, MBeanRegis
private int maxHeaderCount = 100;
+/**
+ * Gets the maximum header count.
+ *
+ * @return the maximum header count
+ */
public int getMaxHeaderCount() {
return maxHeaderCount;
}
+/**
+ * Sets the maximum header count.
+ *
+ * @param maxHeaderCount The maximum header count
+ */
public void setMaxHeaderCount(int maxHeaderCount) {
this.maxHeaderCount = maxHeaderCount;
}
+/**
+ * Checks if sendfile is supported.
+ *
+ * @return true if sendfile is supported
+ */
@Override
public boolean isAprRequired() {
return false;
@@ -216,7 +264,11 @@ public abstract class AbstractProtocol implements
ProtocolHandler, MBeanRegis
return endpoint.getUseSendfile();
}
-
+/**
+ * Gets the protocol ID.
+ *
+ * @return the protocol ID
+ */
@Override
public String getId() {
return endpoint.getId();
@@ -225,11 +277,22 @@ public abstract class AbstractProtocol implements
ProtocolHandler, MBeanRegis
// -- Properties that are passed through to the
EndPoint
+
+/**
+ * Gets the e
(tomcat) branch 9.0.x updated: Add javadoc
This is an automated email from the ASF dual-hosted git repository.
remm 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 54916acf10 Add javadoc
54916acf10 is described below
commit 54916acf107f197e6635464f02df71eca5bd3418
Author: remm
AuthorDate: Thu Apr 2 15:24:41 2026 +0200
Add javadoc
---
.../org/apache/coyote/ajp/AbstractAjpProtocol.java | 120 -
1 file changed, 116 insertions(+), 4 deletions(-)
diff --git a/java/org/apache/coyote/ajp/AbstractAjpProtocol.java
b/java/org/apache/coyote/ajp/AbstractAjpProtocol.java
index 76112b980c..337b0ce872 100644
--- a/java/org/apache/coyote/ajp/AbstractAjpProtocol.java
+++ b/java/org/apache/coyote/ajp/AbstractAjpProtocol.java
@@ -43,6 +43,11 @@ public abstract class AbstractAjpProtocol extends
AbstractProtocol {
protected static final StringManager sm =
StringManager.getManager(AbstractAjpProtocol.class);
+/**
+ * Creates a new AJP protocol handler.
+ *
+ * @param endpoint The endpoint for low-level network I/O
+ */
public AbstractAjpProtocol(AbstractEndpoint endpoint) {
super(endpoint);
setConnectionTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
@@ -53,6 +58,11 @@ public abstract class AbstractAjpProtocol extends
AbstractProtocol {
}
+/**
+ * Gets the name of the protocol.
+ *
+ * @return the protocol name
+ */
@Override
protected String getProtocolName() {
return "Ajp";
@@ -90,6 +100,11 @@ public abstract class AbstractAjpProtocol extends
AbstractProtocol {
private boolean ajpFlush = true;
+/**
+ * Gets whether AJP flush packets are used.
+ *
+ * @return true if flush packets are used
+ */
public boolean getAjpFlush() {
return ajpFlush;
}
@@ -118,6 +133,11 @@ public abstract class AbstractAjpProtocol extends
AbstractProtocol {
return tomcatAuthentication;
}
+/**
+ * Sets whether authentication should be done in Tomcat.
+ *
+ * @param tomcatAuthentication {@code true} if authentication should be
performed by Tomcat
+ */
public void setTomcatAuthentication(boolean tomcatAuthentication) {
this.tomcatAuthentication = tomcatAuthentication;
}
@@ -134,6 +154,11 @@ public abstract class AbstractAjpProtocol extends
AbstractProtocol {
return tomcatAuthorization;
}
+/**
+ * Sets whether authorization should be done by Tomcat.
+ *
+ * @param tomcatAuthorization {@code true} if authorization should be
performed by Tomcat
+ */
public void setTomcatAuthorization(boolean tomcatAuthorization) {
this.tomcatAuthorization = tomcatAuthorization;
}
@@ -150,6 +175,11 @@ public abstract class AbstractAjpProtocol extends
AbstractProtocol {
this.secret = secret;
}
+/**
+ * Gets the secret that must be included with every request.
+ *
+ * @return the secret
+ */
protected String getSecret() {
return secret;
}
@@ -179,10 +209,20 @@ public abstract class AbstractAjpProtocol extends
AbstractProtocol {
private boolean secretRequired = true;
+/**
+ * Sets whether a secret is required with every request.
+ *
+ * @param secretRequired {@code true} if a secret is required
+ */
public void setSecretRequired(boolean secretRequired) {
this.secretRequired = secretRequired;
}
+/**
+ * Gets whether a secret is required with every request.
+ *
+ * @return {@code true} if a secret is required
+ */
public boolean getSecretRequired() {
return secretRequired;
}
@@ -190,14 +230,29 @@ public abstract class AbstractAjpProtocol extends
AbstractProtocol {
private Pattern allowedRequestAttributesPattern;
+/**
+ * Sets the pattern for allowed request attributes.
+ *
+ * @param allowedRequestAttributesPattern The regex pattern
+ */
public void setAllowedRequestAttributesPattern(String
allowedRequestAttributesPattern) {
this.allowedRequestAttributesPattern =
Pattern.compile(allowedRequestAttributesPattern);
}
+/**
+ * Gets the pattern for allowed request attributes.
+ *
+ * @return the pattern string
+ */
public String getAllowedRequestAttributesPattern() {
return allowedRequestAttributesPattern.pattern();
}
+/**
+ * Gets the compiled pattern for allowed request attributes.
+ *
+ * @return the pattern
+ */
protected Pattern getAllowedRequestAttributesPatternInternal() {
return allowedRequestAttributesPattern;
}
@@ -208,15 +263,30 @@ public abstract class AbstractAjpProtocol extends
AbstractProtocol {
*/
private int packetSize = Constants.MAX_PACKET_SIZE;
+/**
+ * Gets the AJP packet size.
+ *
+ * @retu
(tomcat) branch 9.0.x updated: Add javadoc
This is an automated email from the ASF dual-hosted git repository.
remm 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 49a0378054 Add javadoc
49a0378054 is described below
commit 49a037805422403a2340b974fa10d164c92b3490
Author: remm
AuthorDate: Thu Apr 2 15:10:58 2026 +0200
Add javadoc
---
.../catalina/valves/AbstractAccessLogValve.java| 374 +++--
1 file changed, 339 insertions(+), 35 deletions(-)
diff --git a/java/org/apache/catalina/valves/AbstractAccessLogValve.java
b/java/org/apache/catalina/valves/AbstractAccessLogValve.java
index 55db894ec7..85fbbded28 100644
--- a/java/org/apache/catalina/valves/AbstractAccessLogValve.java
+++ b/java/org/apache/catalina/valves/AbstractAccessLogValve.java
@@ -128,10 +128,25 @@ public abstract class AbstractAccessLogValve extends
ValveBase implements Access
* The list of our time format types.
*/
private enum FormatType {
+/**
+ * Common Log Format.
+ */
CLF,
+/**
+ * Seconds since epoch.
+ */
SEC,
+/**
+ * Milliseconds since epoch.
+ */
MSEC,
+/**
+ * Millisecond fraction of timestamp.
+ */
MSEC_FRAC,
+/**
+ * SimpleDateFormat format.
+ */
SDF
}
@@ -139,7 +154,13 @@ public abstract class AbstractAccessLogValve extends
ValveBase implements Access
* The list of our port types.
*/
private enum PortType {
+/**
+ * Local port.
+ */
LOCAL,
+/**
+ * Remote port.
+ */
REMOTE
}
@@ -147,11 +168,22 @@ public abstract class AbstractAccessLogValve extends
ValveBase implements Access
* The list of our ip address types.
*/
private enum RemoteAddressType {
+/**
+ * Remote address.
+ */
REMOTE,
+/**
+ * Peer address.
+ */
PEER
}
// -- Constructor
+
+
+/**
+ * Default constructor.
+ */
public AbstractAccessLogValve() {
super(true);
}
@@ -215,6 +247,9 @@ public abstract class AbstractAccessLogValve extends
ValveBase implements Access
*/
protected static class DateFormatCache {
+/**
+ * Cache for formatted timestamps.
+ */
protected class Cache {
/* CLF log format */
@@ -240,14 +275,32 @@ public abstract class AbstractAccessLogValve extends
ValveBase implements Access
private final Cache parent;
+/**
+ * Creates a new cache with the given parent cache.
+ *
+ * @param parent The parent cache
+ */
private Cache(Cache parent) {
this(null, parent);
}
+/**
+ * Creates a new cache with the given format and parent cache.
+ *
+ * @param format The format string
+ * @param parent The parent cache
+ */
private Cache(String format, Cache parent) {
this(format, null, parent);
}
+/**
+ * Creates a new cache with the given format, locale and parent
cache.
+ *
+ * @param format The format string
+ * @param loc The locale
+ * @param parent The parent cache
+ */
private Cache(String format, Locale loc, Cache parent) {
cache = new String[cacheSize];
for (int i = 0; i < cacheSize; i++) {
@@ -267,6 +320,13 @@ public abstract class AbstractAccessLogValve extends
ValveBase implements Access
this.parent = parent;
}
+/**
+ * Gets the formatted timestamp for the given time.
+ *
+ * @param time The time in milliseconds
+ *
+ * @return The formatted timestamp
+ */
private String getFormatInternal(long time) {
long seconds = time / 1000;
@@ -344,6 +404,13 @@ public abstract class AbstractAccessLogValve extends
ValveBase implements Access
protected final Cache cLFCache;
private final Map formatCache = new HashMap<>();
+/**
+ * Creates a new date format cache.
+ *
+ * @param size The cache size
+ * @param loc The default locale
+ * @param parentFC The parent cache
+ */
protected DateFormatCache(int size, Locale loc, DateFormatCache
parentFC) {
cacheSize = size;
cacheDefaultLocale = loc;
@@ -357,6 +424,14 @@ public abstract class AbstractAccessLogValve extends
ValveBase implements Access
cLFCache = new Cache(paren
(tomcat) branch 9.0.x updated: Add javadoc
This is an automated email from the ASF dual-hosted git repository.
remm 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 78cb8e98dd Add javadoc
78cb8e98dd is described below
commit 78cb8e98dd23d8fd9070e098b1060355a6f5889b
Author: remm
AuthorDate: Thu Apr 2 15:00:17 2026 +0200
Add javadoc
---
.../catalina/tribes/group/AbsoluteOrder.java | 42 ++
1 file changed, 42 insertions(+)
diff --git a/java/org/apache/catalina/tribes/group/AbsoluteOrder.java
b/java/org/apache/catalina/tribes/group/AbsoluteOrder.java
index e9c6c350eb..94525fe5a7 100644
--- a/java/org/apache/catalina/tribes/group/AbsoluteOrder.java
+++ b/java/org/apache/catalina/tribes/group/AbsoluteOrder.java
@@ -82,18 +82,46 @@ public class AbsoluteOrder {
return result;
}
+/**
+ * Compare the IP addresses of two members.
+ *
+ * @param m1 First member
+ * @param m2 Second member
+ * @return comparison result
+ */
public int compareIps(Member m1, Member m2) {
return compareBytes(m1.getHost(), m2.getHost());
}
+/**
+ * Compare the ports of two members.
+ *
+ * @param m1 First member
+ * @param m2 Second member
+ * @return comparison result
+ */
public int comparePorts(Member m1, Member m2) {
return compareInts(m1.getPort(), m2.getPort());
}
+/**
+ * Compare the unique IDs of two members.
+ *
+ * @param m1 First member
+ * @param m2 Second member
+ * @return comparison result
+ */
public int compareIds(Member m1, Member m2) {
return compareBytes(m1.getUniqueId(), m2.getUniqueId());
}
+/**
+ * Compare two byte arrays.
+ *
+ * @param d1 First byte array
+ * @param d2 Second byte array
+ * @return comparison result
+ */
protected int compareBytes(byte[] d1, byte[] d2) {
int result = 0;
if (d1.length == d2.length) {
@@ -108,10 +136,24 @@ public class AbsoluteOrder {
return result;
}
+/**
+ * Compare two bytes.
+ *
+ * @param b1 First byte
+ * @param b2 Second byte
+ * @return comparison result
+ */
protected int compareBytes(byte b1, byte b2) {
return compareInts(b1, b2);
}
+/**
+ * Compare two integers.
+ *
+ * @param b1 First integer
+ * @param b2 Second integer
+ * @return comparison result
+ */
protected int compareInts(int b1, int b2) {
return Integer.compare(b1, b2);
}
-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
(tomcat) branch 9.0.x updated: Add javadoc about the warning
This is an automated email from the ASF dual-hosted git repository.
remm 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 972e33b95f Add javadoc about the warning
972e33b95f is described below
commit 972e33b95f1de447084b86e0f1076e43506857bd
Author: remm
AuthorDate: Tue Dec 10 13:32:49 2024 +0100
Add javadoc about the warning
---
java/org/apache/tomcat/util/buf/ByteBufferUtils.java | 4
1 file changed, 4 insertions(+)
diff --git a/java/org/apache/tomcat/util/buf/ByteBufferUtils.java
b/java/org/apache/tomcat/util/buf/ByteBufferUtils.java
index 4593fabbad..e082fb36a4 100644
--- a/java/org/apache/tomcat/util/buf/ByteBufferUtils.java
+++ b/java/org/apache/tomcat/util/buf/ByteBufferUtils.java
@@ -116,6 +116,10 @@ public class ByteBufferUtils {
return out;
}
+/**
+ * Clean specified direct buffer. This will cause an unavoidable warning
on Java 24 and newer.
+ * @param buf the buffer to clean
+ */
public static void cleanDirectBuffer(ByteBuffer buf) {
if (cleanMethod != null) {
try {
-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
[tomcat] branch 9.0.x updated: Add Javadoc comment about nesting of server-wide listeners
This is an automated email from the ASF dual-hosted git repository.
michaelo 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 9a5c21c Add Javadoc comment about nesting of server-wide listeners
9a5c21c is described below
commit 9a5c21cb604edd63e28a343f3603e79ab792074b
Author: Michael Osipov
AuthorDate: Mon Nov 1 09:18:47 2021 +0100
Add Javadoc comment about nesting of server-wide listeners
---
java/org/apache/catalina/core/AprLifecycleListener.java | 3 +++
.../org/apache/catalina/core/JreMemoryLeakPreventionListener.java | 1 +
.../apache/catalina/core/ThreadLocalLeakPreventionListener.java | 8 ++--
.../apache/catalina/mbeans/GlobalResourcesLifecycleListener.java | 3 +++
java/org/apache/catalina/security/SecurityListener.java | 4
java/org/apache/catalina/startup/VersionLoggerListener.java | 4
webapps/docs/changelog.xml| 4
7 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/java/org/apache/catalina/core/AprLifecycleListener.java
b/java/org/apache/catalina/core/AprLifecycleListener.java
index ee2a648..a3bd1db 100644
--- a/java/org/apache/catalina/core/AprLifecycleListener.java
+++ b/java/org/apache/catalina/core/AprLifecycleListener.java
@@ -25,6 +25,7 @@ import java.util.List;
import org.apache.catalina.Lifecycle;
import org.apache.catalina.LifecycleEvent;
import org.apache.catalina.LifecycleListener;
+import org.apache.catalina.Server;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.jni.Library;
@@ -38,6 +39,8 @@ import org.apache.tomcat.util.res.StringManager;
/**
* Implementation of LifecycleListener that will init and
* and destroy APR.
+ *
+ * This listener must only be nested within {@link Server} elements.
*
* @since 4.1
*/
diff --git a/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
b/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
index b3c56a5..12bf11e 100644
--- a/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
+++ b/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java
@@ -33,6 +33,7 @@ import org.apache.catalina.Lifecycle;
import org.apache.catalina.LifecycleEvent;
import org.apache.catalina.LifecycleListener;
import org.apache.catalina.startup.SafeForkJoinWorkerThreadFactory;
+import org.apache.catalina.Server;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.ExceptionUtils;
diff --git
a/java/org/apache/catalina/core/ThreadLocalLeakPreventionListener.java
b/java/org/apache/catalina/core/ThreadLocalLeakPreventionListener.java
index f13b19a..9000576 100644
--- a/java/org/apache/catalina/core/ThreadLocalLeakPreventionListener.java
+++ b/java/org/apache/catalina/core/ThreadLocalLeakPreventionListener.java
@@ -34,19 +34,15 @@ import org.apache.tomcat.util.res.StringManager;
import org.apache.tomcat.util.threads.ThreadPoolExecutor;
/**
- *
* A {@link LifecycleListener} that triggers the renewal of threads in Executor
* pools when a {@link Context} is being stopped to avoid thread-local related
* memory leaks.
- *
*
* Note : active threads will be renewed one by one when they come back to the
* pool after executing their task, see
* {@link org.apache.tomcat.util.threads.ThreadPoolExecutor}.afterExecute().
- *
- *
- * This listener must be declared in server.xml to be active.
- *
+ *
+ * This listener must only be nested within {@link Server} elements.
*/
public class ThreadLocalLeakPreventionListener extends FrameworkListener {
diff --git
a/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java
b/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java
index bca1ed7..d6d7506 100644
--- a/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java
+++ b/java/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java
@@ -31,6 +31,7 @@ import org.apache.catalina.Lifecycle;
import org.apache.catalina.LifecycleEvent;
import org.apache.catalina.LifecycleListener;
import org.apache.catalina.Role;
+import org.apache.catalina.Server;
import org.apache.catalina.User;
import org.apache.catalina.UserDatabase;
import org.apache.juli.logging.Log;
@@ -42,6 +43,8 @@ import org.apache.tomcat.util.res.StringManager;
* Implementation of LifecycleListener that instantiates the
* set of MBeans associated with global JNDI resources that are subject to
* management.
+ *
+ * This listener must only be nested within {@link Server} elements.
*
* @author Craig R. McClanahan
* @since 4.1
diff --git a/java/org/apache/catalina/security/SecurityListener.java
b/java/org/apache/catalina/security/SecurityListener.java
index 782753f..cee5ae0 100644
--- a/java/org/apache/catalina/security/SecurityLi
