From: markt Date: Mon, 19 Sep 2011 10:04:37 +0000 (+0000) Subject: Revert previous commit (r1172546). Need to fix cause rather than symptom. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=08386b637272606c18e4742dcd2f04e29f27f521;p=tomcat7.0 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 --- 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); } } }