This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new 52fd842d4f Re-apply standard code formatting
52fd842d4f is described below
commit 52fd842d4fd8e90bc6432e843dfc32ea65b29ab6
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Aug 19 09:59:58 2026 +0100
Re-apply standard code formatting
---
.../catalina/authenticator/BasicAuthenticator.java | 8 ++++----
.../apache/catalina/authenticator/Constants.java | 12 +++++------
.../authenticator/DigestAuthenticator.java | 16 +++++++++------
.../catalina/authenticator/SavedRequest.java | 24 +++++++++++++++++++++-
.../catalina/authenticator/SingleSignOn.java | 6 +++---
.../catalina/authenticator/SingleSignOnEntry.java | 8 +++++---
.../authenticator/SingleSignOnSessionKey.java | 2 +-
.../authenticator/jaspic/MessageInfoImpl.java | 5 +++--
.../jaspic/SimpleAuthConfigProvider.java | 7 ++++---
.../jaspic/SimpleServerAuthConfig.java | 9 ++++----
.../jaspic/SimpleServerAuthContext.java | 4 ++--
11 files changed, 66 insertions(+), 35 deletions(-)
diff --git a/java/org/apache/catalina/authenticator/BasicAuthenticator.java
b/java/org/apache/catalina/authenticator/BasicAuthenticator.java
index 4a0c8fcc6f..551be88926 100644
--- a/java/org/apache/catalina/authenticator/BasicAuthenticator.java
+++ b/java/org/apache/catalina/authenticator/BasicAuthenticator.java
@@ -60,10 +60,10 @@ public class BasicAuthenticator extends AuthenticatorBase {
/**
- * Sets the character set used for encoding credentials. Empty charsets
will set
- * ISO-8859-1.
+ * Sets the character set used for encoding credentials. Empty charsets
will set ISO-8859-1.
*
* @param charsetString the character set name
+ *
* @throws IllegalArgumentException if the charset is not supported
*/
public void setCharset(String charsetString) {
@@ -227,8 +227,8 @@ public class BasicAuthenticator extends AuthenticatorBase {
}
/*
- * Extract the mandatory username and password tokens separated by a
colon. Tolerate surplus
- * surrounding white space.
+ * Extract the mandatory username and password tokens separated by a
colon. Tolerate surplus surrounding white
+ * space.
*/
private void parseCredentials(byte[] decoded) throws
IllegalArgumentException {
diff --git a/java/org/apache/catalina/authenticator/Constants.java
b/java/org/apache/catalina/authenticator/Constants.java
index 336baaa099..6d4de72fd5 100644
--- a/java/org/apache/catalina/authenticator/Constants.java
+++ b/java/org/apache/catalina/authenticator/Constants.java
@@ -115,16 +115,16 @@ public class Constants {
/**
- * When the <code>cache</code> property of the authenticator is set to
<code>false</code>, the Principal is not cached.
- * In this case, if the current request is part of a session, the password
used to authenticate this user will be stored
- * under this key so the user can be re-authenticated on subsequent
requests.
+ * When the <code>cache</code> property of the authenticator is set to
<code>false</code>, the Principal is not
+ * cached. In this case, if the current request is part of a session, the
password used to authenticate this user
+ * will be stored under this key so the user can be re-authenticated on
subsequent requests.
*/
public static final String SESS_PASSWORD_NOTE =
"org.apache.catalina.session.PASSWORD";
/**
- * When the <code>cache</code> property of the authenticator is set to
<code>false</code>, the Principal is not cached.
- * In this case, if the current request is part of a session, the username
used to authenticate this user will be stored
- * under this key so the user can be re-authenticated on subsequent
requests.
+ * When the <code>cache</code> property of the authenticator is set to
<code>false</code>, the Principal is not
+ * cached. In this case, if the current request is part of a session, the
username used to authenticate this user
+ * will be stored under this key so the user can be re-authenticated on
subsequent requests.
*/
public static final String SESS_USERNAME_NOTE =
"org.apache.catalina.session.USERNAME";
diff --git a/java/org/apache/catalina/authenticator/DigestAuthenticator.java
b/java/org/apache/catalina/authenticator/DigestAuthenticator.java
index e0de95179b..5cdc448bb3 100644
--- a/java/org/apache/catalina/authenticator/DigestAuthenticator.java
+++ b/java/org/apache/catalina/authenticator/DigestAuthenticator.java
@@ -583,8 +583,9 @@ public class DigestAuthenticator extends AuthenticatorBase {
/**
* Parse the authorization header to extract digest credentials.
*
- * @param request HTTP request
- * @param authorization Authorization header value
+ * @param request HTTP request
+ * @param authorization Authorization header value
+ *
* @return {@code true} if parsing succeeded
*/
public boolean parse(Request request, String authorization) {
@@ -625,8 +626,9 @@ public class DigestAuthenticator extends AuthenticatorBase {
/**
* Validate the parsed digest credentials against the request and
configured algorithms.
*
- * @param request HTTP request
- * @param algorithms Configured authentication algorithms
+ * @param request HTTP request
+ * @param algorithms Configured authentication algorithms
+ *
* @return {@code true} if validation succeeded
*/
public boolean validate(Request request, List<AuthDigest> algorithms) {
@@ -753,6 +755,7 @@ public class DigestAuthenticator extends AuthenticatorBase {
* Authenticate the user against the given realm using the parsed
digest credentials.
*
* @param realm Realm to authenticate against
+ *
* @return Principal if authentication succeeded, {@code null}
otherwise
*/
public Principal authenticate(Realm realm) {
@@ -780,8 +783,8 @@ public class DigestAuthenticator extends AuthenticatorBase {
/**
* Create a new NonceInfo instance.
*
- * @param currentTime Current timestamp
- * @param seenWindowSize Size of the window for tracking seen nonce
counts
+ * @param currentTime Current timestamp
+ * @param seenWindowSize Size of the window for tracking seen nonce
counts
*/
public NonceInfo(long currentTime, int seenWindowSize) {
this.timestamp = currentTime;
@@ -793,6 +796,7 @@ public class DigestAuthenticator extends AuthenticatorBase {
* Validate the nonce count to detect replay attacks.
*
* @param nonceCount Nonce count from the client
+ *
* @return {@code true} if the nonce count is valid
*/
public synchronized boolean nonceCountValid(long nonceCount) {
diff --git a/java/org/apache/catalina/authenticator/SavedRequest.java
b/java/org/apache/catalina/authenticator/SavedRequest.java
index 6d936515e9..719b6c31c1 100644
--- a/java/org/apache/catalina/authenticator/SavedRequest.java
+++ b/java/org/apache/catalina/authenticator/SavedRequest.java
@@ -55,6 +55,7 @@ public final class SavedRequest implements Serializable {
/**
* Adds a cookie to this saved request.
+ *
* @param cookie the cookie to add
*/
public void addCookie(Cookie cookie) {
@@ -63,6 +64,7 @@ public final class SavedRequest implements Serializable {
/**
* Returns an iterator over the cookies saved for this request.
+ *
* @return iterator over the saved cookies
*/
public Iterator<Cookie> getCookies() {
@@ -78,7 +80,8 @@ public final class SavedRequest implements Serializable {
/**
* Adds a header value to this saved request.
- * @param name the header name
+ *
+ * @param name the header name
* @param value the header value
*/
public void addHeader(String name, String value) {
@@ -87,6 +90,7 @@ public final class SavedRequest implements Serializable {
/**
* Returns an iterator over the names of all headers saved for this
request.
+ *
* @return iterator over the header names
*/
public Iterator<String> getHeaderNames() {
@@ -95,7 +99,9 @@ public final class SavedRequest implements Serializable {
/**
* Returns an iterator over the values for the specified header.
+ *
* @param name the header name
+ *
* @return iterator over the header values, or an empty iterator if the
header is not present
*/
public Iterator<String> getHeaderValues(String name) {
@@ -115,6 +121,7 @@ public final class SavedRequest implements Serializable {
/**
* Adds a locale to this saved request.
+ *
* @param locale the locale to add
*/
public void addLocale(Locale locale) {
@@ -123,6 +130,7 @@ public final class SavedRequest implements Serializable {
/**
* Returns an iterator over the locales saved for this request.
+ *
* @return iterator over the saved locales
*/
public Iterator<Locale> getLocales() {
@@ -137,6 +145,7 @@ public final class SavedRequest implements Serializable {
/**
* Returns the HTTP method of the saved request.
+ *
* @return the request method, or {@code null} if not set
*/
public String getMethod() {
@@ -145,6 +154,7 @@ public final class SavedRequest implements Serializable {
/**
* Sets the HTTP method of the saved request.
+ *
* @param method the request method
*/
public void setMethod(String method) {
@@ -159,6 +169,7 @@ public final class SavedRequest implements Serializable {
/**
* Returns the query string of the saved request.
+ *
* @return the query string, or {@code null} if not set
*/
public String getQueryString() {
@@ -167,6 +178,7 @@ public final class SavedRequest implements Serializable {
/**
* Sets the query string of the saved request.
+ *
* @param queryString the query string
*/
public void setQueryString(String queryString) {
@@ -181,6 +193,7 @@ public final class SavedRequest implements Serializable {
/**
* Returns the request URI of the saved request.
+ *
* @return the request URI, or {@code null} if not set
*/
public String getRequestURI() {
@@ -189,6 +202,7 @@ public final class SavedRequest implements Serializable {
/**
* Sets the request URI of the saved request.
+ *
* @param requestURI the request URI
*/
public void setRequestURI(String requestURI) {
@@ -203,6 +217,7 @@ public final class SavedRequest implements Serializable {
/**
* Returns the decoded request URI of the saved request, with path
parameters excluded.
+ *
* @return the decoded request URI, or {@code null} if not set
*/
public String getDecodedRequestURI() {
@@ -211,6 +226,7 @@ public final class SavedRequest implements Serializable {
/**
* Sets the decoded request URI of the saved request.
+ *
* @param decodedRequestURI the decoded request URI
*/
public void setDecodedRequestURI(String decodedRequestURI) {
@@ -225,6 +241,7 @@ public final class SavedRequest implements Serializable {
/**
* Returns the body of the saved request.
+ *
* @return the request body as a {@link ByteChunk}, or {@code null} if not
set
*/
public ByteChunk getBody() {
@@ -233,6 +250,7 @@ public final class SavedRequest implements Serializable {
/**
* Sets the body of the saved request.
+ *
* @param body the request body as a {@link ByteChunk}
*/
public void setBody(ByteChunk body) {
@@ -247,6 +265,7 @@ public final class SavedRequest implements Serializable {
/**
* Returns the content type of the saved request.
+ *
* @return the content type, or {@code null} if not set
*/
public String getContentType() {
@@ -255,6 +274,7 @@ public final class SavedRequest implements Serializable {
/**
* Sets the content type of the saved request.
+ *
* @param contentType the content type
*/
public void setContentType(String contentType) {
@@ -269,6 +289,7 @@ public final class SavedRequest implements Serializable {
/**
* Returns the original max inactive interval for the session.
+ *
* @return the original max inactive interval, or {@code null} if not set
*/
public Integer getOriginalMaxInactiveIntervalOptional() {
@@ -277,6 +298,7 @@ public final class SavedRequest implements Serializable {
/**
* Sets the original max inactive interval for the session.
+ *
* @param originalMaxInactiveInterval the max inactive interval in seconds
*/
public void setOriginalMaxInactiveInterval(int
originalMaxInactiveInterval) {
diff --git a/java/org/apache/catalina/authenticator/SingleSignOn.java
b/java/org/apache/catalina/authenticator/SingleSignOn.java
index 7fec99dae7..65f173dfb5 100644
--- a/java/org/apache/catalina/authenticator/SingleSignOn.java
+++ b/java/org/apache/catalina/authenticator/SingleSignOn.java
@@ -516,7 +516,7 @@ public class SingleSignOn extends ValveBase {
* Populates the request with the authentication data from the SSO entry.
*
* @param request the request to populate
- * @param ssoId the SSO identifier
+ * @param ssoId the SSO identifier
*/
protected void populateRequestFromSsoEntry(Request request, String ssoId) {
SingleSignOnEntry entry = cache.get(ssoId);
@@ -672,8 +672,8 @@ public class SingleSignOn extends ValveBase {
/**
* Handles a session ID change by updating the SSO entry to track the new
session ID.
*
- * @param ssoId the SSO identifier
- * @param session the session with the new ID
+ * @param ssoId the SSO identifier
+ * @param session the session with the new ID
* @param oldSessionId the previous session ID
*/
protected void sessionChangedId(String ssoId, Session session, String
oldSessionId) {
diff --git a/java/org/apache/catalina/authenticator/SingleSignOnEntry.java
b/java/org/apache/catalina/authenticator/SingleSignOnEntry.java
index 5d233ac253..4ce12e27ab 100644
--- a/java/org/apache/catalina/authenticator/SingleSignOnEntry.java
+++ b/java/org/apache/catalina/authenticator/SingleSignOnEntry.java
@@ -59,8 +59,8 @@ public class SingleSignOnEntry implements Serializable {
private transient Principal principal = null;
/**
- * Set of session keys associated with this SSO entry. Backed by
ConcurrentHashMap to take
- * advantage of its thread safety features.
+ * Set of session keys associated with this SSO entry. Backed by
ConcurrentHashMap to take advantage of its thread
+ * safety features.
*/
private final Map<SingleSignOnSessionKey,SingleSignOnSessionKey>
sessionKeys = new ConcurrentHashMap<>();
@@ -208,6 +208,7 @@ 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
*/
@Serial
@@ -225,7 +226,8 @@ 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 IOException if an I/O error occurs
* @throws ClassNotFoundException if the principal class cannot be found
*/
@Serial
diff --git a/java/org/apache/catalina/authenticator/SingleSignOnSessionKey.java
b/java/org/apache/catalina/authenticator/SingleSignOnSessionKey.java
index cf19aa8c7f..2e41d29ce5 100644
--- a/java/org/apache/catalina/authenticator/SingleSignOnSessionKey.java
+++ b/java/org/apache/catalina/authenticator/SingleSignOnSessionKey.java
@@ -60,7 +60,7 @@ public class SingleSignOnSessionKey implements Serializable {
/**
* Creates a session key using the given session context and an explicit
session ID.
*
- * @param session the session from which to extract context and host
information
+ * @param session the session from which to extract context and host
information
* @param sessionId the session ID to use for this key
*/
public SingleSignOnSessionKey(Session session, String sessionId) {
diff --git a/java/org/apache/catalina/authenticator/jaspic/MessageInfoImpl.java
b/java/org/apache/catalina/authenticator/jaspic/MessageInfoImpl.java
index 261cf56689..397307d675 100644
--- a/java/org/apache/catalina/authenticator/jaspic/MessageInfoImpl.java
+++ b/java/org/apache/catalina/authenticator/jaspic/MessageInfoImpl.java
@@ -51,8 +51,9 @@ public class MessageInfoImpl implements MessageInfo {
/**
* Constructor.
- * @param request the request
- * @param response the response
+ *
+ * @param request the request
+ * @param response the response
* @param authMandatory whether auth is mandatory
*/
public MessageInfoImpl(HttpServletRequest request, HttpServletResponse
response, boolean authMandatory) {
diff --git
a/java/org/apache/catalina/authenticator/jaspic/SimpleAuthConfigProvider.java
b/java/org/apache/catalina/authenticator/jaspic/SimpleAuthConfigProvider.java
index 3de3350a98..7a5c7c1b8c 100644
---
a/java/org/apache/catalina/authenticator/jaspic/SimpleAuthConfigProvider.java
+++
b/java/org/apache/catalina/authenticator/jaspic/SimpleAuthConfigProvider.java
@@ -40,7 +40,7 @@ public class SimpleAuthConfigProvider implements
AuthConfigProvider {
* Creates a new SimpleAuthConfigProvider.
*
* @param properties Properties to pass to the ServerAuthConfig
- * @param factory AuthConfigFactory to register this provider with, or
{@code null}
+ * @param factory AuthConfigFactory to register this provider with, or
{@code null}
*/
public SimpleAuthConfigProvider(Map<String,Object> properties,
AuthConfigFactory factory) {
this.properties = properties;
@@ -86,10 +86,11 @@ public class SimpleAuthConfigProvider implements
AuthConfigProvider {
/**
* Creates the ServerAuthConfig. Can be overridden by subclasses to
provide a custom implementation.
*
- * @param layer Message layer
+ * @param layer Message layer
* @param appContext Application context
- * @param handler Callback handler
+ * @param handler Callback handler
* @param properties Configuration properties
+ *
* @return The ServerAuthConfig instance
*/
protected ServerAuthConfig createServerAuthConfig(String layer, String
appContext, CallbackHandler handler,
diff --git
a/java/org/apache/catalina/authenticator/jaspic/SimpleServerAuthConfig.java
b/java/org/apache/catalina/authenticator/jaspic/SimpleServerAuthConfig.java
index 24114fd1f2..6df3994181 100644
--- a/java/org/apache/catalina/authenticator/jaspic/SimpleServerAuthConfig.java
+++ b/java/org/apache/catalina/authenticator/jaspic/SimpleServerAuthConfig.java
@@ -54,9 +54,9 @@ public class SimpleServerAuthConfig implements
ServerAuthConfig {
/**
* Creates a new SimpleServerAuthConfig.
*
- * @param layer Message layer
+ * @param layer Message layer
* @param appContext Application context
- * @param handler Callback handler
+ * @param handler Callback handler
* @param properties Configuration properties
*/
public SimpleServerAuthConfig(String layer, String appContext,
CallbackHandler handler,
@@ -117,8 +117,8 @@ public class SimpleServerAuthConfig implements
ServerAuthConfig {
* {@inheritDoc}
* <p>
* Loads ServerAuthModule instances from properties keyed with
- * {@code org.apache.catalina.authenticator.jaspic.ServerAuthModule.N}
where N is 1-based index.
- * The returned context is cached and reused for subsequent calls.
+ * {@code org.apache.catalina.authenticator.jaspic.ServerAuthModule.N}
where N is 1-based index. The returned
+ * context is cached and reused for subsequent calls.
*/
@Override
public ServerAuthContext getAuthContext(String authContextID, Subject
serviceSubject, Map<String,Object> properties)
@@ -173,6 +173,7 @@ public class SimpleServerAuthConfig implements
ServerAuthConfig {
* Creates the ServerAuthContext. Can be overridden by subclasses to
provide a custom implementation.
*
* @param modules List of ServerAuthModule instances
+ *
* @return The ServerAuthContext instance
*/
protected ServerAuthContext createServerAuthContext(List<ServerAuthModule>
modules) {
diff --git
a/java/org/apache/catalina/authenticator/jaspic/SimpleServerAuthContext.java
b/java/org/apache/catalina/authenticator/jaspic/SimpleServerAuthContext.java
index 4721b5fa71..292f1916b5 100644
--- a/java/org/apache/catalina/authenticator/jaspic/SimpleServerAuthContext.java
+++ b/java/org/apache/catalina/authenticator/jaspic/SimpleServerAuthContext.java
@@ -49,8 +49,8 @@ public class SimpleServerAuthContext implements
ServerAuthContext {
/**
* {@inheritDoc}
* <p>
- * Iterates through the configured modules in order and returns the first
result that is not
- * {@code SEND_FAILURE}. If all modules return {@code SEND_FAILURE},
returns {@code SEND_FAILURE}.
+ * Iterates through the configured modules in order and returns the first
result that is not {@code SEND_FAILURE}.
+ * If all modules return {@code SEND_FAILURE}, returns {@code
SEND_FAILURE}.
*/
@Override
public AuthStatus validateRequest(MessageInfo messageInfo, Subject
clientSubject, Subject serviceSubject)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]