[ 
https://issues.apache.org/jira/browse/CXF-7923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16712764#comment-16712764
 ] 

ASF GitHub Bot commented on CXF-7923:
-------------------------------------

coheigea commented on a change in pull request #481: CXF-7923 String.split via 
fastpath instead of precompiled Pattern
URL: https://github.com/apache/cxf/pull/481#discussion_r239787757
 
 

 ##########
 File path: 
rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/HttpHeadersImpl.java
 ##########
 @@ -254,10 +257,15 @@ public MediaType getMediaType() {
         return getHeaderValues(headerName, originalValue, DEFAULT_SEPARATOR);
     }
 
-    private List<String> getHeaderValues(String headerName, String 
originalValue, String sep) {
+    private static List<String> getHeaderValues(String headerName, String 
originalValue, String sep) {
         if (!originalValue.contains(QUOTE)
             || HEADERS_WITH_POSSIBLE_QUOTES.contains(headerName)) {
-            String[] ls = StringUtils.split(originalValue, sep);
+            final String[] ls; 
+            if (COOKIE_SEPARATOR_CRLF_EXPRESSION != sep) {
+                ls = originalValue.split(sep);
+            } else {
+                ls = COOKIE_SEPARATOR_CRLF_PATTERN.split(originalValue);
+            }
 
 Review comment:
   Oh yeah sorry, I didn't spot the length of the custom value

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> String.split via fastpath instead of precompiled Pattern
> --------------------------------------------------------
>
>                 Key: CXF-7923
>                 URL: https://issues.apache.org/jira/browse/CXF-7923
>             Project: CXF
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 3.2.7
>            Reporter: Alexey Markevich
>            Assignee: Alexey Markevich
>            Priority: Major
>             Fix For: 3.3.0
>
>
> Initial PR https://github.com/apache/cxf/pull/479



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to