This is an automated email from the ASF dual-hosted git repository.
markt-asf 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 e0718f4e3e Re-apply standard code formatting
e0718f4e3e is described below
commit e0718f4e3eeed04cc4c0e34bee4460e7aa565edc
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Aug 19 10:01:14 2026 +0100
Re-apply standard code formatting
---
.../catalina/authenticator/BasicAuthenticator.java | 4 ++--
.../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, 64 insertions(+), 33 deletions(-)
diff --git a/java/org/apache/catalina/authenticator/BasicAuthenticator.java
b/java/org/apache/catalina/authenticator/BasicAuthenticator.java
index c5d2074f40..1079bde960 100644
--- a/java/org/apache/catalina/authenticator/BasicAuthenticator.java
+++ b/java/org/apache/catalina/authenticator/BasicAuthenticator.java
@@ -61,10 +61,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) {
diff --git a/java/org/apache/catalina/authenticator/Constants.java
b/java/org/apache/catalina/authenticator/Constants.java
index f736b4181d..901f5b140e 100644
--- a/java/org/apache/catalina/authenticator/Constants.java
+++ b/java/org/apache/catalina/authenticator/Constants.java
@@ -104,16 +104,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 69aafc239f..7890dffbb2 100644
--- a/java/org/apache/catalina/authenticator/DigestAuthenticator.java
+++ b/java/org/apache/catalina/authenticator/DigestAuthenticator.java
@@ -617,8 +617,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) {
@@ -665,8 +666,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) {
@@ -793,6 +795,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) {
@@ -820,8 +823,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;
@@ -833,6 +836,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 e062893778..d07854f4b5 100644
--- a/java/org/apache/catalina/authenticator/SavedRequest.java
+++ b/java/org/apache/catalina/authenticator/SavedRequest.java
@@ -53,6 +53,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) {
@@ -61,6 +62,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() {
@@ -76,7 +78,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) {
@@ -85,6 +88,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() {
@@ -93,7 +97,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) {
@@ -113,6 +119,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) {
@@ -121,6 +128,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() {
@@ -135,6 +143,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() {
@@ -143,6 +152,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) {
@@ -157,6 +167,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() {
@@ -165,6 +176,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) {
@@ -179,6 +191,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() {
@@ -187,6 +200,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) {
@@ -201,6 +215,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() {
@@ -209,6 +224,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) {
@@ -223,6 +239,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() {
@@ -231,6 +248,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) {
@@ -245,6 +263,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() {
@@ -253,6 +272,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) {
@@ -267,6 +287,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() {
@@ -288,6 +309,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 cceb157425..fa683c154d 100644
--- a/java/org/apache/catalina/authenticator/SingleSignOn.java
+++ b/java/org/apache/catalina/authenticator/SingleSignOn.java
@@ -512,7 +512,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);
@@ -668,8 +668,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 97bd08f65d..09d6a6a3c1 100644
--- a/java/org/apache/catalina/authenticator/SingleSignOnEntry.java
+++ b/java/org/apache/catalina/authenticator/SingleSignOnEntry.java
@@ -57,8 +57,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<>();
@@ -206,6 +206,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
*/
private void writeObject(ObjectOutputStream out) throws IOException {
@@ -222,7 +223,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
*/
private void readObject(ObjectInputStream in) throws IOException,
ClassNotFoundException {
diff --git a/java/org/apache/catalina/authenticator/SingleSignOnSessionKey.java
b/java/org/apache/catalina/authenticator/SingleSignOnSessionKey.java
index 87328eccbd..e91ad13ccd 100644
--- a/java/org/apache/catalina/authenticator/SingleSignOnSessionKey.java
+++ b/java/org/apache/catalina/authenticator/SingleSignOnSessionKey.java
@@ -58,7 +58,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 5afde5c670..8c49352842 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 cf1912179b..61034daa9b 100644
---
a/java/org/apache/catalina/authenticator/jaspic/SimpleAuthConfigProvider.java
+++
b/java/org/apache/catalina/authenticator/jaspic/SimpleAuthConfigProvider.java
@@ -39,7 +39,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,String> properties,
AuthConfigFactory factory) {
this.properties = properties;
@@ -85,10 +85,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 2c4954cd36..3f77023606 100644
--- a/java/org/apache/catalina/authenticator/jaspic/SimpleServerAuthConfig.java
+++ b/java/org/apache/catalina/authenticator/jaspic/SimpleServerAuthConfig.java
@@ -53,9 +53,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,
@@ -116,8 +116,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.
*/
@SuppressWarnings({ "rawtypes", "unchecked" }) // JASPIC API uses raw types
@Override
@@ -175,6 +175,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 a496d75749..aef6a242f5 100644
--- a/java/org/apache/catalina/authenticator/jaspic/SimpleServerAuthContext.java
+++ b/java/org/apache/catalina/authenticator/jaspic/SimpleServerAuthContext.java
@@ -48,8 +48,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
@SuppressWarnings("unchecked") // JASPIC API uses raw types
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]