Author: remm
Date: Mon May 22 16:37:24 2006
New Revision: 408790
URL: http://svn.apache.org/viewvc?rev=408790&view=rev
Log:
- Use getDeclaredMethods/Fields here.
Modified:
tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/AnnotationProcessor.java
Modified:
tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/AnnotationProcessor.java
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/AnnotationProcessor.java?rev=408790&r1=408789&r2=408790&view=diff
==============================================================================
---
tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/AnnotationProcessor.java
(original)
+++
tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/AnnotationProcessor.java
Mon May 22 16:37:24 2006
@@ -51,7 +51,7 @@
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 @@
}
// 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 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)) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]