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

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


The following commit(s) were added to refs/heads/8.5.x by this push:
     new 5dd2a02  Code cleanup: Add races for clarity.
5dd2a02 is described below

commit 5dd2a02365ae080a315941a17d7352b0f5cec113
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon May 24 16:41:35 2021 +0100

    Code cleanup: Add races for clarity.
    
    Small fix to test CI
---
 java/javax/servlet/http/HttpUtils.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/java/javax/servlet/http/HttpUtils.java 
b/java/javax/servlet/http/HttpUtils.java
index 22b089f..405ab83 100644
--- a/java/javax/servlet/http/HttpUtils.java
+++ b/java/javax/servlet/http/HttpUtils.java
@@ -159,8 +159,9 @@ public class HttpUtils {
         // should a length of 0 be an IllegalArgumentException
 
         // cheap hack to return an empty hash
-        if (len <=0)
+        if (len <= 0) {
             return new Hashtable<>();
+        }
 
         if (in == null) {
             throw new IllegalArgumentException();
@@ -221,8 +222,9 @@ public class HttpUtils {
                 } catch (StringIndexOutOfBoundsException e) {
                     String rest  = s.substring(i);
                     sb.append(rest);
-                    if (rest.length()==2)
+                    if (rest.length() == 2) {
                         i++;
+                    }
                 }
 
                 break;

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

Reply via email to