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

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

commit ee5bfc7f39a5a68d1bc9ad76dabbcaa4008d1316
Author: Mark Thomas <[email protected]>
AuthorDate: Tue Jul 23 10:51:53 2024 +0100

    Clean-up - formatting. No functional change.
---
 java/org/apache/coyote/AbstractProcessor.java      | 18 ++++++++++++------
 java/org/apache/coyote/AbstractProcessorLight.java |  1 +
 java/org/apache/coyote/AbstractProtocol.java       |  6 +++---
 java/org/apache/coyote/Adapter.java                | 12 ++++++++----
 java/org/apache/coyote/Request.java                | 14 +++++++-------
 java/org/apache/coyote/Response.java               |  6 +++---
 6 files changed, 34 insertions(+), 23 deletions(-)

diff --git a/java/org/apache/coyote/AbstractProcessor.java 
b/java/org/apache/coyote/AbstractProcessor.java
index 30e4e12bd5..924ab20375 100644
--- a/java/org/apache/coyote/AbstractProcessor.java
+++ b/java/org/apache/coyote/AbstractProcessor.java
@@ -723,6 +723,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;
@@ -730,6 +731,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;
@@ -737,6 +739,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);
@@ -747,6 +750,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;
@@ -754,15 +758,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);
@@ -775,8 +781,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();
 
@@ -889,8 +895,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/AbstractProcessorLight.java 
b/java/org/apache/coyote/AbstractProcessorLight.java
index 4a371c1f53..85b6944245 100644
--- a/java/org/apache/coyote/AbstractProcessorLight.java
+++ b/java/org/apache/coyote/AbstractProcessorLight.java
@@ -189,6 +189,7 @@ public abstract class AbstractProcessorLight implements 
Processor {
      * Calls the post process of the async state machine.
      *
      * @return The state the caller should put the socket in when this method 
returns
+     *
      * @throws IOException If an I/O error occurs during the processing of the 
request
      */
     protected abstract SocketState asyncPostProcess() throws IOException;
diff --git a/java/org/apache/coyote/AbstractProtocol.java 
b/java/org/apache/coyote/AbstractProtocol.java
index a194b6e145..be928ed3d5 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);
@@ -461,7 +461,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/Request.java 
b/java/org/apache/coyote/Request.java
index bf948b09a6..a88548c942 100644
--- a/java/org/apache/coyote/Request.java
+++ b/java/org/apache/coyote/Request.java
@@ -115,7 +115,7 @@ public final class Request {
     /**
      * Path parameters
      */
-    private final Map<String, String> pathParameters = new HashMap<>();
+    private final Map<String,String> pathParameters = new HashMap<>();
 
     /**
      * Notes.
@@ -153,7 +153,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;
@@ -292,7 +292,7 @@ public final class Request {
     }
 
 
-    public Map<String, String> getTrailerFields() {
+    public Map<String,String> getTrailerFields() {
         return trailerFields.toMap();
     }
 
@@ -577,7 +577,7 @@ public final class Request {
         attributes.put(name, o);
     }
 
-    public HashMap<String, Object> getAttributes() {
+    public HashMap<String,Object> getAttributes() {
         return attributes;
     }
 
@@ -789,9 +789,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 cdc15a854e..358765c27d 100644
--- a/java/org/apache/coyote/Response.java
+++ b/java/org/apache/coyote/Response.java
@@ -82,7 +82,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.
@@ -399,7 +399,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()) {
@@ -410,7 +410,7 @@ public final class Response {
     }
 
 
-    public Supplier<Map<String, String>> getTrailerFields() {
+    public Supplier<Map<String,String>> getTrailerFields() {
         return trailerFieldsSupplier;
     }
 


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

Reply via email to