sabberworm commented on code in PR #1054:
URL: https://github.com/apache/tomcat/pull/1054#discussion_r3870948522


##########
java/org/apache/tomcat/util/http/FastHttpDateFormat.java:
##########
@@ -147,7 +158,7 @@ public static long parseDate(String value) {
         long date = -1;
         for (int i = 0; (date == -1) && (i < httpParseFormats.length); i++) {
             try {
-                date = httpParseFormats[i].parse(value).getTime();
+                date = httpParseFormats[i].tryParseDate(value);
                 updateParseCache(value, Long.valueOf(date));

Review Comment:
   Is this missing a 
   ```suggestion
                   updateParseCache(value, Long.valueOf(date));
                   break;
   ```
   ?
   
   To me it doesn’t look like any string can ever match more than one format so 
we’re needlessly trying all of them.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to