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

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


The following commit(s) were added to refs/heads/10.1.x by this push:
     new 1e1ba0189d Clean-up - formatting. No functional change.
1e1ba0189d is described below

commit 1e1ba0189d40ce20a13933c30dd84dd657aba886
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Jul 23 10:52:10 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/Request.java           | 14 +++++++-------
 java/org/apache/coyote/Response.java          |  6 +++---
 5 files changed, 33 insertions(+), 23 deletions(-)

diff --git a/java/org/apache/coyote/AbstractProcessor.java 
b/java/org/apache/coyote/AbstractProcessor.java
index 8a731014bd..6e750dbbba 100644
--- a/java/org/apache/coyote/AbstractProcessor.java
+++ b/java/org/apache/coyote/AbstractProcessor.java
@@ -731,6 +731,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;
@@ -738,6 +739,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;
@@ -745,6 +747,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);
@@ -755,6 +758,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;
@@ -762,15 +766,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);
@@ -783,8 +789,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();
 
@@ -895,8 +901,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 e79698a3e6..662b3fdfb6 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 f455585d52..e2251f3926 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.
@@ -156,7 +156,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;
@@ -295,7 +295,7 @@ public final class Request {
     }
 
 
-    public Map<String, String> getTrailerFields() {
+    public Map<String,String> getTrailerFields() {
         return trailerFields.toMap();
     }
 
@@ -556,7 +556,7 @@ public final class Request {
         attributes.put(name, o);
     }
 
-    public HashMap<String, Object> getAttributes() {
+    public HashMap<String,Object> getAttributes() {
         return attributes;
     }
 
@@ -776,9 +776,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 01815ce936..afa0841554 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.
@@ -404,7 +404,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()) {
@@ -415,7 +415,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