Revert previous commit (r1172546). Need to fix cause rather than symptom.
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 19 Sep 2011 10:04:37 +0000 (10:04 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 19 Sep 2011 10:04:37 +0000 (10:04 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1172550 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/core/DefaultInstanceManager.java

index a542e3d..9fc69ff 100644 (file)
@@ -179,15 +179,13 @@ public class DefaultInstanceManager implements InstanceManager {
         // At the end the postconstruct annotated
         // method is invoked
         List<AnnotationCacheEntry> annotations = annotationCache.get(clazz);
-        if (annotations != null) {
-            for (AnnotationCacheEntry entry : annotations) {
-                if (entry.getType() == AnnotationCacheEntryType.POST_CONSTRUCT) {
-                    Method postConstruct = (Method) entry.getAccessibleObject();
-                    boolean accessibility = postConstruct.isAccessible();
-                    postConstruct.setAccessible(true);
-                    postConstruct.invoke(instance);
-                    postConstruct.setAccessible(accessibility);
-                }
+        for (AnnotationCacheEntry entry : annotations) {
+            if (entry.getType() == AnnotationCacheEntryType.POST_CONSTRUCT) {
+                Method postConstruct = (Method) entry.getAccessibleObject();
+                boolean accessibility = postConstruct.isAccessible();
+                postConstruct.setAccessible(true);
+                postConstruct.invoke(instance);
+                postConstruct.setAccessible(accessibility);
             }
         }
     }