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

markt 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 8ecc672651 Clean-up - formatting. No functional change.
8ecc672651 is described below

commit 8ecc672651e6ccdbff442c08da8c7c280d4ab50b
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Jul 23 10:52:18 2024 +0100

    Clean-up - formatting. No functional change.
---
 java/org/apache/coyote/AbstractProcessor.java | 18 ++++++++++++------
 java/org/apache/coyote/AbstractProtocol.java  |  6 +++---
 java/org/apache/coyote/Adapter.java           | 12 ++++++++----
 java/org/apache/coyote/ProtocolHandler.java   |  3 ++-
 java/org/apache/coyote/Request.java           | 14 +++++++-------
 java/org/apache/coyote/Response.java          |  6 +++---
 6 files changed, 35 insertions(+), 24 deletions(-)

diff --git a/java/org/apache/coyote/AbstractProcessor.java 
b/java/org/apache/coyote/AbstractProcessor.java
index 2e1c1fda3c..e4789cd80e 100644
--- a/java/org/apache/coyote/AbstractProcessor.java
+++ b/java/org/apache/coyote/AbstractProcessor.java
@@ -730,6 +730,7 @@ public abstract class AbstractProcessor extends 
AbstractProcessorLight implement
 
     /**
      * When committing the response, we have to validate the set of headers, 
as well as setup the response filters.
+     *
      * @throws IOException IO exception during commit
      */
     protected abstract void prepareResponse() throws IOException;
@@ -737,6 +738,7 @@ public abstract class AbstractProcessor extends 
AbstractProcessorLight implement
 
     /**
      * Finish the current response.
+     *
      * @throws IOException IO exception during the write
      */
     protected abstract void finishResponse() throws IOException;
@@ -753,6 +755,7 @@ public abstract class AbstractProcessor extends 
AbstractProcessorLight implement
 
     /**
      * Process acknowledgment of the request.
+     *
      * @param continueResponseTiming specifies when an acknowledgment should 
be sent
      */
     protected abstract void ack(ContinueResponseTiming continueResponseTiming);
@@ -763,6 +766,7 @@ public abstract class AbstractProcessor extends 
AbstractProcessorLight implement
 
     /**
      * Callback to write data from the buffer.
+     *
      * @throws IOException IO exception during the write
      */
     protected abstract void flush() throws IOException;
@@ -770,15 +774,17 @@ public abstract class AbstractProcessor extends 
AbstractProcessorLight implement
 
     /**
      * Queries if bytes are available in buffers.
+     *
      * @param doRead {@code true} to perform a read when no bytes are availble
+     *
      * @return the amount of bytes that are known to be available
      */
     protected abstract int available(boolean doRead);
 
 
     /**
-     * Set the specified byte chunk as the request body that will be read. 
This allows saving and
-     * processing requests.
+     * Set the specified byte chunk as the request body that will be read. 
This allows saving and processing requests.
+     *
      * @param body the byte chunk containing all the request bytes
      */
     protected abstract void setRequestBody(ByteChunk body);
@@ -791,8 +797,8 @@ public abstract class AbstractProcessor extends 
AbstractProcessorLight implement
 
 
     /**
-     * Swallowing bytes is required for pipelining requests, so this allows to 
avoid doing extra operations
-     * in case an error occurs and the connection is to be closed instead.
+     * Swallowing bytes is required for pipelining requests, so this allows to 
avoid doing extra operations in case an
+     * error occurs and the connection is to be closed instead.
      */
     protected abstract void disableSwallowRequest();
 
@@ -903,8 +909,8 @@ public abstract class AbstractProcessor extends 
AbstractProcessorLight implement
 
 
     /**
-     * When using non blocking IO, register to get a callback when polling 
determines that bytes
-     * are available for reading.
+     * When using non blocking IO, register to get a callback when polling 
determines that bytes are available for
+     * reading.
      */
     protected abstract void registerReadInterest();
 
diff --git a/java/org/apache/coyote/AbstractProtocol.java 
b/java/org/apache/coyote/AbstractProtocol.java
index 330f0fb829..239152e614 100644
--- a/java/org/apache/coyote/AbstractProtocol.java
+++ b/java/org/apache/coyote/AbstractProtocol.java
@@ -77,7 +77,7 @@ public abstract class AbstractProtocol<S> implements 
ProtocolHandler, MBeanRegis
      * Endpoint that provides low-level network I/O - must be matched to the 
ProtocolHandler implementation
      * (ProtocolHandler using NIO, requires NIO Endpoint etc.).
      */
-    private final AbstractEndpoint<S, ?> endpoint;
+    private final AbstractEndpoint<S,?> endpoint;
 
 
     private Handler<S> handler;
@@ -91,7 +91,7 @@ public abstract class AbstractProtocol<S> implements 
ProtocolHandler, MBeanRegis
     private ScheduledFuture<?> timeoutFuture = null;
     private ScheduledFuture<?> monitorFuture;
 
