tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/digester Digester.java
Date Mon, 06 Sep 2004 15:02:08 GMT
remm        2004/09/06 08:02:08

  Modified:    catalina/src/share/org/apache/catalina/startup
                        HostConfig.java ContextConfig.java TldConfig.java
               catalina/src/share/org/apache/catalina/realm
                        MemoryRealm.java JAASMemoryLoginModule.java
               util/java/org/apache/tomcat/util/digester Digester.java
  Log:
  - I messed up the fix of the digester ;)
  - Adding a reset method is the right solution.
  
  Revision  Changes    Path
  1.46      +2 -1      jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/HostConfig.java
  
  Index: HostConfig.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/HostConfig.java,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- HostConfig.java	2 Sep 2004 10:28:00 -0000	1.45
  +++ HostConfig.java	6 Sep 2004 15:02:07 -0000	1.46
  @@ -558,6 +558,7 @@
               Context context = null;
               synchronized (digester) {
                   context = (Context) digester.parse(contextXml);
  +                digester.reset();
               }
               if (context instanceof Lifecycle) {
                   Class clazz = Class.forName(host.getConfigClass());
  
  
  
  1.53      +4 -1      jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/ContextConfig.java
  
  Index: ContextConfig.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- ContextConfig.java	1 Sep 2004 22:55:48 -0000	1.52
  +++ ContextConfig.java	6 Sep 2004 15:02:07 -0000	1.53
  @@ -298,6 +298,7 @@
                   log.error(sm.getString("contextConfig.applicationParse"), e);
                   ok = false;
               } finally {
  +                webDigester.reset();
                   parseException = null;
                   try {
                       if (stream != null) {
  @@ -598,6 +599,7 @@
                   log.error(sm.getString("contextConfig.defaultParse"), e);
                   ok = false;
               } finally {
  +                digester.reset();
                   parseException = null;
                   try {
                       if (stream != null) {
  @@ -687,6 +689,7 @@
                   log.error(sm.getString("contextConfig.defaultParse"), e);
                   ok = false;
               } finally {
  +                contextDigester.reset();
                   parseException = null;
                   try {
                       if (stream != null) {
  
  
  
  1.43      +1 -2      jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java
  
  Index: TldConfig.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- TldConfig.java	16 Aug 2004 23:52:11 -0000	1.42
  +++ TldConfig.java	6 Sep 2004 15:02:07 -0000	1.43
  @@ -511,8 +511,7 @@
                   tldDigester.push(this);
                   tldDigester.parse(resourceStream);
               } finally {
  -                tldDigester.push(null);
  -                tldDigester.clear();
  +                tldDigester.reset();
               }
           }
   
  
  
  
  1.6       +2 -1      jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm/MemoryRealm.java
  
  Index: MemoryRealm.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm/MemoryRealm.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- MemoryRealm.java	26 Jun 2004 17:41:32 -0000	1.5
  +++ MemoryRealm.java	6 Sep 2004 15:02:07 -0000	1.6
  @@ -298,6 +298,7 @@
               synchronized (digester) {
                   digester.push(this);
                   digester.parse(file);
  +                digester.reset();
               }
           } catch (Exception e) {
               throw new LifecycleException("memoryRealm.readXml", e);
  
  
  
  1.11      +2 -1      jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm/JAASMemoryLoginModule.java
  
  Index: JAASMemoryLoginModule.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm/JAASMemoryLoginModule.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- JAASMemoryLoginModule.java	26 Jun 2004 17:41:32 -0000	1.10
  +++ JAASMemoryLoginModule.java	6 Sep 2004 15:02:07 -0000	1.11
  @@ -374,6 +374,7 @@
           try {
               digester.push(this);
               digester.parse(file);
  +            digester.reset();
           } catch (Exception e) {
               log.warn("Error processing configuration file " +
                   file.getAbsolutePath(), e);
  
  
  
  1.4       +6 -2      jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/digester/Digester.java
  
  Index: Digester.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/digester/Digester.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Digester.java	6 Sep 2004 06:47:41 -0000	1.3
  +++ Digester.java	6 Sep 2004 15:02:08 -0000	1.4
  @@ -2367,8 +2367,12 @@
           params.clear();
           publicId = null;
           stack.clear();
  -        root = null;
   
  +    }
  +
  +    
  +    public void reset() {
  +        root = null;
       }
   
   
  
  
  

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


Mime
View raw message