tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r1169447 - /tomcat/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java
Date Sun, 11 Sep 2011 13:14:24 GMT
Author: rjung
Date: Sun Sep 11 13:14:23 2011
New Revision: 1169447

URL: http://svn.apache.org/viewvc?rev=1169447&view=rev
Log:
The cache only gets populated if the context is
not null.

Modified:
    tomcat/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java

Modified: tomcat/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java?rev=1169447&r1=1169446&r2=1169447&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java Sun Sep 11 13:14:23
2011
@@ -166,6 +166,11 @@ public class DefaultInstanceManager impl
      */
     protected void postConstruct(Object instance, final Class<?> clazz)
             throws IllegalAccessException, InvocationTargetException {
+        if (context == null) {
+            // No resource injection
+            return;
+        }
+
         Class<?> superClass = clazz.getSuperclass();
         if (superClass != Object.class) {
             postConstruct(instance, superClass);



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message