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:35:34 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes ddb5a9740 -> 20ce4a232


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

Branch: refs/heads/3.0.x-fixes
Commit: 20ce4a2320dabb7e99faed710209a919b25ac0cb
Parents: ddb5a97
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:35:09 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/20ce4a23/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