- Fix cut & paste bug, submitted by Stan Silvert.
authorremm <remm@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 20 May 2006 00:04:55 +0000 (00:04 +0000)
committerremm <remm@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 20 May 2006 00:04:55 +0000 (00:04 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@407933 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/util/AnnotationProcessor.java
java/org/apache/jasper/runtime/AnnotationProcessor.java

index 499cb79..6b5b5f8 100644 (file)
@@ -23,6 +23,7 @@ import java.lang.reflect.Modifier;
 \r
 import javax.annotation.EJB;\r
 import javax.annotation.PostConstruct;\r
+import javax.annotation.PreDestroy;\r
 import javax.annotation.Resource;\r
 import javax.naming.NamingException;\r
 import javax.persistence.PersistenceContext;\r
@@ -84,7 +85,7 @@ public class AnnotationProcessor {
         Method[] methods = IntrospectionUtils.findMethods(instance.getClass());\r
         Method preDestroy = null;\r
         for (int i = 0; i < methods.length; i++) {\r
-            if (methods[i].isAnnotationPresent(PostConstruct.class)) {\r
+            if (methods[i].isAnnotationPresent(PreDestroy.class)) {\r
                 if ((preDestroy != null) \r
                         || (methods[i].getParameterTypes().length != 0)\r
                         || (Modifier.isStatic(methods[i].getModifiers())) \r
index cd23a2c..5af33c1 100644 (file)
@@ -23,6 +23,7 @@ import java.lang.reflect.Modifier;
 
 import javax.annotation.EJB;
 import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
 import javax.annotation.Resource;
 import javax.naming.Context;
 import javax.naming.InitialContext;
@@ -140,7 +141,7 @@ public class AnnotationProcessor {
         Method[] methods = instance.getClass().getMethods();
         Method preDestroy = null;
         for (int i = 0; i < methods.length; i++) {
-            if (methods[i].isAnnotationPresent(PostConstruct.class)) {
+            if (methods[i].isAnnotationPresent(PreDestroy.class)) {
                 if ((preDestroy != null) 
                         || (methods[i].getParameterTypes().length != 0)
                         || (Modifier.isStatic(methods[i].getModifiers()))