From d7b4fe005e4776f81577a8fd4647fe96f129dea0 Mon Sep 17 00:00:00 2001 From: remm Date: Mon, 22 May 2006 23:37:24 +0000 Subject: [PATCH] - Use getDeclaredMethods/Fields here. git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@408790 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/jasper/runtime/AnnotationProcessor.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/java/org/apache/jasper/runtime/AnnotationProcessor.java b/java/org/apache/jasper/runtime/AnnotationProcessor.java index 5af33c130..915e5f4d7 100644 --- a/java/org/apache/jasper/runtime/AnnotationProcessor.java +++ b/java/org/apache/jasper/runtime/AnnotationProcessor.java @@ -51,7 +51,7 @@ public class AnnotationProcessor { throws IllegalAccessException, InvocationTargetException, NamingException { // Initialize fields annotations - Field[] fields = instance.getClass().getFields(); + Field[] fields = instance.getClass().getDeclaredFields(); for (int i = 0; i < fields.length; i++) { if (fields[i].isAnnotationPresent(Resource.class)) { Resource annotation = (Resource) fields[i].getAnnotation(Resource.class); @@ -79,7 +79,7 @@ public class AnnotationProcessor { } // Initialize methods annotations - Method[] methods = instance.getClass().getMethods(); + Method[] methods = instance.getClass().getDeclaredMethods(); for (int i = 0; i < methods.length; i++) { if (methods[i].isAnnotationPresent(Resource.class)) { Resource annotation = (Resource) methods[i].getAnnotation(Resource.class); @@ -138,7 +138,7 @@ public class AnnotationProcessor { public static void preDestroy(Object instance) throws IllegalAccessException, InvocationTargetException { - Method[] methods = instance.getClass().getMethods(); + Method[] methods = instance.getClass().getDeclaredMethods(); Method preDestroy = null; for (int i = 0; i < methods.length; i++) { if (methods[i].isAnnotationPresent(PreDestroy.class)) { -- 2.11.0