This is an automated email from the ASF dual-hosted git repository.
dkulp pushed a commit to branch 3.1.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/3.1.x-fixes by this push:
new fc7a212 [CXF-7534, CXF-7542] Fix problems doing field injection on
fields in superclasses
fc7a212 is described below
commit fc7a21296f10276b2fc860a51b8c3ef58eb4a132
Author: Daniel Kulp <[email protected]>
AuthorDate: Fri Oct 27 12:24:54 2017 -0700
[CXF-7534, CXF-7542] Fix problems doing field injection on fields in
superclasses
(cherry picked from commit a42a9f5fbe2825216025b46012b3d40c9621e211)
---
.../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 56734ef..c83b32b 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
['"[email protected]" <[email protected]>'].