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 3dfde1c  Improve Javadoc as suggested by schultz
3dfde1c is described below

commit 3dfde1ce7e0c3a29786dcfdc1e82ae8130d1a656
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Jan 11 10:43:28 2022 +0000

    Improve Javadoc as suggested by schultz
---
 java/org/apache/tomcat/util/http/parser/HttpParser.java | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/util/http/parser/HttpParser.java 
b/java/org/apache/tomcat/util/http/parser/HttpParser.java
index 37dcc55..5d70f61 100644
--- a/java/org/apache/tomcat/util/http/parser/HttpParser.java
+++ b/java/org/apache/tomcat/util/http/parser/HttpParser.java
@@ -257,8 +257,20 @@ public class HttpParser {
     }
 
 
+    /**
+     * Is the provided String a token as per RFC 7230?
+     * <br>
+     * Note: token = 1 * tchar (RFC 7230)
+     * <br>
+     * Since a token requires at least 1 tchar, {@code null} and the empty
+     * string ({@code ""}) are not considered to be valid tokens.
+     *
+     * @param s The string to test
+     *
+     * @return {@code true} if the string is a valid token, otherwise
+     *         {@code false}
+     */
     public static boolean isToken(String s) {
-        // token = 1 * tchar (RFC 7230)
         if (s == null) {
             return false;
         }

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

Reply via email to