cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1424526 - in /cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs: blueprint/ ext/multipart/ impl/ security/ servlet/ spring/ utils/
Date Thu, 20 Dec 2012 15:23:58 GMT
Author: dkulp
Date: Thu Dec 20 15:23:57 2012
New Revision: 1424526

URL: http://svn.apache.org/viewvc?rev=1424526&view=rev
Log:
Bunch more compiled pattern usage in jaxrs

Modified:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/blueprint/JAXRSServerFactoryBeanDefinitionParser.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/ContentDisposition.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/CacheControlHeaderProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/CookieHeaderProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/HttpHeadersImpl.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/LinkHeaderProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/NewCookieHeaderProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestImpl.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/security/JAASAuthenticationFilter.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/security/KerberosAuthenticationFilter.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/JAXRSServerFactoryBeanDefinitionParser.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/FormUtils.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/HttpUtils.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/blueprint/JAXRSServerFactoryBeanDefinitionParser.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/blueprint/JAXRSServerFactoryBeanDefinitionParser.java?rev=1424526&r1=1424525&r2=1424526&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/blueprint/JAXRSServerFactoryBeanDefinitionParser.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/blueprint/JAXRSServerFactoryBeanDefinitionParser.java
Thu Dec 20 15:23:57 2012
@@ -29,6 +29,7 @@ import org.apache.aries.blueprint.Parser
 import org.apache.aries.blueprint.mutable.MutableBeanMetadata;
 import org.apache.aries.blueprint.mutable.MutableCollectionMetadata;
 import org.apache.aries.blueprint.mutable.MutablePassThroughMetadata;
+import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.configuration.blueprint.SimpleBPBeanDefinitionParser;
 import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;
 import org.apache.cxf.jaxrs.model.UserResource;
