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
commit d4bbd0c90feb8064887a6b1ee451ffd6631c8d03 Author: Andy McCright <j.andrew.mccri...@gmail.com> AuthorDate: Thu Oct 26 13:38:08 2017 -0500 Use ReflectionUtil rather than a new doPriv inner class (cherry picked from commit bd644f3e95e9560f81f175dfdf50d808b908515e) --- .../java/org/apache/cxf/jaxrs/model/BeanResourceInfo.java | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/BeanResourceInfo.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/BeanResourceInfo.java index a1b02b7..0e5c9e0 100644 --- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/BeanResourceInfo.java +++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/BeanResourceInfo.java @@ -41,13 +41,12 @@ package org.apache.cxf.jaxrs.model; import java.lang.annotation.Annotation; import java.lang.reflect.Field; import java.lang.reflect.Method; -import java.security.AccessController; -import java.security.PrivilegedAction; import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.apache.cxf.Bus; +import org.apache.cxf.common.util.ReflectionUtil; import org.apache.cxf.jaxrs.utils.AnnotationUtils; public abstract class BeanResourceInfo extends AbstractResourceInfo { @@ -80,7 +79,7 @@ public abstract class BeanResourceInfo extends AbstractResourceInfo { if (Object.class == cls || cls == null) { return; } - for (Field f : getDeclaredFields(cls)) { + for (Field f : ReflectionUtil.getDeclaredFields(cls)) { for (Annotation a : f.getAnnotations()) { if (AnnotationUtils.isParamAnnotationClass(a.annotationType())) { if (paramFields == null) { @@ -131,13 +130,4 @@ public abstract class BeanResourceInfo extends AbstractResourceInfo { return paramFields == null ? Collections.<Field>emptyList() : Collections.unmodifiableList(paramFields); } - - private static Field[] getDeclaredFields(final Class<?> cls) { - return AccessController.doPrivileged(new PrivilegedAction<Field[]>() { - - @Override - public Field[] run() { - return cls.getDeclaredFields(); - } }); - } } \ No newline at end of file -- To stop receiving notification emails like this one, please contact "commits@cxf.apache.org" <commits@cxf.apache.org>.