tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1138788 - in /tomcat/trunk/java/org/apache/catalina/startup: ContextConfig.java TldConfig.java
Date Thu, 23 Jun 2011 09:26:10 GMT
Author: markt
Date: Thu Jun 23 09:26:10 2011
New Revision: 1138788

URL: http://svn.apache.org/viewvc?rev=1138788&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51395
Better fix for memory leak that aligns ContextConfig with TldConfig

Modified:
    tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
    tomcat/trunk/java/org/apache/catalina/startup/TldConfig.java

Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1138788&r1=1138787&r2=1138788&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Thu Jun 23 09:26:10 2011
@@ -484,6 +484,8 @@ public class ContextConfig
                         namespaceAware, webRuleSet);
                 webFragmentDigesters[0] = DigesterFactory.newDigester(validation,
                         namespaceAware, webFragmentRuleSet);
+                webDigesters[0].getParser();
+                webFragmentDigesters[0].getParser();
             }
             webDigester = webDigesters[0];
             webFragmentDigester = webFragmentDigesters[0];
@@ -494,6 +496,8 @@ public class ContextConfig
                         namespaceAware, webRuleSet);
                 webFragmentDigesters[1] = DigesterFactory.newDigester(validation,
                         namespaceAware, webFragmentRuleSet);
+                webDigesters[1].getParser();
+                webFragmentDigesters[1].getParser();
             }
             webDigester = webDigesters[1];
             webFragmentDigester = webFragmentDigesters[1];
@@ -504,6 +508,8 @@ public class ContextConfig
                         namespaceAware, webRuleSet);
                 webFragmentDigesters[2] = DigesterFactory.newDigester(validation,
                         namespaceAware, webFragmentRuleSet);
+                webDigesters[2].getParser();
+                webFragmentDigesters[2].getParser();
             }
             webDigester = webDigesters[2];
             webFragmentDigester = webFragmentDigesters[2];
@@ -514,6 +520,8 @@ public class ContextConfig
                         namespaceAware, webRuleSet);
                 webFragmentDigesters[3] = DigesterFactory.newDigester(validation,
                         namespaceAware, webFragmentRuleSet);
+                webDigesters[3].getParser();
+                webFragmentDigesters[3].getParser();
             }
             webDigester = webDigesters[3];
             webFragmentDigester = webFragmentDigesters[3];
@@ -842,6 +850,9 @@ public class ContextConfig
         
         contextConfig();
         
+        createWebXmlDigester(context.getXmlNamespaceAware(),
+                context.getXmlValidation());
+
         try {
             fixDocBase();
         } catch (IOException e) {
@@ -878,8 +889,6 @@ public class ContextConfig
                     Boolean.valueOf(context.getXmlNamespaceAware())));
         }
         
-        createWebXmlDigester(context.getXmlNamespaceAware(), context.getXmlValidation());
-        
         webConfig();
 
         if (!context.getIgnoreAnnotations()) {

Modified: tomcat/trunk/java/org/apache/catalina/startup/TldConfig.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/TldConfig.java?rev=1138788&r1=1138787&r2=1138788&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/TldConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/TldConfig.java Thu Jun 23 09:26:10 2011
@@ -90,24 +90,28 @@ public final class TldConfig  implements
             if (tldDigesters[0] == null) {
                 tldDigesters[0] = DigesterFactory.newDigester(validation,
                         namespaceAware, new TldRuleSet());
+                tldDigesters[0].getParser();
             }
             digester = tldDigesters[0];
         } else if (!namespaceAware && validation) {
             if (tldDigesters[1] == null) {
                 tldDigesters[1] = DigesterFactory.newDigester(validation,
                         namespaceAware, new TldRuleSet());
+                tldDigesters[1].getParser();
             }
             digester = tldDigesters[1];
         } else if (namespaceAware && !validation) {
             if (tldDigesters[2] == null) {
                 tldDigesters[2] = DigesterFactory.newDigester(validation,
                         namespaceAware, new TldRuleSet());
+                tldDigesters[2].getParser();
             }
             digester = tldDigesters[2];
         } else {
             if (tldDigesters[3] == null) {
                 tldDigesters[3] = DigesterFactory.newDigester(validation,
                         namespaceAware, new TldRuleSet());
+                tldDigesters[3].getParser();
             }
             digester = tldDigesters[3];
         }



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


Mime
View raw message