cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject git commit: [CXF-5995] Ignoring null BeanParam properties
Date Wed, 10 Sep 2014 10:29:16 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 6bd77abd1 -> 8f102efd4


[CXF-5995] Ignoring null BeanParam properties


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/8f102efd
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/8f102efd
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/8f102efd

Branch: refs/heads/master
Commit: 8f102efd48d558d22844ea4599df4a227fa0d84e
Parents: 6bd77ab
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Wed Sep 10 11:28:46 2014 +0100
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Wed Sep 10 11:28:46 2014 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/8f102efd/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
----------------------------------------------------------------------
diff --git a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
index a4f0a5c..ebee107 100644
--- a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
+++ b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
@@ -485,8 +485,10 @@ public class ClientProxyImpl extends AbstractClient implements
                         String propertyName = m.getName().substring(3);
                         Method getter = bean.getClass().getMethod("get" + propertyName, new
Class[]{});
                         Object value = getter.invoke(bean, new Object[]{});
-                        String annotationValue = AnnotationUtils.getAnnotationValue(annotation);
-                        values.put(annotationValue, new BeanPair(value, m.getParameterAnnotations()[0]));
+                        if (value != null) {
+                            String annotationValue = AnnotationUtils.getAnnotationValue(annotation);
+                            values.put(annotationValue, new BeanPair(value, m.getParameterAnnotations()[0]));
+                        }
                     } catch (Throwable t) {
                         // ignore
                     }


Mime
View raw message