This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/11.0.x by this push:
     new ae51076506 Remainder of formatting fixes now CI is working
ae51076506 is described below

commit ae510765066abac205f29c6f82a12bf38c943b54
Author: Mark Thomas <[email protected]>
AuthorDate: Fri Nov 21 15:44:59 2025 +0000

    Remainder of formatting fixes now CI is working
---
 java/org/apache/coyote/ajp/Constants.java                         | 8 ++++----
 java/org/apache/jasper/servlet/JspServletWrapper.java             | 3 +--
 java/org/apache/tomcat/buildutil/translate/Utils.java             | 8 ++++----
 java/org/apache/tomcat/util/compat/JreCompat.java                 | 3 ++-
 java/org/apache/tomcat/util/net/SSLHostConfig.java                | 1 +
 java/org/apache/tomcat/util/net/SocketWrapperBase.java            | 2 +-
 java/org/apache/tomcat/util/net/TLSClientHelloExtractor.java      | 4 ++--
 java/org/apache/tomcat/util/net/openssl/ciphers/Group.java        | 5 +++--
 .../apache/tomcat/util/net/openssl/ciphers/SignatureScheme.java   | 5 +++--
 java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java | 6 ++++--
 java/org/apache/tomcat/util/openssl/openssl_h.java                | 3 ++-
 java/org/apache/tomcat/util/openssl/openssl_h_Macros.java         | 4 ++--
 java/org/apache/tomcat/websocket/server/UpgradeUtil.java          | 6 +++---
 13 files changed, 32 insertions(+), 26 deletions(-)

