You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2021/06/03 15:53:00 UTC

[tomcat] branch 10.0.x updated: Clean-up. Fix indents.

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

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


The following commit(s) were added to refs/heads/10.0.x by this push:
     new 718b0ea  Clean-up. Fix indents.
718b0ea is described below

commit 718b0eaecd17e2bafd24fcca03180b5cd126c20b
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Jun 3 16:52:16 2021 +0100

    Clean-up. Fix indents.
---
 java/jakarta/servlet/http/HttpServlet.java | 26 +++++++++-----------------
 1 file changed, 9 insertions(+), 17 deletions(-)

diff --git a/java/jakarta/servlet/http/HttpServlet.java b/java/jakarta/servlet/http/HttpServlet.java
index 15ad35c..9c001b6 100644
--- a/java/jakarta/servlet/http/HttpServlet.java
+++ b/java/jakarta/servlet/http/HttpServlet.java
@@ -87,10 +87,8 @@ public abstract class HttpServlet extends GenericServlet {
     private static final String HEADER_IFMODSINCE = "If-Modified-Since";
     private static final String HEADER_LASTMOD = "Last-Modified";
 
-    private static final String LSTRING_FILE =
-        "jakarta.servlet.http.LocalStrings";
-    private static final ResourceBundle lStrings =
-        ResourceBundle.getBundle(LSTRING_FILE);
+    private static final String LSTRING_FILE = "jakarta.servlet.http.LocalStrings";
+    private static final ResourceBundle lStrings = ResourceBundle.getBundle(LSTRING_FILE);
 
     private final Object cachedAllowHeaderValueLock = new Object();
     private volatile String cachedAllowHeaderValue = null;
@@ -509,13 +507,9 @@ public abstract class HttpServlet extends GenericServlet {
         Method[] thisMethods = c.getDeclaredMethods();
 
         if ((parentMethods != null) && (parentMethods.length > 0)) {
-            Method[] allMethods =
-                new Method[parentMethods.length + thisMethods.length];
-            System.arraycopy(parentMethods, 0, allMethods, 0,
-                             parentMethods.length);
-            System.arraycopy(thisMethods, 0, allMethods, parentMethods.length,
-                             thisMethods.length);
-
+            Method[] allMethods = new Method[parentMethods.length + thisMethods.length];
+            System.arraycopy(parentMethods, 0, allMethods, 0, parentMethods.length);
+            System.arraycopy(thisMethods, 0, allMethods, parentMethods.length, thisMethods.length);
             thisMethods = allMethods;
         }
 
@@ -602,8 +596,8 @@ public abstract class HttpServlet extends GenericServlet {
         int responseLength;
 
         String CRLF = "\r\n";
-        StringBuilder buffer = new StringBuilder("TRACE ").append(req.getRequestURI())
-            .append(" ").append(req.getProtocol());
+        StringBuilder buffer =
+                new StringBuilder("TRACE ").append(req.getRequestURI()).append(" ").append(req.getProtocol());
 
         Enumeration<String> reqHeaderEnum = req.getHeaderNames();
 
@@ -908,10 +902,8 @@ class NoBodyResponse extends HttpServletResponseWrapper {
 // file private
 class NoBodyOutputStream extends ServletOutputStream {
 
-    private static final String LSTRING_FILE =
-        "jakarta.servlet.http.LocalStrings";
-    private static final ResourceBundle lStrings =
-        ResourceBundle.getBundle(LSTRING_FILE);
+    private static final String LSTRING_FILE = "jakarta.servlet.http.LocalStrings";
+    private static final ResourceBundle lStrings = ResourceBundle.getBundle(LSTRING_FILE);
 
     private final HttpServletResponse response;
     private boolean flushed = false;

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