This is an automated email from the ASF dual-hosted git repository.
rmaucher pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new 27ed96937c Javadoc fixes and improvements
27ed96937c is described below
commit 27ed96937c358977fd8591c2cfb7417002ef6953
Author: remm <[email protected]>
AuthorDate: Sat May 9 09:17:59 2026 +0200
Javadoc fixes and improvements
Final part.
Coauthored by OpenCode.
---
.../catalina/authenticator/SingleSignOnEntry.java | 28 ++++
.../authenticator/SingleSignOnListener.java | 3 +
.../authenticator/SingleSignOnSessionKey.java | 9 ++
.../catalina/core/ApplicationFilterConfig.java | 8 +-
.../catalina/deploy/NamingResourcesImpl.java | 3 +
java/org/apache/catalina/filters/CorsFilter.java | 7 +-
.../catalina/filters/CsrfPreventionFilter.java | 3 +
.../apache/catalina/filters/RemoteIpFilter.java | 36 +++--
.../catalina/filters/RequestDumperFilter.java | 7 +-
.../org/apache/catalina/ha/deploy/FileMessage.java | 6 +
.../apache/catalina/ha/deploy/UndeployMessage.java | 4 +
.../catalina/ha/session/SessionMessageImpl.java | 7 +
.../catalina/manager/HTMLManagerServlet.java | 2 +
.../apache/catalina/realm/GenericPrincipal.java | 4 +
.../catalina/realm/X509SubjectDnRetriever.java | 6 +
java/org/apache/catalina/servlets/CGIServlet.java | 3 +-
.../apache/catalina/servlets/WebdavServlet.java | 1 +
.../org/apache/catalina/tribes/io/XByteBuffer.java | 157 +++++++++++++++++++++
.../membership/StaticMembershipProvider.java | 3 +
java/org/apache/catalina/util/ParameterMap.java | 2 +
java/org/apache/catalina/util/XMLWriter.java | 3 +
java/org/apache/jasper/servlet/JspServlet.java | 7 +-
.../apache/tomcat/jni/LibraryNotFoundError.java | 3 +
java/org/apache/tomcat/util/MultiThrowable.java | 3 +
java/org/apache/tomcat/util/buf/ByteChunk.java | 14 ++
java/org/apache/tomcat/util/buf/CharChunk.java | 3 +
java/org/apache/tomcat/util/buf/MessageBytes.java | 24 ++++
.../tomcat/util/descriptor/XmlErrorHandler.java | 25 ++++
.../tomcat/util/descriptor/XmlIdentifiers.java | 117 +++++++++++++++
.../util/descriptor/web/ContextResource.java | 3 +
.../tomcat/util/descriptor/web/FilterMap.java | 6 +
.../util/descriptor/web/InjectionTarget.java | 6 +
.../tomcat/util/descriptor/web/MultipartDef.java | 12 ++
.../tomcat/util/descriptor/web/ResourceBase.java | 3 +
.../util/descriptor/web/XmlEncodingBase.java | 6 +
java/org/apache/tomcat/util/http/ServerCookie.java | 6 +
.../apache/tomcat/util/http/WebdavIfHeader.java | 3 +-
.../impl/FileCountLimitExceededException.java | 3 +
.../apache/tomcat/util/modeler/ManagedBean.java | 9 ++
java/org/apache/tomcat/util/net/SSLHostConfig.java | 144 +++++++++++++++++++
.../tomcat/util/net/SSLHostConfigCertificate.java | 51 +++++++
.../tomcat/util/net/openssl/OpenSSLConf.java | 3 +
.../tomcat/util/net/openssl/OpenSSLConfCmd.java | 2 +
.../websocket/ReadBufferOverflowException.java | 1 +
.../org/apache/tomcat/websocket/WsIOException.java | 1 +
.../tomcat/websocket/WsWebSocketContainer.java | 5 +
.../tomcat/websocket/server/WsWriteTimeout.java | 16 +++
.../apache/tomcat/jdbc/pool/PoolProperties.java | 52 +++++++
.../org/apache/tomcat/jdbc/pool/XADataSource.java | 3 +
49 files changed, 805 insertions(+), 28 deletions(-)
diff --git a/java/org/apache/catalina/authenticator/SingleSignOnEntry.java
b/java/org/apache/catalina/authenticator/SingleSignOnEntry.java
index a25ff15ea5..757e46c312 100644
--- a/java/org/apache/catalina/authenticator/SingleSignOnEntry.java
+++ b/java/org/apache/catalina/authenticator/SingleSignOnEntry.java
@@ -43,17 +43,32 @@ public class SingleSignOnEntry implements Serializable {
// ------------------------------------------------------ Instance Fields
+ /**
+ * The authentication type (BASIC, CLIENT_CERT, DIGEST or FORM).
+ */
private String authType = null;
+ /**
+ * The password used for authentication.
+ */
private String password = null;
// Marked as transient so special handling can be applied to serialization
private transient Principal principal = null;
+ /**
+ * Map of session keys associated with this SSO entry.
+ */
private final Map<SingleSignOnSessionKey,SingleSignOnSessionKey>
sessionKeys = new ConcurrentHashMap<>();
+ /**
+ * The username used for authentication.
+ */
private String username = null;
+ /**
+ * Flag indicating whether re-authentication is supported.
+ */
private boolean canReauthenticate = false;
// --------------------------------------------------------- Constructors
@@ -186,6 +201,12 @@ public class SingleSignOnEntry implements Serializable {
}
+ /**
+ * Custom serialization to handle the transient principal field.
+ *
+ * @param out the object output stream
+ * @throws IOException if an I/O error occurs
+ */
private void writeObject(ObjectOutputStream out) throws IOException {
out.defaultWriteObject();
if (principal instanceof Serializable) {
@@ -196,6 +217,13 @@ public class SingleSignOnEntry implements Serializable {
}
}
+ /**
+ * Custom deserialization to restore the transient principal field.
+ *
+ * @param in the object input stream
+ * @throws IOException if an I/O error occurs
+ * @throws ClassNotFoundException if the principal class cannot be found
+ */
private void readObject(ObjectInputStream in) throws IOException,
ClassNotFoundException {
in.defaultReadObject();
boolean hasPrincipal = in.readBoolean();
diff --git a/java/org/apache/catalina/authenticator/SingleSignOnListener.java
b/java/org/apache/catalina/authenticator/SingleSignOnListener.java
index 1d68e55d21..a868388efd 100644
--- a/java/org/apache/catalina/authenticator/SingleSignOnListener.java
+++ b/java/org/apache/catalina/authenticator/SingleSignOnListener.java
@@ -32,6 +32,9 @@ public class SingleSignOnListener implements SessionListener,
Serializable {
private static final long serialVersionUID = 1L;
+ /**
+ * The SSO identifier associated with this listener.
+ */
private final String ssoId;
/**
diff --git a/java/org/apache/catalina/authenticator/SingleSignOnSessionKey.java
b/java/org/apache/catalina/authenticator/SingleSignOnSessionKey.java
index f469f8063f..87328eccbd 100644
--- a/java/org/apache/catalina/authenticator/SingleSignOnSessionKey.java
+++ b/java/org/apache/catalina/authenticator/SingleSignOnSessionKey.java
@@ -30,8 +30,17 @@ public class SingleSignOnSessionKey implements Serializable {
private static final long serialVersionUID = 1L;
+ /**
+ * The session ID.
+ */
private final String sessionId;
+ /**
+ * The context name.
+ */
private final String contextName;
+ /**
+ * The host name.
+ */
private final String hostName;
/**
diff --git a/java/org/apache/catalina/core/ApplicationFilterConfig.java
b/java/org/apache/catalina/core/ApplicationFilterConfig.java
index ea0c9f19f9..bf4ae682f8 100644
--- a/java/org/apache/catalina/core/ApplicationFilterConfig.java
+++ b/java/org/apache/catalina/core/ApplicationFilterConfig.java
@@ -347,8 +347,12 @@ public final class ApplicationFilterConfig implements
FilterConfig, Serializable
}
- /*
- * Log objects are not Serializable.
+ /**
+ * Restores the transient log field after deserialization.
+ *
+ * @param ois the object input stream
+ * @throws ClassNotFoundException if the log class cannot be found
+ * @throws IOException if an I/O error occurs
*/
private void readObject(ObjectInputStream ois) throws
ClassNotFoundException, IOException {
ois.defaultReadObject();
diff --git a/java/org/apache/catalina/deploy/NamingResourcesImpl.java
b/java/org/apache/catalina/deploy/NamingResourcesImpl.java
index bc04a3f25b..3d18b8826f 100644
--- a/java/org/apache/catalina/deploy/NamingResourcesImpl.java
+++ b/java/org/apache/catalina/deploy/NamingResourcesImpl.java
@@ -70,6 +70,9 @@ public class NamingResourcesImpl extends LifecycleMBeanBase
implements Serializa
private static final StringManager sm =
StringManager.getManager(NamingResourcesImpl.class);
+ /**
+ * Flag that controls whether resources require explicit JMX registration.
+ */
private volatile boolean resourceRequireExplicitRegistration = false;
// ----------------------------------------------------------- Constructors
diff --git a/java/org/apache/catalina/filters/CorsFilter.java
b/java/org/apache/catalina/filters/CorsFilter.java
index f5cd51d450..a7ae8fb5da 100644
--- a/java/org/apache/catalina/filters/CorsFilter.java
+++ b/java/org/apache/catalina/filters/CorsFilter.java
@@ -771,9 +771,14 @@ public class CorsFilter extends GenericFilter {
}
- /*
+ /**
+ * Restores the transient log field after deserialization.
* Log objects are not Serializable but this Filter is because it extends
GenericFilter. Tomcat won't serialize a
* Filter but in case something else does...
+ *
+ * @param ois the object input stream
+ * @throws ClassNotFoundException if the log class cannot be found
+ * @throws IOException if an I/O error occurs
*/
private void readObject(ObjectInputStream ois) throws
ClassNotFoundException, IOException {
ois.defaultReadObject();
diff --git a/java/org/apache/catalina/filters/CsrfPreventionFilter.java
b/java/org/apache/catalina/filters/CsrfPreventionFilter.java
index b9a86c82c0..55c8fbe0d7 100644
--- a/java/org/apache/catalina/filters/CsrfPreventionFilter.java
+++ b/java/org/apache/catalina/filters/CsrfPreventionFilter.java
@@ -785,6 +785,9 @@ public class CsrfPreventionFilter extends
CsrfPreventionFilterBase {
// Although the internal implementation uses a Map, this cache
// implementation is only concerned with the keys.
+ /**
+ * The internal cache map.
+ */
private final Map<T,T> cache;
/**
diff --git a/java/org/apache/catalina/filters/RemoteIpFilter.java
b/java/org/apache/catalina/filters/RemoteIpFilter.java
index d26057b087..d8d5d74d29 100644
--- a/java/org/apache/catalina/filters/RemoteIpFilter.java
+++ b/java/org/apache/catalina/filters/RemoteIpFilter.java
@@ -878,14 +878,10 @@ public class RemoteIpFilter extends GenericFilter {
return result.toString();
}
- /**
- * @see #setHttpServerPort(int)
- */
+ /** The default HTTP server port. */
private int httpServerPort = 80;
- /**
- * @see #setHttpsServerPort(int)
- */
+ /** The default HTTPS server port. */
private int httpsServerPort = 443;
/**
@@ -899,34 +895,31 @@ public class RemoteIpFilter extends GenericFilter {
"172\\.2[0-9]{1}\\.\\d{1,3}\\.\\d{1,3}|" +
"172\\.3[0-1]{1}\\.\\d{1,3}\\.\\d{1,3}|" +
"0:0:0:0:0:0:0:1|::1|" + "fe[89ab]\\p{XDigit}:.*|" +
"f[cd]\\p{XDigit}{2}+:.*");
- /**
- * @see #setProtocolHeader(String)
- */
+ /** The header used to determine the protocol. */
private String protocolHeader = "X-Forwarded-Proto";
+ /** The protocol header value that indicates HTTPS. */
private String protocolHeaderHttpsValue = "https";
+ /** The header used to determine the host. */
private String hostHeader = null;
+ /** Whether to change the local name. */
private boolean changeLocalName = false;
+ /** The header used to determine the port. */
private String portHeader = null;
+ /** Whether to change the local port. */
private boolean changeLocalPort = false;
- /**
- * @see #setProxiesHeader(String)
- */
+ /** The header used to determine the proxy chain. */
private String proxiesHeader = "X-Forwarded-By";
- /**
- * @see #setRemoteIpHeader(String)
- */
+ /** The header used to determine the remote IP address. */
private String remoteIpHeader = "X-Forwarded-For";
- /**
- * @see #setRequestAttributesEnabled(boolean)
- */
+ /** Whether to set request attributes. */
private boolean requestAttributesEnabled = true;
/**
@@ -934,6 +927,7 @@ public class RemoteIpFilter extends GenericFilter {
*/
private Pattern trustedProxies = null;
+ /** Whether DNS lookups are enabled. */
private boolean enableLookups;
/**
@@ -1532,9 +1526,13 @@ public class RemoteIpFilter extends GenericFilter {
this.enableLookups = enableLookups;
}
- /*
+ /**
+ * Restores the log after deserialization.
* Log objects are not Serializable but this Filter is because it extends
GenericFilter. Tomcat won't serialize a
* Filter but in case something else does...
+ * @param ois the object input stream
+ * @throws ClassNotFoundException if the class is not found
+ * @throws IOException if an I/O error occurs
*/
private void readObject(ObjectInputStream ois) throws
ClassNotFoundException, IOException {
ois.defaultReadObject();
diff --git a/java/org/apache/catalina/filters/RequestDumperFilter.java
b/java/org/apache/catalina/filters/RequestDumperFilter.java
index 3df1d49587..880d957f69 100644
--- a/java/org/apache/catalina/filters/RequestDumperFilter.java
+++ b/java/org/apache/catalina/filters/RequestDumperFilter.java
@@ -250,9 +250,14 @@ public class RequestDumperFilter extends GenericFilter {
}
- /*
+ /**
+ * Restores the log after deserialization.
* Log objects are not Serializable but this Filter is because it extends
GenericFilter. Tomcat won't serialize a
* Filter but in case something else does...
+ *
+ * @param ois the object input stream
+ * @throws ClassNotFoundException if the class is not found
+ * @throws IOException if an I/O error occurs
*/
private void readObject(ObjectInputStream ois) throws
ClassNotFoundException, IOException {
ois.defaultReadObject();
diff --git a/java/org/apache/catalina/ha/deploy/FileMessage.java
b/java/org/apache/catalina/ha/deploy/FileMessage.java
index 6e566c3cfd..7746b041f5 100644
--- a/java/org/apache/catalina/ha/deploy/FileMessage.java
+++ b/java/org/apache/catalina/ha/deploy/FileMessage.java
@@ -27,12 +27,18 @@ import org.apache.catalina.tribes.Member;
public class FileMessage extends ClusterMessageBase {
private static final long serialVersionUID = 2L;
+ /** The message number within the file transfer. */
private int messageNumber;
+ /** The file data payload. */
private byte[] data;
+ /** The length of the data. */
private int dataLength;
+ /** The total number of messages in the transfer. */
private long totalNrOfMsgs;
+ /** The name of the file being transferred. */
private final String fileName;
+ /** The context name associated with the file. */
private final String contextName;
/**
diff --git a/java/org/apache/catalina/ha/deploy/UndeployMessage.java
b/java/org/apache/catalina/ha/deploy/UndeployMessage.java
index 9a42b4f6fe..4bd788447f 100644
--- a/java/org/apache/catalina/ha/deploy/UndeployMessage.java
+++ b/java/org/apache/catalina/ha/deploy/UndeployMessage.java
@@ -25,9 +25,13 @@ import org.apache.catalina.tribes.Member;
public class UndeployMessage implements ClusterMessage {
private static final long serialVersionUID = 2L;
+ /** The sender's member address. */
private Member address;
+ /** The message timestamp. */
private long timestamp;
+ /** The unique identifier for this message. */
private final String uniqueId;
+ /** The context name to undeploy. */
private final String contextName;
/**
diff --git a/java/org/apache/catalina/ha/session/SessionMessageImpl.java
b/java/org/apache/catalina/ha/session/SessionMessageImpl.java
index 4d985d1326..2538b8a5cf 100644
--- a/java/org/apache/catalina/ha/session/SessionMessageImpl.java
+++ b/java/org/apache/catalina/ha/session/SessionMessageImpl.java
@@ -30,13 +30,20 @@ public class SessionMessageImpl extends ClusterMessageBase
implements SessionMes
/*
* Private serializable variables to keep the messages state
*/
+ /** The event type of the session message. */
private final int mEvtType;
+ /** The serialized session data. */
private final byte[] mSession;
+ /** The session identifier. */
private final String mSessionID;
+ /** The context name for the session. */
private final String mContextName;
+ /** The timestamp when the message was serialized. */
private long serializationTimestamp;
+ /** Whether the timestamp has been explicitly set. */
private boolean timestampSet = false;
+ /** The unique identifier for this message. */
private String uniqueId;
diff --git a/java/org/apache/catalina/manager/HTMLManagerServlet.java
b/java/org/apache/catalina/manager/HTMLManagerServlet.java
index e2f14203db..ca5f17cd51 100644
--- a/java/org/apache/catalina/manager/HTMLManagerServlet.java
+++ b/java/org/apache/catalina/manager/HTMLManagerServlet.java
@@ -83,7 +83,9 @@ public class HTMLManagerServlet extends ManagerServlet {
static final String connectorCertsJspPath =
"/WEB-INF/jsp/connectorCerts.jsp";
static final String connectorTrustedCertsJspPath =
"/WEB-INF/jsp/connectorTrustedCerts.jsp";
+ /** Whether to show proxy sessions in the output. */
private boolean showProxySessions = false;
+ /** The HTML subtitle for the manager pages. */
private String htmlSubTitle = null;
// --------------------------------------------------------- Public Methods
diff --git a/java/org/apache/catalina/realm/GenericPrincipal.java
b/java/org/apache/catalina/realm/GenericPrincipal.java
index f2728533df..5afcc9b55e 100644
--- a/java/org/apache/catalina/realm/GenericPrincipal.java
+++ b/java/org/apache/catalina/realm/GenericPrincipal.java
@@ -324,6 +324,10 @@ public class GenericPrincipal implements TomcatPrincipal,
Serializable {
// -----------------------------------------------------------
Serialization
+ /**
+ * Returns a serializable replacement for this principal.
+ * @return the serializable replacement
+ */
private Object writeReplace() {
return new SerializablePrincipal(name, roles, userPrincipal,
attributes);
}
diff --git a/java/org/apache/catalina/realm/X509SubjectDnRetriever.java
b/java/org/apache/catalina/realm/X509SubjectDnRetriever.java
index f8d3a4a976..cb3c054ae6 100644
--- a/java/org/apache/catalina/realm/X509SubjectDnRetriever.java
+++ b/java/org/apache/catalina/realm/X509SubjectDnRetriever.java
@@ -23,6 +23,12 @@ import java.security.cert.X509Certificate;
*/
public class X509SubjectDnRetriever implements X509UsernameRetriever {
+ /**
+ * Default constructor.
+ */
+ public X509SubjectDnRetriever() {
+ }
+
@Override
public String getUsername(X509Certificate clientCert) {
return clientCert.getSubjectX500Principal().toString();
diff --git a/java/org/apache/catalina/servlets/CGIServlet.java
b/java/org/apache/catalina/servlets/CGIServlet.java
index 4eb0c7d018..5ac95d4a74 100644
--- a/java/org/apache/catalina/servlets/CGIServlet.java
+++ b/java/org/apache/catalina/servlets/CGIServlet.java
@@ -245,8 +245,9 @@ public final class CGIServlet extends HttpServlet {
/** the encoding to use for parameters */
private String parameterEncoding = System.getProperty("file.encoding",
"UTF-8");
- /* The HTTP methods this Servlet will pass to the CGI script */
+ /** The HTTP methods this servlet will pass to the CGI script. */
private final Set<String> cgiMethods = new HashSet<>();
+ /** Whether all HTTP methods are allowed for CGI scripts. */
private boolean cgiMethodsAll = false;
private transient WebResourceRoot resources = null;
diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java
b/java/org/apache/catalina/servlets/WebdavServlet.java
index cfa9f05795..6e213cf6e5 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -261,6 +261,7 @@ public class WebdavServlet extends DefaultServlet
implements PeriodicEventListen
private int maxDepth = MAX_DEPTH;
+ /** The maximum size of the request body in bytes. */
private int maxRequestBodySize = DEFAULT_MAX_REQUEST_BODY_SIZE;
diff --git a/java/org/apache/catalina/tribes/io/XByteBuffer.java
b/java/org/apache/catalina/tribes/io/XByteBuffer.java
index d3a1328283..f5cdb948e3 100644
--- a/java/org/apache/catalina/tribes/io/XByteBuffer.java
+++ b/java/org/apache/catalina/tribes/io/XByteBuffer.java
@@ -49,6 +49,9 @@ public class XByteBuffer implements Serializable {
private static final long serialVersionUID = 1L;
private static final Log log = LogFactory.getLog(XByteBuffer.class);
+ /**
+ * String manager for this class.
+ */
protected static final StringManager sm =
StringManager.getManager(XByteBuffer.class);
/**
@@ -89,10 +92,23 @@ public class XByteBuffer implements Serializable {
this.discard = discard;
}
+ /**
+ * Constructs a new XByteBuffer from the given data.
+ *
+ * @param data the initial data
+ * @param discard Flag for discarding invalid packages
+ */
public XByteBuffer(byte[] data, boolean discard) {
this(data, data.length + 128, discard);
}
+ /**
+ * Constructs a new XByteBuffer from the given data with a specific buffer
size.
+ *
+ * @param data the initial data
+ * @param size the initial size of the byte buffer
+ * @param discard Flag for discarding invalid packages
+ */
public XByteBuffer(byte[] data, int size, boolean discard) {
int length = Math.max(data.length, size);
buf = new byte[length];
@@ -101,10 +117,20 @@ public class XByteBuffer implements Serializable {
this.discard = discard;
}
+ /**
+ * Returns the current length of the data in the buffer.
+ *
+ * @return the current length
+ */
public int getLength() {
return bufSize;
}
+ /**
+ * Sets the current length of the data in the buffer.
+ *
+ * @param size the new length
+ */
public void setLength(int size) {
if (size > buf.length) {
throw new
ArrayIndexOutOfBoundsException(sm.getString("xByteBuffer.size.larger.buffer"));
@@ -112,6 +138,11 @@ public class XByteBuffer implements Serializable {
bufSize = size;
}
+ /**
+ * Trims the specified number of bytes from the end of the buffer.
+ *
+ * @param length the number of bytes to trim
+ */
public void trim(int length) {
if ((bufSize - length) < 0) {
throw new ArrayIndexOutOfBoundsException(
@@ -120,10 +151,18 @@ public class XByteBuffer implements Serializable {
bufSize -= length;
}
+ /**
+ * Resets the buffer length to zero.
+ */
public void reset() {
bufSize = 0;
}
+ /**
+ * Returns the internal byte array directly, without copying.
+ *
+ * @return the internal byte array
+ */
public byte[] getBytesDirect() {
return this.buf;
}
@@ -176,6 +215,12 @@ public class XByteBuffer implements Serializable {
}
+ /**
+ * Appends a single byte to the buffer.
+ *
+ * @param i the byte to append
+ * @return always returns true
+ */
public boolean append(byte i) {
int newcount = bufSize + 1;
if (newcount > buf.length) {
@@ -187,6 +232,12 @@ public class XByteBuffer implements Serializable {
}
+ /**
+ * Appends a boolean value to the buffer.
+ *
+ * @param i the boolean to append
+ * @return always returns true
+ */
public boolean append(boolean i) {
int newcount = bufSize + 1;
if (newcount > buf.length) {
@@ -197,6 +248,12 @@ public class XByteBuffer implements Serializable {
return true;
}
+ /**
+ * Appends a long value to the buffer.
+ *
+ * @param i the long to append
+ * @return always returns true
+ */
public boolean append(long i) {
int newcount = bufSize + 8;
if (newcount > buf.length) {
@@ -207,6 +264,12 @@ public class XByteBuffer implements Serializable {
return true;
}
+ /**
+ * Appends an integer value to the buffer.
+ *
+ * @param i the integer to append
+ * @return always returns true
+ */
public boolean append(int i) {
int newcount = bufSize + 4;
if (newcount > buf.length) {
@@ -217,6 +280,14 @@ public class XByteBuffer implements Serializable {
return true;
}
+ /**
+ * Appends a portion of a byte array to the buffer.
+ *
+ * @param b the byte array
+ * @param off the offset in the byte array
+ * @param len the number of bytes to append
+ * @return true if data was appended, false if length is zero
+ */
public boolean append(byte[] b, int off, int len) {
if ((off < 0) || (off > b.length) || (len < 0) || ((off + len) >
b.length) || ((off + len) < 0)) {
throw new IndexOutOfBoundsException();
@@ -241,6 +312,11 @@ public class XByteBuffer implements Serializable {
return true;
}
+ /**
+ * Expands the internal buffer to accommodate the specified number of
bytes.
+ *
+ * @param newcount the new minimum capacity required
+ */
public void expand(int newcount) {
// don't change the allocation strategy
byte[] newbuf = new byte[Math.max(buf.length << 1, newcount)];
@@ -248,6 +324,11 @@ public class XByteBuffer implements Serializable {
buf = newbuf;
}
+ /**
+ * Returns the current capacity of the internal buffer.
+ *
+ * @return the buffer capacity
+ */
public int getCapacity() {
return buf.length;
}
@@ -262,6 +343,12 @@ public class XByteBuffer implements Serializable {
return countPackages(false);
}
+ /**
+ * Counts the number of complete packages in the buffer.
+ *
+ * @param first if true, only check for the first package
+ * @return the number of complete packages found
+ */
public int countPackages(boolean first) {
int cnt = 0;
int pos = START_DATA.length;
@@ -337,6 +424,12 @@ public class XByteBuffer implements Serializable {
}
+ /**
+ * Extracts a complete package from the buffer and deserializes it into a
ChannelData object.
+ *
+ * @param clearFromBuffer if true, the extracted package will be removed
from the buffer
+ * @return the deserialized ChannelData object
+ */
public ChannelData extractPackage(boolean clearFromBuffer) {
XByteBuffer xbuf = extractDataPackage(clearFromBuffer);
return ChannelData.getDataFromPackage(xbuf);
@@ -367,6 +460,16 @@ public class XByteBuffer implements Serializable {
return data;
}
+ /**
+ * Creates a complete data package with header, size, data, and footer,
writing to a provided buffer.
+ *
+ * @param data the data to package
+ * @param doff the offset in the data array
+ * @param dlength the length of the data
+ * @param buffer the output buffer
+ * @param bufoff the offset in the output buffer
+ * @return the output buffer
+ */
public static byte[] createDataPackage(byte[] data, int doff, int dlength,
byte[] buffer, int bufoff) {
if ((buffer.length - bufoff) > getDataPackageLength(dlength)) {
throw new
ArrayIndexOutOfBoundsException(sm.getString("xByteBuffer.unableCreate"));
@@ -379,6 +482,12 @@ public class XByteBuffer implements Serializable {
}
+ /**
+ * Calculates the total length of a data package including header, size
indicator, data, and footer.
+ *
+ * @param datalength the length of the data portion
+ * @return the total package length
+ */
public static int getDataPackageLength(int datalength) {
return START_DATA.length + // header length
4 + // data length indicator
@@ -386,6 +495,12 @@ public class XByteBuffer implements Serializable {
END_DATA.length; // footer length
}
+ /**
+ * Creates a complete data package from the given data.
+ *
+ * @param data the data to package
+ * @return a full package (header, size, data, footer)
+ */
public static byte[] createDataPackage(byte[] data) {
int length = getDataPackageLength(data.length);
byte[] result = new byte[length];
@@ -556,10 +671,30 @@ public class XByteBuffer implements Serializable {
}
+ /**
+ * Deserializes a Serializable object from the given byte array.
+ *
+ * @param data the byte array containing the serialized object
+ * @return the deserialized object
+ * @throws IOException if an I/O error occurs
+ * @throws ClassNotFoundException if the class of the serialized object
cannot be found
+ * @throws ClassCastException if the deserialized object is not
Serializable
+ */
public static Serializable deserialize(byte[] data) throws IOException,
ClassNotFoundException, ClassCastException {
return deserialize(data, 0, data.length);
}
+ /**
+ * Deserializes a Serializable object from a portion of the given byte
array.
+ *
+ * @param data the byte array containing the serialized object
+ * @param offset the offset in the byte array
+ * @param length the length of the data to deserialize
+ * @return the deserialized object
+ * @throws IOException if an I/O error occurs
+ * @throws ClassNotFoundException if the class of the serialized object
cannot be found
+ * @throws ClassCastException if the deserialized object is not
Serializable
+ */
public static Serializable deserialize(byte[] data, int offset, int length)
throws IOException, ClassNotFoundException, ClassCastException {
return deserialize(data, offset, length, null);
@@ -567,6 +702,18 @@ public class XByteBuffer implements Serializable {
private static final AtomicInteger invokecount = new AtomicInteger(0);
+ /**
+ * Deserializes a Serializable object from a portion of the given byte
array using the specified class loaders.
+ *
+ * @param data the byte array containing the serialized object
+ * @param offset the offset in the byte array
+ * @param length the length of the data to deserialize
+ * @param cls the class loaders to use for deserialization
+ * @return the deserialized object
+ * @throws IOException if an I/O error occurs
+ * @throws ClassNotFoundException if the class of the serialized object
cannot be found
+ * @throws ClassCastException if the deserialized object is not
Serializable
+ */
public static Serializable deserialize(byte[] data, int offset, int
length, ClassLoader[] cls)
throws IOException, ClassNotFoundException, ClassCastException {
invokecount.addAndGet(1);
@@ -608,10 +755,20 @@ public class XByteBuffer implements Serializable {
return outs.toByteArray();
}
+ /**
+ * Sets the discard flag for invalid packages.
+ *
+ * @param discard the new discard flag value
+ */
public void setDiscard(boolean discard) {
this.discard = discard;
}
+ /**
+ * Returns the discard flag for invalid packages.
+ *
+ * @return the discard flag value
+ */
public boolean getDiscard() {
return discard;
}
diff --git
a/java/org/apache/catalina/tribes/membership/StaticMembershipProvider.java
b/java/org/apache/catalina/tribes/membership/StaticMembershipProvider.java
index f0a262e193..8ce638f892 100644
--- a/java/org/apache/catalina/tribes/membership/StaticMembershipProvider.java
+++ b/java/org/apache/catalina/tribes/membership/StaticMembershipProvider.java
@@ -453,8 +453,11 @@ public class StaticMembershipProvider extends
MembershipProviderBase
* Message type for member ping.
*/
public static final int MSG_PING = 3;
+ /** The type of this member message. */
private final int msgtype;
+ /** The membership group identifier. */
private final byte[] membershipId;
+ /** The member associated with this message. */
private Member member;
/**
diff --git a/java/org/apache/catalina/util/ParameterMap.java
b/java/org/apache/catalina/util/ParameterMap.java
index fd74558193..5a60fff03e 100644
--- a/java/org/apache/catalina/util/ParameterMap.java
+++ b/java/org/apache/catalina/util/ParameterMap.java
@@ -37,8 +37,10 @@ public final class ParameterMap<K, V> implements Map<K,V>,
Serializable {
private static final long serialVersionUID = 2L;
+ /** The underlying map to which operations are delegated. */
private final Map<K,V> delegatedMap;
+ /** An unmodifiable view of the delegated map. */
private final Map<K,V> unmodifiableDelegatedMap;
diff --git a/java/org/apache/catalina/util/XMLWriter.java
b/java/org/apache/catalina/util/XMLWriter.java
index d4ec9302bd..85e425bfff 100644
--- a/java/org/apache/catalina/util/XMLWriter.java
+++ b/java/org/apache/catalina/util/XMLWriter.java
@@ -60,6 +60,9 @@ public class XMLWriter {
protected final Writer writer;
+ /**
+ * Flag to track whether the last write operation was an opening tag.
+ */
protected boolean lastWriteWasOpen;
diff --git a/java/org/apache/jasper/servlet/JspServlet.java
b/java/org/apache/jasper/servlet/JspServlet.java
index 9a7dc4b5c4..4d6b567ca9 100644
--- a/java/org/apache/jasper/servlet/JspServlet.java
+++ b/java/org/apache/jasper/servlet/JspServlet.java
@@ -63,11 +63,14 @@ public class JspServlet extends HttpServlet implements
PeriodicEventListener {
private final transient Log log = LogFactory.getLog(JspServlet.class);
private transient ServletContext context;
+ /** The servlet configuration. */
private ServletConfig config;
private transient Options options;
private transient JspRuntimeContext rctxt;
- // jspFile for a jsp configured explicitly as a servlet, in environments
where this
- // configuration is translated into an init-param for this servlet.
+ /**
+ * The JSP file for a JSP configured explicitly as a servlet, in
environments where this
+ * configuration is translated into an init-param for this servlet.
+ */
private String jspFile;
diff --git a/java/org/apache/tomcat/jni/LibraryNotFoundError.java
b/java/org/apache/tomcat/jni/LibraryNotFoundError.java
index 668151998d..d6613e5935 100644
--- a/java/org/apache/tomcat/jni/LibraryNotFoundError.java
+++ b/java/org/apache/tomcat/jni/LibraryNotFoundError.java
@@ -23,6 +23,9 @@ public class LibraryNotFoundError extends
UnsatisfiedLinkError {
private static final long serialVersionUID = 1L;
+ /**
+ * The names of the libraries that failed to load.
+ */
private final String libraryNames;
/**
diff --git a/java/org/apache/tomcat/util/MultiThrowable.java
b/java/org/apache/tomcat/util/MultiThrowable.java
index c28dfaa5b7..531566207c 100644
--- a/java/org/apache/tomcat/util/MultiThrowable.java
+++ b/java/org/apache/tomcat/util/MultiThrowable.java
@@ -36,6 +36,9 @@ public class MultiThrowable extends Throwable {
private static final long serialVersionUID = 1L;
+ /**
+ * The list of wrapped throwables.
+ */
private final List<Throwable> throwables = new ArrayList<>();
/**
diff --git a/java/org/apache/tomcat/util/buf/ByteChunk.java
b/java/org/apache/tomcat/util/buf/ByteChunk.java
index 2714dc4569..9d1a418c22 100644
--- a/java/org/apache/tomcat/util/buf/ByteChunk.java
+++ b/java/org/apache/tomcat/util/buf/ByteChunk.java
@@ -107,6 +107,9 @@ public final class ByteChunk extends AbstractChunk {
private transient Charset charset;
// byte[]
+ /**
+ * The underlying byte buffer.
+ */
private byte[] buff;
// transient as serialization is primarily for values via, e.g. JMX
@@ -131,12 +134,23 @@ public final class ByteChunk extends AbstractChunk {
}
+ /**
+ * Serializes this ByteChunk, writing the charset name.
+ * @param oos the object output stream
+ * @throws IOException if an I/O error occurs
+ */
private void writeObject(ObjectOutputStream oos) throws IOException {
oos.defaultWriteObject();
oos.writeUTF(getCharset().name());
}
+ /**
+ * Deserializes this ByteChunk, restoring the charset.
+ * @param ois the object input stream
+ * @throws ClassNotFoundException if the class is not found
+ * @throws IOException if an I/O error occurs
+ */
private void readObject(ObjectInputStream ois) throws
ClassNotFoundException, IOException {
ois.defaultReadObject();
this.charset = Charset.forName(ois.readUTF());
diff --git a/java/org/apache/tomcat/util/buf/CharChunk.java
b/java/org/apache/tomcat/util/buf/CharChunk.java
index 5422ccbd19..f4b50aa3e4 100644
--- a/java/org/apache/tomcat/util/buf/CharChunk.java
+++ b/java/org/apache/tomcat/util/buf/CharChunk.java
@@ -61,6 +61,9 @@ public final class CharChunk extends AbstractChunk implements
CharSequence {
// --------------------
// char[]
+ /**
+ * The underlying character buffer.
+ */
private char[] buff;
// transient as serialization is primarily for values via, e.g. JMX
diff --git a/java/org/apache/tomcat/util/buf/MessageBytes.java
b/java/org/apache/tomcat/util/buf/MessageBytes.java
index 68159c87b2..6566fac7c8 100644
--- a/java/org/apache/tomcat/util/buf/MessageBytes.java
+++ b/java/org/apache/tomcat/util/buf/MessageBytes.java
@@ -39,6 +39,9 @@ public final class MessageBytes implements Cloneable,
Serializable {
private static final StringManager sm =
StringManager.getManager(MessageBytes.class);
// primary type ( whatever is set as original value )
+ /**
+ * The primary data type of this MessageBytes instance.
+ */
private int type = T_NULL;
/**
@@ -63,15 +66,30 @@ public final class MessageBytes implements Cloneable,
Serializable {
*/
public static final char[] EMPTY_CHAR_ARRAY = new char[0];
+ /**
+ * The cached hash code value.
+ */
private int hashCode = 0;
// did we compute the hashcode ?
+ /**
+ * Whether the hash code has been computed.
+ */
private boolean hasHashCode = false;
// Internal objects to represent array + offset, and specific methods
+ /**
+ * The internal byte chunk for byte array representation.
+ */
private final ByteChunk byteC = new ByteChunk();
+ /**
+ * The internal char chunk for character array representation.
+ */
private final CharChunk charC = new CharChunk();
// String
+ /**
+ * The cached string value.
+ */
private String strValue;
/**
@@ -600,7 +618,13 @@ public final class MessageBytes implements Cloneable,
Serializable {
}
// efficient long
+ /**
+ * The cached long value.
+ */
private long longValue;
+ /**
+ * Whether the long value has been computed.
+ */
private boolean hasLongValue = false;
/**
diff --git a/java/org/apache/tomcat/util/descriptor/XmlErrorHandler.java
b/java/org/apache/tomcat/util/descriptor/XmlErrorHandler.java
index 9365787041..f6161ca866 100644
--- a/java/org/apache/tomcat/util/descriptor/XmlErrorHandler.java
+++ b/java/org/apache/tomcat/util/descriptor/XmlErrorHandler.java
@@ -25,8 +25,17 @@ import org.xml.sax.ErrorHandler;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
+/**
+ * SAX error handler that collects warnings and errors for later processing.
+ */
public class XmlErrorHandler implements ErrorHandler {
+ /**
+ * Default constructor.
+ */
+ public XmlErrorHandler() {
+ }
+
private static final StringManager sm =
StringManager.getManager(Constants.PACKAGE_NAME);
private final List<SAXParseException> errors = new ArrayList<>();
@@ -51,16 +60,32 @@ public class XmlErrorHandler implements ErrorHandler {
warnings.add(exception);
}
+ /**
+ * Returns the list of collected parsing errors.
+ *
+ * @return the list of errors
+ */
public List<SAXParseException> getErrors() {
// Internal use only - don't worry about immutability
return errors;
}
+ /**
+ * Returns the list of collected parsing warnings.
+ *
+ * @return the list of warnings
+ */
public List<SAXParseException> getWarnings() {
// Internal use only - don't worry about immutability
return warnings;
}
+ /**
+ * Logs all collected warnings and errors to the specified log.
+ *
+ * @param log the log to use
+ * @param source the source of the XML being parsed
+ */
public void logFindings(Log log, String source) {
for (SAXParseException e : getWarnings()) {
log.warn(sm.getString("xmlErrorHandler.warning", e.getMessage(),
source));
diff --git a/java/org/apache/tomcat/util/descriptor/XmlIdentifiers.java
b/java/org/apache/tomcat/util/descriptor/XmlIdentifiers.java
index 25d5c75589..45f0cd661c 100644
--- a/java/org/apache/tomcat/util/descriptor/XmlIdentifiers.java
+++ b/java/org/apache/tomcat/util/descriptor/XmlIdentifiers.java
@@ -22,62 +22,179 @@ package org.apache.tomcat.util.descriptor;
public final class XmlIdentifiers {
// from W3C
+ /**
+ * W3C XML Schema XSD identifier.
+ */
public static final String XML_2001_XSD = "http://www.w3.org/2001/xml.xsd";
+ /**
+ * W3C datatypes public identifier.
+ */
public static final String DATATYPES_PUBLIC = "datatypes";
+ /**
+ * W3C XML Schema 1.0 public identifier.
+ */
public static final String XSD_10_PUBLIC = "-//W3C//DTD XMLSCHEMA
200102//EN";
// from J2EE 1.2
+ /**
+ * Web Application 2.2 public identifier.
+ */
public static final String WEB_22_PUBLIC = "-//Sun Microsystems, Inc.//DTD
Web Application 2.2//EN";
+ /**
+ * Web Application 2.2 system identifier.
+ */
public static final String WEB_22_SYSTEM =
"http://java.sun.com/dtd/web-app_2_2.dtd";
+ /**
+ * JSP Tag Library 1.1 public identifier.
+ */
public static final String TLD_11_PUBLIC = "-//Sun Microsystems, Inc.//DTD
JSP Tag Library 1.1//EN";
+ /**
+ * JSP Tag Library 1.1 system identifier.
+ */
public static final String TLD_11_SYSTEM =
"http://java.sun.com/dtd/web-jsptaglibrary_1_1.dtd";
// from J2EE 1.3
+ /**
+ * Web Application 2.3 public identifier.
+ */
public static final String WEB_23_PUBLIC = "-//Sun Microsystems, Inc.//DTD
Web Application 2.3//EN";
+ /**
+ * Web Application 2.3 system identifier.
+ */
public static final String WEB_23_SYSTEM =
"http://java.sun.com/dtd/web-app_2_3.dtd";
+ /**
+ * JSP Tag Library 1.2 public identifier.
+ */
public static final String TLD_12_PUBLIC = "-//Sun Microsystems, Inc.//DTD
JSP Tag Library 1.2//EN";
+ /**
+ * JSP Tag Library 1.2 system identifier.
+ */
public static final String TLD_12_SYSTEM =
"http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd";
// from J2EE 1.4
+ /**
+ * Java EE 1.4 namespace.
+ */
public static final String JAVAEE_1_4_NS =
"http://java.sun.com/xml/ns/j2ee";
+ /**
+ * Web Application 2.4 XSD.
+ */
public static final String WEB_24_XSD = JAVAEE_1_4_NS + "/web-app_2_4.xsd";
+ /**
+ * JSP Tag Library 2.0 XSD.
+ */
public static final String TLD_20_XSD = JAVAEE_1_4_NS +
"/web-jsptaglibrary_2_0.xsd";
+ /**
+ * Web Services 1.1 XSD.
+ */
public static final String WEBSERVICES_11_XSD =
"http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd";
// from JavaEE 5
+ /**
+ * Java EE 5 namespace.
+ */
public static final String JAVAEE_5_NS =
"http://java.sun.com/xml/ns/javaee";
+ /**
+ * Web Application 2.5 XSD.
+ */
public static final String WEB_25_XSD = JAVAEE_5_NS + "/web-app_2_5.xsd";
+ /**
+ * JSP Tag Library 2.1 XSD.
+ */
public static final String TLD_21_XSD = JAVAEE_5_NS +
"/web-jsptaglibrary_2_1.xsd";
+ /**
+ * Web Services 1.2 XSD.
+ */
public static final String WEBSERVICES_12_XSD = JAVAEE_5_NS +
"javaee_web_services_1_2.xsd";
// from JavaEE 6
+ /**
+ * Java EE 6 namespace.
+ */
public static final String JAVAEE_6_NS = JAVAEE_5_NS;
+ /**
+ * Web Application 3.0 XSD.
+ */
public static final String WEB_30_XSD = JAVAEE_6_NS + "/web-app_3_0.xsd";
+ /**
+ * Web Fragment 3.0 XSD.
+ */
public static final String WEB_FRAGMENT_30_XSD = JAVAEE_6_NS +
"/web-fragment_3_0.xsd";
+ /**
+ * Web Services 1.3 XSD.
+ */
public static final String WEBSERVICES_13_XSD = JAVAEE_6_NS +
"/javaee_web_services_1_3.xsd";
// from JavaEE 7
+ /**
+ * Java EE 7 namespace.
+ */
public static final String JAVAEE_7_NS =
"http://xmlns.jcp.org/xml/ns/javaee";
+ /**
+ * Web Application 3.1 XSD.
+ */
public static final String WEB_31_XSD = JAVAEE_7_NS + "/web-app_3_1.xsd";
+ /**
+ * Web Fragment 3.1 XSD.
+ */
public static final String WEB_FRAGMENT_31_XSD = JAVAEE_7_NS +
"/web-fragment_3_1.xsd";
+ /**
+ * Web Services 1.4 XSD.
+ */
public static final String WEBSERVICES_14_XSD = JAVAEE_7_NS +
"/javaee_web_services_1_4.xsd";
// from JavaEE 8
+ /**
+ * Java EE 8 namespace.
+ */
public static final String JAVAEE_8_NS = JAVAEE_7_NS;
+ /**
+ * Web Application 4.0 XSD.
+ */
public static final String WEB_40_XSD = JAVAEE_8_NS + "/web-app_4_0.xsd";
+ /**
+ * Web Fragment 4.0 XSD.
+ */
public static final String WEB_FRAGMENT_40_XSD = JAVAEE_8_NS +
"/web-fragment_4_0.xsd";
// from Jakarta EE 9
+ /**
+ * Jakarta EE 9 namespace.
+ */
public static final String JAKARTAEE_9_NS =
"https://jakarta.ee/xml/ns/jakartaee";
+ /**
+ * Web Application 5.0 XSD.
+ */
public static final String WEB_50_XSD = JAKARTAEE_9_NS +
"/web-app_5_0.xsd";
+ /**
+ * Web Fragment 5.0 XSD.
+ */
public static final String WEB_FRAGMENT_50_XSD = JAKARTAEE_9_NS +
"/web-fragment_5_0.xsd";
+ /**
+ * JSP Tag Library 3.0 XSD.
+ */
public static final String TLD_30_XSD = JAKARTAEE_9_NS +
"/web-jsptaglibrary_3_0.xsd";
+ /**
+ * Web Services 2.0 XSD.
+ */
public static final String WEBSERVICES_20_XSD = JAKARTAEE_9_NS +
"/jakartaee_web_services_2_0.xsd";
// from Jakarta EE 10
+ /**
+ * Jakarta EE 10 namespace.
+ */
public static final String JAKARTAEE_10_NS = JAKARTAEE_9_NS;
+ /**
+ * Web Application 6.0 XSD.
+ */
public static final String WEB_60_XSD = JAKARTAEE_10_NS +
"/web-app_6_0.xsd";
+ /**
+ * Web Fragment 6.0 XSD.
+ */
public static final String WEB_FRAGMENT_60_XSD = JAKARTAEE_10_NS +
"/web-fragment_6_0.xsd";
+ /**
+ * JSP Tag Library 3.1 XSD.
+ */
public static final String TLD_31_XSD = JAKARTAEE_10_NS +
"/web-jsptaglibrary_3_1.xsd";
private XmlIdentifiers() {
diff --git a/java/org/apache/tomcat/util/descriptor/web/ContextResource.java
b/java/org/apache/tomcat/util/descriptor/web/ContextResource.java
index 928c9bc515..b9c80e52e0 100644
--- a/java/org/apache/tomcat/util/descriptor/web/ContextResource.java
+++ b/java/org/apache/tomcat/util/descriptor/web/ContextResource.java
@@ -111,6 +111,9 @@ public class ContextResource extends ResourceBase {
* This method must only speed up the clean-up of resources that would
otherwise happen via garbage collection.
*/
private String closeMethod = null;
+ /**
+ * Whether the close method has been explicitly configured.
+ */
private boolean closeMethodConfigured = false;
/**
diff --git a/java/org/apache/tomcat/util/descriptor/web/FilterMap.java
b/java/org/apache/tomcat/util/descriptor/web/FilterMap.java
index 1158c8ebcb..a6310bb96f 100644
--- a/java/org/apache/tomcat/util/descriptor/web/FilterMap.java
+++ b/java/org/apache/tomcat/util/descriptor/web/FilterMap.java
@@ -70,8 +70,14 @@ public class FilterMap extends XmlEncodingBase implements
Serializable {
// as equal to a REQUEST
private static final int NOT_SET = 0;
+ /**
+ * The dispatcher mapping bitmask for this filter mapping.
+ */
private int dispatcherMapping = NOT_SET;
+ /**
+ * The name of the filter associated with this mapping.
+ */
private String filterName = null;
/**
diff --git a/java/org/apache/tomcat/util/descriptor/web/InjectionTarget.java
b/java/org/apache/tomcat/util/descriptor/web/InjectionTarget.java
index 78cbcb9ccb..5699bfb2ff 100644
--- a/java/org/apache/tomcat/util/descriptor/web/InjectionTarget.java
+++ b/java/org/apache/tomcat/util/descriptor/web/InjectionTarget.java
@@ -25,7 +25,13 @@ public class InjectionTarget implements Serializable {
private static final long serialVersionUID = 1L;
+ /**
+ * The fully qualified class name of the injection target.
+ */
private String targetClass;
+ /**
+ * The name of the field or method to inject into.
+ */
private String targetName;
diff --git a/java/org/apache/tomcat/util/descriptor/web/MultipartDef.java
b/java/org/apache/tomcat/util/descriptor/web/MultipartDef.java
index 132d75ea35..6204a7ce48 100644
--- a/java/org/apache/tomcat/util/descriptor/web/MultipartDef.java
+++ b/java/org/apache/tomcat/util/descriptor/web/MultipartDef.java
@@ -33,6 +33,9 @@ public class MultipartDef implements Serializable {
}
// ------------------------------------------------------------- Properties
+ /**
+ * The location for temporary file storage.
+ */
private String location;
/**
@@ -52,6 +55,9 @@ public class MultipartDef implements Serializable {
}
+ /**
+ * The maximum allowed file size.
+ */
private String maxFileSize;
/**
@@ -71,6 +77,9 @@ public class MultipartDef implements Serializable {
}
+ /**
+ * The maximum allowed request size.
+ */
private String maxRequestSize;
/**
@@ -90,6 +99,9 @@ public class MultipartDef implements Serializable {
}
+ /**
+ * The file size threshold for switching to disk storage.
+ */
private String fileSizeThreshold;
/**
diff --git a/java/org/apache/tomcat/util/descriptor/web/ResourceBase.java
b/java/org/apache/tomcat/util/descriptor/web/ResourceBase.java
index 0e25fb3912..5ff7e20821 100644
--- a/java/org/apache/tomcat/util/descriptor/web/ResourceBase.java
+++ b/java/org/apache/tomcat/util/descriptor/web/ResourceBase.java
@@ -178,6 +178,9 @@ public class ResourceBase implements Serializable,
Injectable {
return properties.keySet().iterator();
}
+ /**
+ * The list of injection targets for this resource.
+ */
private final List<InjectionTarget> injectionTargets = new ArrayList<>();
@Override
diff --git a/java/org/apache/tomcat/util/descriptor/web/XmlEncodingBase.java
b/java/org/apache/tomcat/util/descriptor/web/XmlEncodingBase.java
index 642e10ed87..9c8f96c89f 100644
--- a/java/org/apache/tomcat/util/descriptor/web/XmlEncodingBase.java
+++ b/java/org/apache/tomcat/util/descriptor/web/XmlEncodingBase.java
@@ -24,6 +24,12 @@ import java.nio.charset.StandardCharsets;
*/
public abstract class XmlEncodingBase {
+ /**
+ * Default constructor.
+ */
+ public XmlEncodingBase() {
+ }
+
private Charset charset = StandardCharsets.UTF_8;
diff --git a/java/org/apache/tomcat/util/http/ServerCookie.java
b/java/org/apache/tomcat/util/http/ServerCookie.java
index b455d0d0ed..3b914dc4d7 100644
--- a/java/org/apache/tomcat/util/http/ServerCookie.java
+++ b/java/org/apache/tomcat/util/http/ServerCookie.java
@@ -33,7 +33,13 @@ public class ServerCookie implements Serializable {
private static final long serialVersionUID = 1L;
// RFC 6265
+ /**
+ * The cookie name.
+ */
private final MessageBytes name = MessageBytes.newInstance();
+ /**
+ * The cookie value.
+ */
private final MessageBytes value = MessageBytes.newInstance();
/**
diff --git a/java/org/apache/tomcat/util/http/WebdavIfHeader.java
b/java/org/apache/tomcat/util/http/WebdavIfHeader.java
index 8687d50137..27d2d615ab 100644
--- a/java/org/apache/tomcat/util/http/WebdavIfHeader.java
+++ b/java/org/apache/tomcat/util/http/WebdavIfHeader.java
@@ -703,8 +703,7 @@ public class WebdavIfHeader {
* <pre>
* IfList = { [ "Not" ] ( ("<" Word ">" ) | ( "[" Word "]" ) ) } .
* </pre>
- * <p>
- */
+ */
private static class IfList extends ArrayList<IfListEntry> {
private static final long serialVersionUID = 1L;
diff --git
a/java/org/apache/tomcat/util/http/fileupload/impl/FileCountLimitExceededException.java
b/java/org/apache/tomcat/util/http/fileupload/impl/FileCountLimitExceededException.java
index 958f681276..ebedbe8ef8 100644
---
a/java/org/apache/tomcat/util/http/fileupload/impl/FileCountLimitExceededException.java
+++
b/java/org/apache/tomcat/util/http/fileupload/impl/FileCountLimitExceededException.java
@@ -26,6 +26,9 @@ public class FileCountLimitExceededException extends
FileUploadException {
private static final long serialVersionUID = 2408766352570556046L;
+ /**
+ * The file count limit that was exceeded.
+ */
private final long limit;
/**
diff --git a/java/org/apache/tomcat/util/modeler/ManagedBean.java
b/java/org/apache/tomcat/util/modeler/ManagedBean.java
index 324f69f2d1..fb0abad8bc 100644
--- a/java/org/apache/tomcat/util/modeler/ManagedBean.java
+++ b/java/org/apache/tomcat/util/modeler/ManagedBean.java
@@ -55,14 +55,23 @@ public class ManagedBean implements java.io.Serializable {
static final Class<?>[] NO_ARGS_PARAM_SIG = new Class[0];
+ /**
+ * Lock for thread-safe access to the MBeanInfo cache.
+ */
private final ReadWriteLock mBeanInfoLock = new ReentrantReadWriteLock();
/**
* The <code>ModelMBeanInfo</code> object that corresponds to this
<code>ManagedBean</code> instance.
*/
private transient volatile MBeanInfo info = null;
+ /**
+ * The map of attribute descriptors by name.
+ */
private final Map<String,AttributeInfo> attributes = new HashMap<>();
+ /**
+ * The map of operation descriptors by key.
+ */
private final Map<String,OperationInfo> operations = new HashMap<>();
/**
diff --git a/java/org/apache/tomcat/util/net/SSLHostConfig.java
b/java/org/apache/tomcat/util/net/SSLHostConfig.java
index de971987b8..26640aaab4 100644
--- a/java/org/apache/tomcat/util/net/SSLHostConfig.java
+++ b/java/org/apache/tomcat/util/net/SSLHostConfig.java
@@ -89,73 +89,217 @@ public class SSLHostConfig implements Serializable {
SSL_PROTO_ALL_SET.add(Constants.SSL_PROTO_TLSv1_3);
}
+ /**
+ * The detected configuration type (JSSE or OpenSSL).
+ */
private Type configType = null;
+ /**
+ * The detected trust configuration type (JSSE or OpenSSL).
+ */
private Type trustConfigType = null;
+ /**
+ * The name of the virtual host.
+ */
private String hostName = DEFAULT_SSL_HOST_NAME;
+ /**
+ * The native OpenSSL configuration context pointer.
+ */
private transient volatile Long openSslConfContext = Long.valueOf(0);
// OpenSSL can handle multiple certs in a single config so the reference to
// the context is here at the virtual host level. JSSE can't so the
// reference is held on the certificate.
+ /**
+ * The native OpenSSL SSL context pointer.
+ */
private transient volatile Long openSslContext = Long.valueOf(0);
+ /**
+ * Whether TLS 1.3 renegotiation is available.
+ */
private boolean tls13RenegotiationAvailable = false;
// Configuration properties
// Internal
+ /**
+ * The ciphers enabled by the SSL engine.
+ */
private String[] enabledCiphers;
+ /**
+ * The protocols enabled by the SSL engine.
+ */
private String[] enabledProtocols;
+ /**
+ * The JMX object name.
+ */
private ObjectName oname;
// Need to know if TLS 1.3 has been explicitly requested as a warning needs
// to generated if it is explicitly requested for a JVM that does not
// support it. Uses a set so it is extensible for TLS 1.4 etc.
+ /**
+ * The set of protocols explicitly requested by the user.
+ */
private final Set<String> explicitlyRequestedProtocols = new HashSet<>();
// Nested
+ /**
+ * The default certificate configuration.
+ */
private SSLHostConfigCertificate defaultCertificate = null;
+ /**
+ * The set of certificate configurations.
+ */
private final Set<SSLHostConfigCertificate> certificates = new
LinkedHashSet<>(4);
// Common
+ /**
+ * The path to the certificate revocation list file.
+ */
private String certificateRevocationListFile;
+ /**
+ * The client certificate verification mode.
+ */
private CertificateVerification certificateVerification =
CertificateVerification.NONE;
+ /**
+ * The depth for certificate chain verification.
+ */
private int certificateVerificationDepth = 10;
// Used to track if certificateVerificationDepth has been explicitly set
+ /**
+ * Whether the certificate verification depth was explicitly configured.
+ */
private boolean certificateVerificationDepthConfigured = false;
+ /**
+ * The cipher configuration for TLS 1.2 and below (OpenSSL format).
+ */
private String ciphers = DEFAULT_TLS_CIPHERS_12;
+ /**
+ * The cipher suite configuration for TLS 1.3.
+ */
private String cipherSuites = DEFAULT_TLS_CIPHERS_13;
private String cipherSuitesFromCiphers = null;
+ /**
+ * The parsed cipher list for TLS 1.2 and below.
+ */
private LinkedHashSet<Cipher> cipherList = null;
+ /**
+ * The parsed cipher suite list for TLS 1.3.
+ */
private LinkedHashSet<Cipher> cipherSuiteList = null;
+ /**
+ * The JSSE cipher names derived from the configuration.
+ */
private List<String> jsseCipherNames = null;
+ /**
+ * Whether to honor the server's cipher order preference.
+ */
private boolean honorCipherOrder = false;
+ /**
+ * Whether OCSP stapling is enabled.
+ */
private boolean ocspEnabled = false;
+ /**
+ * Whether OCSP soft fail is enabled.
+ */
private boolean ocspSoftFail = true;
+ /**
+ * The OCSP request timeout in milliseconds.
+ */
private int ocspTimeout = 15000;
+ /**
+ * The OCSP verification flags.
+ */
private int ocspVerifyFlags = 0;
+ /**
+ * The set of enabled SSL/TLS protocols.
+ */
private final Set<String> protocols = new HashSet<>();
// Values <0 mean use the implementation default
+ /**
+ * The SSL session cache size.
+ */
private int sessionCacheSize = -1;
+ /**
+ * The SSL session timeout in seconds.
+ */
private int sessionTimeout = 86400;
// JSSE
+ /**
+ * The key manager algorithm.
+ */
private String keyManagerAlgorithm =
KeyManagerFactory.getDefaultAlgorithm();
+ /**
+ * Whether CRL/OCSP revocation checking is enabled.
+ */
private boolean revocationEnabled = false;
+ /**
+ * The JSSE SSL protocol name.
+ */
private String sslProtocol = Constants.SSL_PROTO_TLS;
+ /**
+ * The trust manager class name.
+ */
private String trustManagerClassName;
+ /**
+ * The truststore algorithm.
+ */
private String truststoreAlgorithm =
TrustManagerFactory.getDefaultAlgorithm();
+ /**
+ * The truststore file path.
+ */
private String truststoreFile =
System.getProperty("javax.net.ssl.trustStore");
+ /**
+ * The truststore password.
+ */
private String truststorePassword =
System.getProperty("javax.net.ssl.trustStorePassword");
+ /**
+ * The truststore provider.
+ */
private String truststoreProvider =
System.getProperty("javax.net.ssl.trustStoreProvider");
+ /**
+ * The truststore type.
+ */
private String truststoreType =
System.getProperty("javax.net.ssl.trustStoreType");
+ /**
+ * The truststore instance.
+ */
private transient KeyStore truststore = null;
+ /**
+ * The configured TLS named groups.
+ */
private String groups = System.getProperty("jdk.tls.namedGroups");
+ /**
+ * The parsed group list.
+ */
private LinkedHashSet<Group> groupList = null;
// OpenSSL
+ /**
+ * The path to the certificate revocation list directory.
+ */
private String certificateRevocationListPath;
+ /**
+ * The path to the CA certificate file.
+ */
private String caCertificateFile;
+ /**
+ * The path to the CA certificate directory.
+ */
private String caCertificatePath;
+ /**
+ * Whether TLS compression is disabled.
+ */
private boolean disableCompression = true;
+ /**
+ * Whether TLS session tickets are disabled.
+ */
private boolean disableSessionTickets = false;
+ /**
+ * Whether insecure renegotiation is allowed.
+ */
private boolean insecureRenegotiation = false;
+ /**
+ * The OpenSSL configuration.
+ */
private OpenSSLConf openSslConf = null;
/**
diff --git a/java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java
b/java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java
index 1544dc39fd..395a1c6dcc 100644
--- a/java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java
+++ b/java/org/apache/tomcat/util/net/SSLHostConfigCertificate.java
@@ -55,6 +55,9 @@ public class SSLHostConfigCertificate implements Serializable
{
private static final String DEFAULT_KEYSTORE_PASSWORD = "changeit";
// Internal
+ /**
+ * The JMX object name for this certificate.
+ */
private ObjectName oname;
/*
@@ -67,27 +70,75 @@ public class SSLHostConfigCertificate implements
Serializable {
// Common
+ /**
+ * The parent SSL host configuration.
+ */
private final SSLHostConfig sslHostConfig;
+ /**
+ * The type of this certificate.
+ */
private final Type type;
+ /**
+ * The password for the certificate's private key.
+ */
private String certificateKeyPassword = null;
+ /**
+ * The path to the file containing the certificate key password.
+ */
private String certificateKeyPasswordFile = null;
// JSSE
+ /**
+ * The alias of the key entry in the keystore.
+ */
private String certificateKeyAlias;
+ /**
+ * The password used to access the keystore.
+ */
private String certificateKeystorePassword = DEFAULT_KEYSTORE_PASSWORD;
+ /**
+ * The path to the file containing the keystore password.
+ */
private String certificateKeystorePasswordFile = null;
+ /**
+ * The path to the keystore file.
+ */
private String certificateKeystoreFile = DEFAULT_KEYSTORE_FILE;
+ /**
+ * The provider of the keystore.
+ */
private String certificateKeystoreProvider = DEFAULT_KEYSTORE_PROVIDER;
+ /**
+ * The type of the keystore.
+ */
private String certificateKeystoreType = DEFAULT_KEYSTORE_TYPE;
+ /**
+ * The Java KeyStore for this certificate.
+ */
private transient KeyStore certificateKeystore = null;
+ /**
+ * The X509KeyManager for this certificate.
+ */
private transient X509KeyManager certificateKeyManager = null;
// OpenSSL
+ /**
+ * The path to the certificate chain file.
+ */
private String certificateChainFile;
+ /**
+ * The path to the certificate file.
+ */
private String certificateFile;
+ /**
+ * The path to the private key file.
+ */
private String certificateKeyFile;
// Certificate store type
+ /**
+ * The type of certificate store (KEYSTORE or PEM).
+ */
private StoreType storeType = null;
/**
diff --git a/java/org/apache/tomcat/util/net/openssl/OpenSSLConf.java
b/java/org/apache/tomcat/util/net/openssl/OpenSSLConf.java
index 23af06fd1d..84497fea8b 100644
--- a/java/org/apache/tomcat/util/net/openssl/OpenSSLConf.java
+++ b/java/org/apache/tomcat/util/net/openssl/OpenSSLConf.java
@@ -33,6 +33,9 @@ public class OpenSSLConf implements Serializable {
private static final long serialVersionUID = 1L;
+ /**
+ * The list of OpenSSL configuration commands.
+ */
private final List<OpenSSLConfCmd> commands = new ArrayList<>();
/**
diff --git a/java/org/apache/tomcat/util/net/openssl/OpenSSLConfCmd.java
b/java/org/apache/tomcat/util/net/openssl/OpenSSLConfCmd.java
index e7ba27acf3..3dd1948a7d 100644
--- a/java/org/apache/tomcat/util/net/openssl/OpenSSLConfCmd.java
+++ b/java/org/apache/tomcat/util/net/openssl/OpenSSLConfCmd.java
@@ -35,7 +35,9 @@ public class OpenSSLConfCmd implements Serializable {
private static final long serialVersionUID = 1L;
+ /** The command name. */
private String name = null;
+ /** The command value. */
private String value = null;
/**
diff --git a/java/org/apache/tomcat/websocket/ReadBufferOverflowException.java
b/java/org/apache/tomcat/websocket/ReadBufferOverflowException.java
index 9071a86282..b38a003220 100644
--- a/java/org/apache/tomcat/websocket/ReadBufferOverflowException.java
+++ b/java/org/apache/tomcat/websocket/ReadBufferOverflowException.java
@@ -25,6 +25,7 @@ public class ReadBufferOverflowException extends IOException {
private static final long serialVersionUID = 1L;
+ /** The minimum buffer size required. */
private final int minBufferSize;
/**
diff --git a/java/org/apache/tomcat/websocket/WsIOException.java
b/java/org/apache/tomcat/websocket/WsIOException.java
index 1e779351dc..d4e139218b 100644
--- a/java/org/apache/tomcat/websocket/WsIOException.java
+++ b/java/org/apache/tomcat/websocket/WsIOException.java
@@ -28,6 +28,7 @@ public class WsIOException extends IOException {
private static final long serialVersionUID = 1L;
+ /** The WebSocket close reason. */
private final CloseReason closeReason;
/**
diff --git a/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
b/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
index f3ec5fe207..e68e3c8004 100644
--- a/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
+++ b/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
@@ -128,6 +128,11 @@ public class WsWebSocketContainer implements
WebSocketContainer, BackgroundProce
return InstanceManagerBindings.get(classLoader);
}
+ /**
+ * Sets the instance manager for this container.
+ *
+ * @param instanceManager the instance manager
+ */
protected void setInstanceManager(InstanceManager instanceManager) {
this.instanceManager = instanceManager;
}
diff --git a/java/org/apache/tomcat/websocket/server/WsWriteTimeout.java
b/java/org/apache/tomcat/websocket/server/WsWriteTimeout.java
index a71f77cd89..7877f6acb3 100644
--- a/java/org/apache/tomcat/websocket/server/WsWriteTimeout.java
+++ b/java/org/apache/tomcat/websocket/server/WsWriteTimeout.java
@@ -31,6 +31,12 @@ import org.apache.tomcat.websocket.BackgroundProcessManager;
*/
public class WsWriteTimeout implements BackgroundProcess {
+ /**
+ * Default constructor.
+ */
+ public WsWriteTimeout() {
+ }
+
/**
* Note: The comparator imposes orderings that are inconsistent with equals
*/
@@ -80,6 +86,11 @@ public class WsWriteTimeout implements BackgroundProcess {
}
+ /**
+ * Registers an endpoint for timeout tracking.
+ *
+ * @param endpoint the endpoint to register
+ */
public void register(WsRemoteEndpointImplServer endpoint) {
boolean result = endpoints.add(endpoint);
if (result) {
@@ -91,6 +102,11 @@ public class WsWriteTimeout implements BackgroundProcess {
}
+ /**
+ * Unregisters an endpoint from timeout tracking.
+ *
+ * @param endpoint the endpoint to unregister
+ */
public void unregister(WsRemoteEndpointImplServer endpoint) {
boolean result = endpoints.remove(endpoint);
if (result) {
diff --git
a/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PoolProperties.java
b/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PoolProperties.java
index da2a71dae5..e7e87a0a94 100644
---
a/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PoolProperties.java
+++
b/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PoolProperties.java
@@ -54,57 +54,109 @@ public class PoolProperties implements PoolConfiguration,
Cloneable, Serializabl
* Counter for tracking the number of pools created.
*/
protected static final AtomicInteger poolCounter = new AtomicInteger(0);
+ /** Database-specific properties. */
private volatile Properties dbProperties = new Properties();
+ /** The JDBC connection URL. */
private volatile String url = null;
+ /** The JDBC driver class name. */
private volatile String driverClassName = null;
+ /** The default auto-commit setting for connections. */
private volatile Boolean defaultAutoCommit = null;
+ /** The default read-only setting for connections. */
private volatile Boolean defaultReadOnly = null;
+ /** The default transaction isolation level. */
private volatile int defaultTransactionIsolation =
DataSourceFactory.UNKNOWN_TRANSACTIONISOLATION;
+ /** The default catalog for connections. */
private volatile String defaultCatalog = null;
+ /** Additional connection properties. */
private volatile String connectionProperties;
+ /** The initial number of connections in the pool. */
private volatile int initialSize = 10;
+ /** The maximum number of active connections. */
private volatile int maxActive = DEFAULT_MAX_ACTIVE;
+ /** The maximum number of idle connections. */
private volatile int maxIdle = maxActive;
+ /** The minimum number of idle connections. */
private volatile int minIdle = initialSize;
+ /** The maximum wait time in milliseconds for a connection. */
private volatile int maxWait = 30000;
+ /** The SQL query used for validation. */
private volatile String validationQuery;
+ /** The validation query timeout in seconds. */
private volatile int validationQueryTimeout = -1;
+ /** The fully qualified class name of the validator. */
private volatile String validatorClassName;
+ /** The validator instance. */
private transient volatile Validator validator;
+ /** Whether to validate connections on borrow. */
private volatile boolean testOnBorrow = false;
+ /** Whether to validate connections on return. */
private volatile boolean testOnReturn = false;
+ /** Whether to validate idle connections. */
private volatile boolean testWhileIdle = false;
+ /** The time between eviction runs in milliseconds. */
private volatile int timeBetweenEvictionRunsMillis = 5000;
+ /** The number of connections to test per eviction run. */
private volatile int numTestsPerEvictionRun;
+ /** The minimum idle time before a connection is eligible for eviction. */
private volatile int minEvictableIdleTimeMillis = 60000;
+ /** Whether to allow access to the underlying connection. */
private volatile boolean accessToUnderlyingConnectionAllowed = true;
+ /** Whether to remove abandoned connections. */
private volatile boolean removeAbandoned = false;
+ /** The timeout in seconds for abandoned connection removal. */
private volatile int removeAbandonedTimeout = 60;
+ /** Whether to log abandoned connections. */
private volatile boolean logAbandoned = false;
+ /** The pool name. */
private volatile String name = "Tomcat Connection
Pool["+(poolCounter.addAndGet(1))+"-"+System.identityHashCode(PoolProperties.class)+"]";
+ /** The database password. */
private volatile String password;
+ /** The database username. */
private volatile String username;
+ /** The validation interval in milliseconds. */
private volatile long validationInterval = 3000;
+ /** Whether JMX registration is enabled. */
private volatile boolean jmxEnabled = true;
+ /** The SQL to execute on connection creation. */
private volatile String initSQL;
+ /** Whether to validate connections on creation. */
private volatile boolean testOnConnect =false;
+ /** The JDBC interceptors configuration. */
private volatile String jdbcInterceptors=null;
+ /** Whether to use a fair queue for connection requests. */
private volatile boolean fairQueue = true;
+ /** Whether to use equals for object comparison. */
private volatile boolean useEquals = true;
+ /** The percentage threshold for abandoning connections. */
private volatile int abandonWhenPercentageFull = 0;
+ /** The maximum age of a connection in milliseconds. */
private volatile long maxAge = 0;
+ /** Whether to use locking for thread safety. */
private volatile boolean useLock = false;
+ /** The interceptor definitions. */
private volatile InterceptorDefinition[] interceptors = null;
+ /** The suspect timeout in seconds. */
private volatile int suspectTimeout = 0;
+ /** The underlying data source. */
private volatile Object dataSource = null;
+ /** The JNDI name of the data source. */
private volatile String dataSourceJNDI = null;
+ /** Whether alternate usernames are allowed. */
private volatile boolean alternateUsernameAllowed = false;
+ /** Whether to commit on connection return. */
private volatile boolean commitOnReturn = false;
+ /** Whether to rollback on connection return. */
private volatile boolean rollbackOnReturn = false;
+ /** Whether to use a disposable connection facade. */
private volatile boolean useDisposableConnectionFacade = true;
+ /** Whether to log validation errors. */
private volatile boolean logValidationErrors = false;
+ /** Whether to propagate interrupt state. */
private volatile boolean propagateInterruptState = false;
+ /** Whether to ignore exceptions during pre-load. */
private volatile boolean ignoreExceptionOnPreLoad = false;
+ /** Whether to use a statement facade. */
private volatile boolean useStatementFacade = true;
@Override
diff --git
a/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/XADataSource.java
b/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/XADataSource.java
index dfd836c440..427368746d 100644
---
a/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/XADataSource.java
+++
b/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/XADataSource.java
@@ -16,6 +16,9 @@
*/
package org.apache.tomcat.jdbc.pool;
+/**
+ * XA-enabled data source for distributed transaction support.
+ */
public class XADataSource extends DataSource implements javax.sql.XADataSource
{
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]