cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject cvs commit: cocoon-2.1/src/java/org/apache/cocoon/components CocoonComponentManager.java
Date Fri, 07 Nov 2003 14:15:53 GMT
vgritsenko    2003/11/07 06:15:53

  Modified:    src/java/org/apache/cocoon/components
                        CocoonComponentManager.java
  Log:
  fix NPE during shutdown
  
  Revision  Changes    Path
  1.20      +10 -2     cocoon-2.1/src/java/org/apache/cocoon/components/CocoonComponentManager.java
  
  Index: CocoonComponentManager.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/CocoonComponentManager.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- CocoonComponentManager.java	21 Oct 2003 13:37:42 -0000	1.19
  +++ CocoonComponentManager.java	7 Nov 2003 14:15:53 -0000	1.20
  @@ -482,9 +482,17 @@
       public void dispose() {
           if ( null != this.sourceResolver ) {
               super.release( this.sourceResolver );
  -            this.sourceResolver = null;
  +            // We cannot null out sourceResolver here yet as some other not
  +            // disposed yet components might still have unreleased sources,
  +            // and they will call {@link #release(Source)} during their
  +            // dispose().
           }
  +        
           super.dispose();
  +        
  +        // All components now are released so sourceResolver should be not
  +        // needed anymore.
  +        this.sourceResolver = null;
       }
   
       /**
  
  
  

Mime
View raw message