ChristopherSchultz opened a new pull request, #707: URL: https://github.com/apache/tomcat/pull/707
There was repeated code in various places in the source tree to spit simple comma-separated strings using the regular expression pattern `\s*,\s*`. This PR gathers those together into a single utility method and re-implements that method without using a regular expression which improves performance. Given that this method is often used on request headers, the aggregate performance improvement over many requests is measurable especially for long strings, strings with many components, etc. Implementation note: there is a subtle change to the behavior of this utility method relative to the original: this _new_ method results in the first and last strings being "trimmed" of whitespace while the _old_ implementation would have preserved leading whitespace in the first string value returned and trailing whitespace in the last string returned. Reviewing the uses of this method, I do not believe this will have any negative effects on the operation of Tomcat. -- 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: dev-unsubscr...@tomcat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org