cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [cxf] branch master updated: [CXF-7534, CXF-7542] Fix problems doing field injection on fields in superclasses
Date Fri, 27 Oct 2017 19:26:00 GMT
This is an automated email from the ASF dual-hosted git repository.

dkulp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/master by this push:
     new a42a9f5  [CXF-7534, CXF-7542] Fix problems doing field injection on fields in superclasses
a42a9f5 is described below

commit a42a9f5fbe2825216025b46012b3d40c9621e211
Author: Daniel Kulp <dkulp@apache.org>
AuthorDate: Fri Oct 27 12:24:54 2017 -0700

    [CXF-7534, CXF-7542] Fix problems doing field injection on fields in superclasses
---
 .../main/java/org/apache/cxf/common/injection/ResourceInjector.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/core/src/main/java/org/apache/cxf/common/injection/ResourceInjector.java b/core/src/main/java/org/apache/cxf/common/injection/ResourceInjector.java
index 4be7d04..c3d403a 100644
--- a/core/src/main/java/org/apache/cxf/common/injection/ResourceInjector.java
+++ b/core/src/main/java/org/apache/cxf/common/injection/ResourceInjector.java
@@ -79,7 +79,11 @@ public class ResourceInjector extends AbstractAnnotationVisitor {
             return null;
         }
         try {
-            return ReflectionUtil.getDeclaredField(cls, name);
+            Field f = ReflectionUtil.getDeclaredField(cls, name);
+            if (f == null) {
+                f = getField(cls.getSuperclass(), name);
+            }
+            return f;
         } catch (Exception ex) {
             return getField(cls.getSuperclass(), name);
         }

-- 
To stop receiving notification emails like this one, please contact
['"commits@cxf.apache.org" <commits@cxf.apache.org>'].

Mime
View raw message