-    public AbstractProtocol(AbstractEndpoint<S, ?> endpoint) {
+    public AbstractProtocol(AbstractEndpoint<S,?> endpoint) {
         this.endpoint = endpoint;
         ConnectionHandler<S> cHandler = new ConnectionHandler<>(this);
         getEndpoint().setHandler(cHandler);
@@ -491,7 +491,7 @@ public abstract class AbstractProtocol<S> implements 
ProtocolHandler, MBeanRegis
 
     // ----------------------------------------------- Accessors for 
sub-classes
 
-    protected AbstractEndpoint<S, ?> getEndpoint() {
+    protected AbstractEndpoint<S,?> getEndpoint() {
         return endpoint;
     }
 
diff --git a/java/org/apache/coyote/Adapter.java 
b/java/org/apache/coyote/Adapter.java
index 93c7657326..c390e91622 100644
--- a/java/org/apache/coyote/Adapter.java
+++ b/java/org/apache/coyote/Adapter.java
@@ -61,18 +61,22 @@ public interface Adapter {
 
     /**
      * Dispatch asynchronous event.
-     * @param req the request object
-     * @param res the response object
+     *
+     * @param req    the request object
+     * @param res    the response object
      * @param status the event being processed
+     *
      * @return {@code true} if the dispatch was successful
+     *
      * @throws Exception If the processing fails unexpectedly
      */
     boolean asyncDispatch(Request req, Response res, SocketEvent status) 
throws Exception;
 
     /**
      * Callback to allow logging access outside of the execution of the 
regular service.
-     * @param req the request object
-     * @param res the response object
+     *
+     * @param req  the request object
+     * @param res  the response object
      * @param time time taken to process the request/response in milliseconds 
(use 0 if not known)
      */
     void log(Request req, Response res, long time);
diff --git a/java/org/apache/coyote/ProtocolHandler.java 
b/java/org/apache/coyote/ProtocolHandler.java
index 55de6e494f..1a6fc1fa9e 100644
--- a/java/org/apache/coyote/ProtocolHandler.java
+++ b/java/org/apache/coyote/ProtocolHandler.java
@@ -154,7 +154,8 @@ public interface ProtocolHandler {
      *
      * @deprecated This method will be removed in Tomcat 10.1.x onwards
      */
-    @Deprecated boolean isAprRequired();
+    @Deprecated
+    boolean isAprRequired();
 
 
     /**
diff --git a/java/org/apache/coyote/Request.java 
b/java/org/apache/coyote/Request.java
index 72eb5171ff..bb0fedc2c8 100644
--- a/java/org/apache/coyote/Request.java
+++ b/java/org/apache/coyote/Request.java
@@ -99,7 +99,7 @@ public final class Request {
     /**
      * Path parameters
      */
-    private final Map<String, String> pathParameters = new HashMap<>();
+    private final Map<String,String> pathParameters = new HashMap<>();
 
     /**
      * Notes.
@@ -140,7 +140,7 @@ public final class Request {
     private final MessageBytes remoteUser = MessageBytes.newInstance();
     private boolean remoteUserNeedsAuthorization = false;
     private final MessageBytes authType = MessageBytes.newInstance();
-    private final HashMap<String, Object> attributes = new HashMap<>();
+    private final HashMap<String,Object> attributes = new HashMap<>();
 
     private Response response;
     private volatile ActionHook hook;
@@ -279,7 +279,7 @@ public final class Request {
     }
 
 
-    public Map<String, String> getTrailerFields() {
+    public Map<String,String> getTrailerFields() {
         return trailerFields.toMap();
     }
 
@@ -540,7 +540,7 @@ public final class Request {
         attributes.put(name, o);
     }
 
-    public HashMap<String, Object> getAttributes() {
+    public HashMap<String,Object> getAttributes() {
         return attributes;
     }
 
@@ -728,9 +728,9 @@ public final class Request {
         headers.recycle();
         trailerFields.recycle();
         /*
-         *  Trailer fields are limited in size by bytes. The following call 
ensures that any request with a large number
-         *  of small trailer fields doesn't result in a long lasting, large 
array of headers inside the MimeHeader
-         *  instance.
+         * Trailer fields are limited in size by bytes. The following call 
ensures that any request with a large number
+         * of small trailer fields doesn't result in a long lasting, large 
array of headers inside the MimeHeader
+         * instance.
          */
         trailerFields.setLimit(MimeHeaders.DEFAULT_HEADER_SIZE);
         serverNameMB.recycle();
diff --git a/java/org/apache/coyote/Response.java 
b/java/org/apache/coyote/Response.java
index ee5dbeeebc..38559e11fc 100644
--- a/java/org/apache/coyote/Response.java
+++ b/java/org/apache/coyote/Response.java
@@ -81,7 +81,7 @@ public final class Response {
     final MimeHeaders headers = new MimeHeaders();
 
 
-    private Supplier<Map<String, String>> trailerFieldsSupplier = null;
+    private Supplier<Map<String,String>> trailerFieldsSupplier = null;
 
     /**
      * Associated output buffer.
@@ -394,7 +394,7 @@ public final class Response {
     }
 
 
-    public void setTrailerFields(Supplier<Map<String, String>> supplier) {
+    public void setTrailerFields(Supplier<Map<String,String>> supplier) {
         AtomicBoolean trailerFieldsSupported = new AtomicBoolean(false);
         action(ActionCode.IS_TRAILER_FIELDS_SUPPORTED, trailerFieldsSupported);
         if (!trailerFieldsSupported.get()) {
@@ -405,7 +405,7 @@ public final class Response {
     }
 
 
-    public Supplier<Map<String, String>> getTrailerFields() {
+    public Supplier<Map<String,String>> getTrailerFields() {
         return trailerFieldsSupplier;
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to