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:39:34 GMT
Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes 48cce4ecc -> 099597cdf


[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/099597cd
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/099597cd
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/099597cd

Branch: refs/heads/2.7.x-fixes
Commit: 099597cdff42c9825ea34561d1cf250456aa5c74
Parents: 48cce4e
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:39:21 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/099597cd/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
index f5fe9e0..f5c88ae 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
@@ -481,8 +481,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