@@ -47,7 +48,7 @@ public class JAXRSServerFactoryBeanDefin
                                 Element e, String name, 
                                 String val, ParserContext context) {
         if ("beanNames".equals(name)) {
-            String[] values = val.split(" ");
+            String[] values = StringUtils.split(val, " ");
             MutableCollectionMetadata tempFactories = context.createMetadata(MutableCollectionMetadata.class);
             for (String v : values) {
                 String theValue = v.trim();

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/ContentDisposition.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/ContentDisposition.java?rev=1424526&r1=1424525&r2=1424526&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/ContentDisposition.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/multipart/ContentDisposition.java
Thu Dec 20 15:23:57 2012
@@ -24,12 +24,14 @@ import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.cxf.common.util.StringUtils;
+
 public class ContentDisposition {
 
     private List<String> values;
     
     public ContentDisposition(String value) {
-        values = Arrays.asList(value.split(";"));
+        values = Arrays.asList(StringUtils.split(value, ";"));
     }
     
     public String getType() {
@@ -40,7 +42,7 @@ public class ContentDisposition {
         for (int i = 1; i < values.size(); i++) {
             String v = values.get(i).trim();
             if (v.startsWith(name)) {
-                String[] parts = v.split("=");
+                String[] parts = StringUtils.split(v, "=");
                 return parts.length == 2 ? parts[1].trim().replace("\"", "").replace("'",
"") : ""; 
             }
         }
@@ -50,7 +52,7 @@ public class ContentDisposition {
     public Map<String, String> getParameters() {
         Map<String, String> map = new LinkedHashMap<String, String>();
         for (int i = 1; i < values.size(); i++) {
-            String[] parts = values.get(i).split("=");
+            String[] parts = StringUtils.split(values.get(i), "=");
             map.put(parts[0].trim(), parts.length == 2 
                     ? parts[1].trim().replace("\"", "").replace("'", "") : ""); 
         }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/CacheControlHeaderProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/CacheControlHeaderProvider.java?rev=1424526&r1=1424525&r2=1424526&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/CacheControlHeaderProvider.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/CacheControlHeaderProvider.java
Thu Dec 20 15:23:57 2012
@@ -30,6 +30,7 @@ import java.util.regex.Pattern;
 import javax.ws.rs.core.CacheControl;
 import javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate;
 
+import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.phase.PhaseInterceptorChain;
 
@@ -91,7 +92,7 @@ public class CacheControlHeaderProvider 
                 noCache = true;
                 addFields(noCacheFields, token);
             } else {
-                String[] extPair = token.split("=");
+                String[] extPair = StringUtils.split(token, "=");
                 String value = extPair.length == 2 ? extPair[1] : "";
                 extensions.put(extPair[0], value);
             }
@@ -126,7 +127,7 @@ public class CacheControlHeaderProvider 
             return values.toArray(new String[values.size()]);
         } else {
             String separator = getSeparator();
-            return c.split(separator);
+            return StringUtils.split(c, separator);
         }
     }
     
@@ -189,7 +190,7 @@ public class CacheControlHeaderProvider 
             } else {
                 f = f.length() == 2 ? "" : f.substring(1, f.length() - 1);
                 if (f.length() > 0) {
-                    String[] values = f.split(",");
+                    String[] values = StringUtils.split(f, ",");
                     for (String v : values) {
                         fields.add(v.trim());
                     }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/CookieHeaderProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/CookieHeaderProvider.java?rev=1424526&r1=1424525&r2=1424526&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/CookieHeaderProvider.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/CookieHeaderProvider.java
Thu Dec 20 15:23:57 2012
@@ -21,6 +21,8 @@ package org.apache.cxf.jaxrs.impl;
 import javax.ws.rs.core.Cookie;
 import javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate;
 
+import org.apache.cxf.common.util.StringUtils;
+
 public class CookieHeaderProvider implements HeaderDelegate<Cookie> {
 
     private static final String VERSION = "$Version";
@@ -42,7 +44,7 @@ public class CookieHeaderProvider implem
         String domain = null;
         
         // ignore the fact the possible version may be seperated by ','
-        String[] tokens = c.split(";");
+        String[] tokens = StringUtils.split(c, ";");
         for (String token : tokens) {
             String theToken = token.trim();
             if (theToken.startsWith(VERSION)) {

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/HttpHeadersImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/HttpHeadersImpl.java?rev=1424526&r1=1424525&r2=1424526&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/HttpHeadersImpl.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/HttpHeadersImpl.java
Thu Dec 20 15:23:57 2012
@@ -147,13 +147,13 @@ public class HttpHeadersImpl implements 
         List<Locale> newLs = new ArrayList<Locale>(); 
         Map<Locale, Float> prefs = new HashMap<Locale, Float>();
         for (String l : ls) {
-            String[] pair = l.split(";");
+            String[] pair = StringUtils.split(l, ";");
             
             Locale locale = HttpUtils.getLocale(pair[0].trim());
             
             newLs.add(locale);
             if (pair.length > 1) {
-                String[] pair2 = pair[1].split("=");
+                String[] pair2 = StringUtils.split(pair[1], "=");
                 if (pair2.length > 1) {
                     prefs.put(locale, JAXRSUtils.getMediaTypeQualityFactor(pair2[1].trim()));
                 } else {
@@ -209,7 +209,7 @@ public class HttpHeadersImpl implements 
     private List<String> getHeaderValues(String headerName, String originalValue, String
sep) {
         if (!originalValue.contains(QUOTE)
             || HEADERS_WITH_POSSIBLE_QUOTES.contains(headerName)) {
-            String[] ls = originalValue.split(sep);
+            String[] ls = StringUtils.split(originalValue, sep);
             if (ls.length == 1) {
                 return Collections.singletonList(ls[0].trim());
             } else {

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/LinkHeaderProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/LinkHeaderProvider.java?rev=1424526&r1=1424525&r2=1424526&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/LinkHeaderProvider.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/LinkHeaderProvider.java
Thu Dec 20 15:23:57 2012
@@ -54,7 +54,7 @@ public class LinkHeaderProvider implemen
         builder.uri(value.substring(1, closeIndex).trim());
         if (closeIndex < value.length() - 1) {
             
-            String[] tokens = value.substring(closeIndex + 1).split(";");
+            String[] tokens = StringUtils.split(value.substring(closeIndex + 1), ";");
             for (String token : tokens) {
                 String theToken = token.trim();
                 if (theToken.isEmpty()) {
@@ -68,7 +68,7 @@ public class LinkHeaderProvider implemen
                     paramValue = i == theToken.length() - 1 ? "" : theToken.substring(i +
1).trim();
                 }
                 if (REL.equals(paramName)) {
-                    String[] rels = removeQuotesIfNeeded(paramValue).split(",");
+                    String[] rels = StringUtils.split(removeQuotesIfNeeded(paramValue), ",");
                     for (String rel : rels) {
                         builder.rel(rel.trim());
                     }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/NewCookieHeaderProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/NewCookieHeaderProvider.java?rev=1424526&r1=1424525&r2=1424526&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/NewCookieHeaderProvider.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/NewCookieHeaderProvider.java
Thu Dec 20 15:23:57 2012
@@ -22,6 +22,8 @@ package org.apache.cxf.jaxrs.impl;
 import javax.ws.rs.core.NewCookie;
 import javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate;
 
+import org.apache.cxf.common.util.StringUtils;
+
 public class NewCookieHeaderProvider implements HeaderDelegate<NewCookie> {
 
     private static final String VERSION = "Version";
@@ -46,7 +48,7 @@ public class NewCookieHeaderProvider imp
         int maxAge = -1;
         boolean isSecure = false;
         
-        String[] tokens = c.split(";");
+        String[] tokens = StringUtils.split(c, ";");
         for (String token : tokens) {
             String theToken = token.trim();
             if (theToken.startsWith(VERSION)) {

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestImpl.java?rev=1424526&r1=1424525&r2=1424526&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestImpl.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestImpl.java Thu
Dec 20 15:23:57 2012
@@ -106,9 +106,9 @@ public class RequestImpl implements Requ
             return Collections.emptyList();
         }
         List<String> list = new LinkedList<String>();
-        String[] values = acceptEnc.split(",");
+        String[] values = StringUtils.split(acceptEnc, ",");
         for (String value : values) {
-            String[] pair = value.trim().split(";");
+            String[] pair = StringUtils.split(value.trim(), ";");
             // ignore encoding qualifiers if any for now
             list.add(pair[0]);
         }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java?rev=1424526&r1=1424525&r2=1424526&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java
Thu Dec 20 15:23:57 2012
@@ -39,6 +39,7 @@ import javax.ws.rs.core.PathSegment;
 import javax.ws.rs.core.UriBuilder;
 import javax.ws.rs.core.UriBuilderException;
 
+import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.jaxrs.model.URITemplate;
 import org.apache.cxf.jaxrs.utils.HttpUtils;
 import org.apache.cxf.jaxrs.utils.JAXRSUtils;
@@ -380,7 +381,7 @@ public class UriBuilderImpl extends UriB
                 // contain template vars - technically this can be covered by checking where
a given template
                 // var is coming from and act accordingly. Confusing nonetheless.
                 StringBuilder buf = new StringBuilder();
-                String[] values = theValue.split("/");
+                String[] values = StringUtils.split(theValue, "/");
                 for (int i = 0; i < values.length; i++) {
                     buf.append(HttpUtils.encodePartiallyEncoded(values[i], false));
                     if (i + 1 < values.length) {

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/security/JAASAuthenticationFilter.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/security/JAASAuthenticationFilter.java?rev=1424526&r1=1424525&r2=1424526&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/security/JAASAuthenticationFilter.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/security/JAASAuthenticationFilter.java
Thu Dec 20 15:23:57 2012
@@ -30,6 +30,7 @@ import javax.ws.rs.core.Response;
 import javax.ws.rs.core.Response.ResponseBuilder;
 import javax.ws.rs.core.UriBuilder;
 
+import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.interceptor.security.AuthenticationException;
 import org.apache.cxf.interceptor.security.JAASLoginInterceptor;
 import org.apache.cxf.interceptor.security.NamePasswordCallbackHandler;
@@ -126,7 +127,7 @@ public class JAASAuthenticationFilter im
             List<String> authHeader = headers.getRequestHeader(HttpHeaders.AUTHORIZATION);
             if (authHeader.size() > 0) {
                 // should HttpHeadersImpl do it ?
-                String[] authValues = authHeader.get(0).split(" ");
+                String[] authValues = StringUtils.split(authHeader.get(0), " ");
                 if (authValues.length > 0) {
                     sb.append(authValues[0]);
                 }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/security/KerberosAuthenticationFilter.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/security/KerberosAuthenticationFilter.java?rev=1424526&r1=1424525&r2=1424526&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/security/KerberosAuthenticationFilter.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/security/KerberosAuthenticationFilter.java
Thu Dec 20 15:23:57 2012
@@ -75,7 +75,7 @@ public class KerberosAuthenticationFilte
             LOG.fine("No Authorization header is available");
             throw new NotAuthorizedException(getFaultResponse());
         }
-        String[] authPair = authHeaders.get(0).split(" ");
+        String[] authPair = StringUtils.split(authHeaders.get(0), " ");
         if (authPair.length != 2 || !NEGOTIATE_SCHEME.equalsIgnoreCase(authPair[0])) {
             LOG.fine("Negotiate Authorization scheme is expected");
             throw new NotAuthorizedException(getFaultResponse());

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java?rev=1424526&r1=1424525&r2=1424526&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java
Thu Dec 20 15:23:57 2012
@@ -180,7 +180,7 @@ public class CXFNonSpringJaxrsServlet ex
         if (schemas == null) {
             return;
         }
-        String[] locations = schemas.split(" ");
+        String[] locations = StringUtils.split(schemas, " ");
         List<String> list = new ArrayList<String>();
         for (String loc : locations) {
             String theLoc = loc.trim();
@@ -208,7 +208,7 @@ public class CXFNonSpringJaxrsServlet ex
         if (value == null) {
             return;
         }
-        String[] values = value.split(splitChar);
+        String[] values = StringUtils.split(value, splitChar);
         List<Interceptor<? extends Message>> list = new ArrayList<Interceptor<?
extends Message>>();
         for (String interceptorVal : values) {
             Map<String, List<String>> props = new HashMap<String, List<String>>();
@@ -273,7 +273,7 @@ public class CXFNonSpringJaxrsServlet ex
             }
             throw new ServletException("At least one resource class should be specified");
         }
-        String[] classNames = serviceBeans.split(splitChar);
+        String[] classNames = StringUtils.split(serviceBeans, splitChar);
         Map<Class<?>, Map<String, List<String>>> map = 
             new HashMap<Class<?>, Map<String, List<String>>>();
         for (String cName : classNames) {
@@ -295,7 +295,7 @@ public class CXFNonSpringJaxrsServlet ex
         if (providersList == null) {
             return Collections.EMPTY_LIST;
         }
-        String[] classNames = providersList.split(splitChar);
+        String[] classNames = StringUtils.split(providersList, splitChar);
         List<Object> providers = new ArrayList<Object>();
         for (String cName : classNames) {
             Map<String, List<String>> props = new HashMap<String, List<String>>();
@@ -322,13 +322,13 @@ public class CXFNonSpringJaxrsServlet ex
         if (sequence != null) {
             sequence = sequence.trim();
             Map<String, List<String>> map = new HashMap<String, List<String>>();
-            String[] pairs = sequence.split(" ");
+            String[] pairs = StringUtils.split(sequence, " ");
             for (String pair : pairs) {
                 String thePair = pair.trim();
                 if (thePair.length() == 0) {
                     continue;
                 }
-                String[] values = thePair.split("=");
+                String[] values = StringUtils.split(thePair, "=");
                 String key;
                 String value;
                 if (values.length == 2) {

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/JAXRSServerFactoryBeanDefinitionParser.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/JAXRSServerFactoryBeanDefinitionParser.java?rev=1424526&r1=1424525&r2=1424526&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/JAXRSServerFactoryBeanDefinitionParser.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/JAXRSServerFactoryBeanDefinitionParser.java
Thu Dec 20 15:23:57 2012
@@ -54,7 +54,7 @@ public class JAXRSServerFactoryBeanDefin
     @Override
     protected void mapAttribute(BeanDefinitionBuilder bean, Element e, String name, String
val) {
         if ("beanNames".equals(name)) {
-            String[] values = val.split(" ");
+            String[] values = StringUtils.split(val, " ");
             List<SpringResourceFactory> tempFactories = new ArrayList<SpringResourceFactory>(values.length);
             for (String v : values) {
                 String theValue = v.trim();

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/FormUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/FormUtils.java?rev=1424526&r1=1424525&r2=1424526&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/FormUtils.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/FormUtils.java Thu
Dec 20 15:23:57 2012
@@ -88,7 +88,7 @@ public final class FormUtils {
                                              boolean decode,
                                              HttpServletRequest request) {
         if (!StringUtils.isEmpty(postBody)) {
-            List<String> parts = Arrays.asList(postBody.split("&"));
+            List<String> parts = Arrays.asList(StringUtils.split(postBody, "&"));
             checkNumberOfParts(m, parts.size());
             for (String part : parts) {
                 String[] keyValue = new String[2];

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/HttpUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/HttpUtils.java?rev=1424526&r1=1424525&r2=1424526&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/HttpUtils.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/HttpUtils.java Thu
Dec 20 15:23:57 2012
@@ -204,7 +204,7 @@ public final class HttpUtils {
             return null;
         }
         
-        String[] values = value.split("-");
+        String[] values = StringUtils.split(value, "-");
         if (values.length == 0 || values.length > 2) {
             throw new IllegalArgumentException("Illegal locale value : " + value);
         }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java?rev=1424526&r1=1424525&r2=1424526&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
Thu Dec 20 15:23:57 2012
@@ -73,6 +73,7 @@ import org.apache.cxf.common.i18n.Bundle
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.PrimitiveUtils;
 import org.apache.cxf.common.util.ReflectionUtil;
+import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.jaxrs.ext.MessageContext;
 import org.apache.cxf.jaxrs.ext.ProtocolHeaders;
@@ -785,7 +786,7 @@ public final class InjectionUtils {
         }
         List<String> newValues = new ArrayList<String>();
         for (String v : values) {
-            String[] segments = v.split("/");
+            String[] segments = StringUtils.split(v, "/");
             for (String s : segments) {
                 if (s.length() != 0) {
                     newValues.add(s);

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java?rev=1424526&r1=1424525&r2=1424526&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java Thu
Dec 20 15:23:57 2012
@@ -174,7 +174,7 @@ public final class JAXRSUtils {
     
     public static List<PathSegment> getPathSegments(String thePath, boolean decode,

                                                     boolean ignoreLastSlash) {
-        String[] segments = thePath.split("/");
+        String[] segments = StringUtils.split(thePath, "/");
         List<PathSegment> theList = new ArrayList<PathSegment>();
         for (String path : segments) {
             if (!StringUtils.isEmpty(path)) {
@@ -1093,7 +1093,7 @@ public final class JAXRSUtils {
                                            boolean decode,
                                            boolean decodePlus) {
         if (!StringUtils.isEmpty(query)) {            
-            List<String> parts = Arrays.asList(query.split(sep));
+            List<String> parts = Arrays.asList(StringUtils.split(query, sep));
             for (String part : parts) {
                 int index = part.indexOf('=');
                 String name = null;



Mime
View raw message