diff --git a/java/org/apache/coyote/ajp/Constants.java 
b/java/org/apache/coyote/ajp/Constants.java
index ca93f3797f..d7de829219 100644
--- a/java/org/apache/coyote/ajp/Constants.java
+++ b/java/org/apache/coyote/ajp/Constants.java
@@ -104,10 +104,10 @@ public final class Constants {
     public static final int MAX_SEND_SIZE = MAX_PACKET_SIZE - SEND_HEAD_LEN;
 
     // Translates integer codes to names of HTTP methods
-    private static final String[] methodTransArray =
-            { Method.OPTIONS, Method.GET, Method.HEAD, Method.POST, 
Method.PUT, Method.DELETE, Method.TRACE, Method.PROPFIND, Method.PROPPATCH, 
Method.MKCOL, Method.COPY,
-                    Method.MOVE, Method.LOCK, Method.UNLOCK, "ACL", "REPORT", 
"VERSION-CONTROL", "CHECKIN", "CHECKOUT", "UNCHECKOUT",
-                    "SEARCH", "MKWORKSPACE", "UPDATE", "LABEL", "MERGE", 
"BASELINE-CONTROL", "MKACTIVITY" };
+    private static final String[] methodTransArray = { Method.OPTIONS, 
Method.GET, Method.HEAD, Method.POST, Method.PUT,
+            Method.DELETE, Method.TRACE, Method.PROPFIND, Method.PROPPATCH, 
Method.MKCOL, Method.COPY, Method.MOVE,
+            Method.LOCK, Method.UNLOCK, "ACL", "REPORT", "VERSION-CONTROL", 
"CHECKIN", "CHECKOUT", "UNCHECKOUT",
+            "SEARCH", "MKWORKSPACE", "UPDATE", "LABEL", "MERGE", 
"BASELINE-CONTROL", "MKACTIVITY" };
 
     /**
      * Converts an AJP coded HTTP method to the method name.
diff --git a/java/org/apache/jasper/servlet/JspServletWrapper.java 
b/java/org/apache/jasper/servlet/JspServletWrapper.java
index a51f5caa55..b80a3b8428 100644
--- a/java/org/apache/jasper/servlet/JspServletWrapper.java
+++ b/java/org/apache/jasper/servlet/JspServletWrapper.java
@@ -517,8 +517,7 @@ public class JspServletWrapper {
         try {
             Throwable realException = ex;
             // Unwrap Servlet exception once
-            if (ex instanceof ServletException servletException
-                    && servletException.getRootCause() != null) {
+            if (ex instanceof ServletException servletException && 
servletException.getRootCause() != null) {
                 realException = servletException.getRootCause();
             }
 
diff --git a/java/org/apache/tomcat/buildutil/translate/Utils.java 
b/java/org/apache/tomcat/buildutil/translate/Utils.java
index 4851d773f7..c93b956934 100644
--- a/java/org/apache/tomcat/buildutil/translate/Utils.java
+++ b/java/org/apache/tomcat/buildutil/translate/Utils.java
@@ -95,10 +95,10 @@ public class Utils {
     /*
      * This is the formatting applied when importing values to Tomcat from POE.
      *
-     * The values have been read from POE's property files (so the input is 
the actual value with none of the
-     * escaping required to represent that value in a property file) and are 
being written back out to individual files
-     * in Tomcat. The padding for blank lines needs to be removed followed by 
the common formatting required to convert
-     * a property value to the representation of that value in a file.
+     * The values have been read from POE's property files (so the input is 
the actual value with none of the escaping
+     * required to represent that value in a property file) and are being 
written back out to individual files in
+     * Tomcat. The padding for blank lines needs to be removed followed by the 
common formatting required to convert a
+     * property value to the representation of that value in a file.
      */
     static String formatValueImport(String in) {
         String result;
diff --git a/java/org/apache/tomcat/util/compat/JreCompat.java 
b/java/org/apache/tomcat/util/compat/JreCompat.java
index 2fc82c7113..ea74c20b8a 100644
--- a/java/org/apache/tomcat/util/compat/JreCompat.java
+++ b/java/org/apache/tomcat/util/compat/JreCompat.java
@@ -357,8 +357,9 @@ public class JreCompat {
 
     /**
      * TLS groups configuration from JSSE API in Java 20.
+     *
      * @param sslParameters the parameters object
-     * @param names the names of the groups to enable
+     * @param names         the names of the groups to enable
      */
     public void setNamedGroupsMethod(Object sslParameters, String[] names) {
         throw new 
UnsupportedOperationException(sm.getString("jreCompat.noNamedGroups"));
diff --git a/java/org/apache/tomcat/util/net/SSLHostConfig.java 
b/java/org/apache/tomcat/util/net/SSLHostConfig.java
index 3f47b1799f..fc4615f829 100644
--- a/java/org/apache/tomcat/util/net/SSLHostConfig.java
+++ b/java/org/apache/tomcat/util/net/SSLHostConfig.java
@@ -537,6 +537,7 @@ public class SSLHostConfig implements Serializable {
 
     /**
      * Set the enabled named groups.
+     *
      * @param groupsString the case sensitive comma separated list of groups
      */
     public void setGroups(String groupsString) {
diff --git a/java/org/apache/tomcat/util/net/SocketWrapperBase.java 
b/java/org/apache/tomcat/util/net/SocketWrapperBase.java
index 214d984356..1b4f2eda8c 100644
--- a/java/org/apache/tomcat/util/net/SocketWrapperBase.java
+++ b/java/org/apache/tomcat/util/net/SocketWrapperBase.java
@@ -1361,7 +1361,7 @@ public abstract class SocketWrapperBase<E> {
                     try {
                         long timeoutExpiry = System.nanoTime() + 
unit.toNanos(timeout);
                         long timeoutMillis = unit.toMillis(timeout);
-                         // Spurious wake-ups are possible. Keep waiting until 
state changes or timeout expires.
+                        // Spurious wake-ups are possible. Keep waiting until 
state changes or timeout expires.
                         while (state.state == CompletionState.PENDING && 
timeoutMillis > 0) {
                             state.wait(unit.toMillis(timeout));
                             timeoutMillis = (timeoutExpiry - 
System.nanoTime()) / 1_000_000;
diff --git a/java/org/apache/tomcat/util/net/TLSClientHelloExtractor.java 
b/java/org/apache/tomcat/util/net/TLSClientHelloExtractor.java
index 767c381e59..3a0bfed0fe 100644
--- a/java/org/apache/tomcat/util/net/TLSClientHelloExtractor.java
+++ b/java/org/apache/tomcat/util/net/TLSClientHelloExtractor.java
@@ -204,8 +204,8 @@ public class TLSClientHelloExtractor {
             if (log.isTraceEnabled()) {
                 log.trace("TLS Client Hello: " + clientRequestedCiphers + " 
Names " + clientRequestedCipherNames +
                         " Protocols " + clientRequestedApplicationProtocols + 
" sniValue " + sniValue +
-                        " clientRequestedProtocols " + 
clientRequestedProtocols + " clientSupportedGroups " + clientSupportedGroups +
-                        " clientSignatureSchemes " + clientSignatureSchemes);
+                        " clientRequestedProtocols " + 
clientRequestedProtocols + " clientSupportedGroups " +
+                        clientSupportedGroups + " clientSignatureSchemes " + 
clientSignatureSchemes);
             }
             // Whatever happens, return the buffer to its original state
             netInBuffer.limit(limit);
diff --git a/java/org/apache/tomcat/util/net/openssl/ciphers/Group.java 
b/java/org/apache/tomcat/util/net/openssl/ciphers/Group.java
index 05fd55a769..2fe0abde19 100644
--- a/java/org/apache/tomcat/util/net/openssl/ciphers/Group.java
+++ b/java/org/apache/tomcat/util/net/openssl/ciphers/Group.java
@@ -21,8 +21,9 @@ import java.util.Map;
 
 /**
  * All the supported named groups for TLS 1.3.
- * @see <a 
href="https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-8";
 >The supported groups
- *          registry</a>
+ *
+ * @see <a 
href="https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-8";
 >The supported
+ *          groups registry</a>
  */
 public enum Group {
 
diff --git 
a/java/org/apache/tomcat/util/net/openssl/ciphers/SignatureScheme.java 
b/java/org/apache/tomcat/util/net/openssl/ciphers/SignatureScheme.java
index e67bcdb21d..9e64672355 100644
--- a/java/org/apache/tomcat/util/net/openssl/ciphers/SignatureScheme.java
+++ b/java/org/apache/tomcat/util/net/openssl/ciphers/SignatureScheme.java
@@ -21,8 +21,9 @@ import java.util.Map;
 
 /**
  * All the signature schemes for TLS 1.3.
- * @see <a 
href="https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-signaturescheme";
 >The signature schemes
- *          registry</a>
+ *
+ * @see <a 
href="https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-signaturescheme";
 >The
+ *          signature schemes registry</a>
  */
 public enum SignatureScheme {
 
diff --git a/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java 
b/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java
index ce5ec1a6c2..e51b73a821 100644
--- a/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java
+++ b/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java
@@ -1174,7 +1174,8 @@ public final class OpenSSLEngine extends SSLEngine 
implements SSLUtil.ProtocolIn
                         X509_STORE_CTX_set_error(x509ctx, 
X509_V_ERR_CERT_REVOKED());
                     } else if (ocspResponse == V_OCSP_CERTSTATUS_UNKNOWN()) {
                         errnum = X509_STORE_CTX_get_error(x509ctx);
-                        if (errnum != X509_V_ERR_UNABLE_TO_GET_CRL() && 
(errnum == X509_V_ERR_APPLICATION_VERIFICATION() || errnum != 0)) {
+                        if (errnum != X509_V_ERR_UNABLE_TO_GET_CRL() &&
+                                (errnum == 
X509_V_ERR_APPLICATION_VERIFICATION() || errnum != 0)) {
                             ok = 0;
                         }
                     }
@@ -1207,7 +1208,8 @@ public final class OpenSSLEngine extends SSLEngine 
implements SSLUtil.ProtocolIn
                         if (openssl_h_Compatibility.OPENSSL && 
!openssl_h_Compatibility.OPENSSL3) {
                             issuer = 
openssl_h_Compatibility.X509_STORE_CTX_get0_current_issuer(x509ctx);
                         } else {
-                            MemorySegment x509IssuerPointer = 
localArena.allocateFrom(ValueLayout.ADDRESS, MemorySegment.NULL);
+                            MemorySegment x509IssuerPointer =
+                                    
localArena.allocateFrom(ValueLayout.ADDRESS, MemorySegment.NULL);
                             int res = 
X509_STORE_CTX_get1_issuer(x509IssuerPointer, x509ctx, x509);
                             if (res > 0) {
                                 issuer = 
x509IssuerPointer.get(ValueLayout.ADDRESS, 0);
diff --git a/java/org/apache/tomcat/util/openssl/openssl_h.java 
b/java/org/apache/tomcat/util/openssl/openssl_h.java
index 44edd4521d..8d29464821 100644
--- a/java/org/apache/tomcat/util/openssl/openssl_h.java
+++ b/java/org/apache/tomcat/util/openssl/openssl_h.java
@@ -3605,7 +3605,8 @@ public class openssl_h {
     }
 
     private static class X509_STORE_CTX_get1_issuer {
-        public static final FunctionDescriptor DESC = 
FunctionDescriptor.of(openssl_h.C_INT, openssl_h.C_POINTER, 
openssl_h.C_POINTER, openssl_h.C_POINTER);
+        public static final FunctionDescriptor DESC =
+                FunctionDescriptor.of(openssl_h.C_INT, openssl_h.C_POINTER, 
openssl_h.C_POINTER, openssl_h.C_POINTER);
 
         public static final MemorySegment ADDR = 
openssl_h.findOrThrow("X509_STORE_CTX_get1_issuer");
 
diff --git a/java/org/apache/tomcat/util/openssl/openssl_h_Macros.java 
b/java/org/apache/tomcat/util/openssl/openssl_h_Macros.java
index 13106c484c..6ed564c676 100644
--- a/java/org/apache/tomcat/util/openssl/openssl_h_Macros.java
+++ b/java/org/apache/tomcat/util/openssl/openssl_h_Macros.java
@@ -448,8 +448,8 @@ public class openssl_h_Macros {
         if (openssl_h_Compatibility.BORINGSSL) {
             class Holder {
                 static final String NAME = "SSL_CTX_set1_groups_list";
-                static final FunctionDescriptor DESC = 
FunctionDescriptor.of(openssl_h.C_LONG, openssl_h.C_POINTER,
-                        openssl_h.C_POINTER);
+                static final FunctionDescriptor DESC =
+                        FunctionDescriptor.of(openssl_h.C_LONG, 
openssl_h.C_POINTER, openssl_h.C_POINTER);
                 static final MethodHandle MH = 
Linker.nativeLinker().downcallHandle(openssl_h.findOrThrow(NAME), DESC);
             }
             var mh$ = Holder.MH;
diff --git a/java/org/apache/tomcat/websocket/server/UpgradeUtil.java 
b/java/org/apache/tomcat/websocket/server/UpgradeUtil.java
index e35a234d4a..84dfb44a0d 100644
--- a/java/org/apache/tomcat/websocket/server/UpgradeUtil.java
+++ b/java/org/apache/tomcat/websocket/server/UpgradeUtil.java
@@ -72,9 +72,9 @@ public class UpgradeUtil {
      */
     public static boolean isWebSocketUpgradeRequest(ServletRequest request, 
ServletResponse response) {
 
-        return ((request instanceof HttpServletRequest) &&
-                (response instanceof HttpServletResponse) && 
headerContainsToken((HttpServletRequest) request,
-                        Constants.UPGRADE_HEADER_NAME, 
Constants.UPGRADE_HEADER_VALUE) &&
+        return ((request instanceof HttpServletRequest) && (response 
instanceof HttpServletResponse) &&
+                headerContainsToken((HttpServletRequest) request, 
Constants.UPGRADE_HEADER_NAME,
+                        Constants.UPGRADE_HEADER_VALUE) &&
                 Method.GET.equals(((HttpServletRequest) request).getMethod()));
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to