cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1482274 - in /cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl: MediaTypeHeaderProvider.java RuntimeDelegateImpl.java
Date Tue, 14 May 2013 09:42:11 GMT
Author: sergeyb
Date: Tue May 14 09:42:11 2013
New Revision: 1482274

URL: http://svn.apache.org/r1482274
Log:
[CXF-5007] Adding HeaderDelegate null checks

Modified:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/MediaTypeHeaderProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RuntimeDelegateImpl.java

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/MediaTypeHeaderProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/MediaTypeHeaderProvider.java?rev=1482274&r1=1482273&r2=1482274&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/MediaTypeHeaderProvider.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/MediaTypeHeaderProvider.java
Tue May 14 09:42:11 2013
@@ -110,6 +110,9 @@ public class MediaTypeHeaderProvider imp
     // Max number of parameters that may be ignored is 3, at least as known 
     // to the implementation
     public static String typeToString(MediaType type, List<String> ignoreParams) {
+        if (type == null) {
+            throw new IllegalArgumentException("MediaType parameter is null");
+        }
         StringBuilder sb = new StringBuilder();
         sb.append(type.getType()).append('/').append(type.getSubtype());
         

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RuntimeDelegateImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RuntimeDelegateImpl.java?rev=1482274&r1=1482273&r2=1482274&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RuntimeDelegateImpl.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RuntimeDelegateImpl.java
Tue May 14 09:42:11 2013
@@ -72,6 +72,9 @@ public class RuntimeDelegateImpl extends
     @SuppressWarnings("unchecked")
     @Override
     public <T> HeaderDelegate<T> createHeaderDelegate(Class<T> type) {
+        if (type == null) {
+            throw new IllegalArgumentException("HeaderDelegate type is null");
+        }
         return (HeaderDelegate<T>)headerProviders.get(type);
     }
 



Mime
View raw message