cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r736766 - in /cxf/trunk: common/common/src/main/java/org/apache/cxf/helpers/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/
Date Thu, 22 Jan 2009 20:04:24 GMT
Author: dkulp
Date: Thu Jan 22 12:04:23 2009
New Revision: 736766

URL: http://svn.apache.org/viewvc?rev=736766&view=rev
Log:
[CXF-1895] Fix an issue with an old version of tomcat
Remove some unused supress warnings

Modified:
    cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/HttpHeaderHelper.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java

Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/HttpHeaderHelper.java
URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/HttpHeaderHelper.java?rev=736766&r1=736765&r2=736766&view=diff
==============================================================================
--- cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/HttpHeaderHelper.java (original)
+++ cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/HttpHeaderHelper.java Thu
Jan 22 12:04:23 2009
@@ -80,9 +80,15 @@
         if (enc == null) {
             return UTF8.name();
         }
+        //older versions of tomcat don't properly parse ContentType headers with stuff
+        //after charset="UTF-8"
+        int idx = enc.indexOf(";");
+        if (idx != -1) {
+            enc = enc.substring(0, idx);
+        }
         // Charsets can be quoted. But it's quite certain that they can't have escaped quoted
or
         // anything like that.
-        enc = enc.replace("\"", "");
+        enc = enc.replace("\"", "").trim();
         enc = enc.replace("'", "");
         if ("".equals(enc)) {
             return UTF8.name();

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java?rev=736766&r1=736765&r2=736766&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MessageContextImpl.java
Thu Jan 22 12:04:23 2009
@@ -64,7 +64,6 @@
         return JAXRSUtils.createContextValue(m, genericType, clazz);
     }
     
-    @SuppressWarnings("unchecked")
     public <T, E> T getResolver(Class<T> resolverClazz, Class<E> resolveClazz)
{
         if (ContextResolver.class == resolverClazz) {
             return resolverClazz.cast(getContext(resolveClazz, ContextResolver.class));

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=736766&r1=736765&r2=736766&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 Jan 22 12:04:23 2009
@@ -67,7 +67,6 @@
     public UriBuilder clone() {
         return new UriBuilderImpl(build());
     }
-
     // CHECKSTYLE:ON
 
     @Override
@@ -97,7 +96,6 @@
         return path(((Path)ann).value());
     }
 
-    @SuppressWarnings("unchecked")
     @Override
     public UriBuilder path(Class resource, String method) throws IllegalArgumentException
{
         if (resource == null) {



Mime
View raw message