From 08386b637272606c18e4742dcd2f04e29f27f521 Mon Sep 17 00:00:00 2001 From: markt Date: Mon, 19 Sep 2011 10:04:37 +0000 Subject: [PATCH] Revert previous commit (r1172546). Need to fix cause rather than symptom. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1172550 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/catalina/core/DefaultInstanceManager.java | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/java/org/apache/catalina/core/DefaultInstanceManager.java b/java/org/apache/catalina/core/DefaultInstanceManager.java index a542e3db1..9fc69ffb3 100644 --- a/java/org/apache/catalina/core/DefaultInstanceManager.java +++ b/java/org/apache/catalina/core/DefaultInstanceManager.java @@ -179,15 +179,13 @@ public class DefaultInstanceManager implements InstanceManager { // At the end the postconstruct annotated // method is invoked List 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); } } } -- 2.11.0