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/blocks/portal/java/org/apache/cocoon/portal/impl DefaultPortalComponentManager.java
Date Mon, 06 Oct 2003 15:22:36 GMT
vgritsenko    2003/10/06 08:22:36

  Modified:    src/blocks/portal/java/org/apache/cocoon/portal/impl
                        DefaultPortalComponentManager.java
  Log:
  Release component *before* nulling out reference to manager
  
  Revision  Changes    Path
  1.2       +7 -8      cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/impl/DefaultPortalComponentManager.java
  
  Index: DefaultPortalComponentManager.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/impl/DefaultPortalComponentManager.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultPortalComponentManager.java	18 Jul 2003 14:41:46 -0000	1.1
  +++ DefaultPortalComponentManager.java	6 Oct 2003 15:22:36 -0000	1.2
  @@ -151,11 +151,11 @@
        * @see org.apache.avalon.framework.activity.Disposable#dispose()
        */
       public void dispose() {
  -        if ( this.manager != null ) {
  +        if (this.manager != null) {
               if ( this.rendererSelector != null) {
                   Iterator i = this.renderers.values().iterator();
  -                while ( i.hasNext() ) {
  -                    this.rendererSelector.release( (Component) i.next());
  +                while (i.hasNext()) {
  +                    this.rendererSelector.release((Component) i.next());
                   }
                   this.manager.release( this.rendererSelector );
                   this.rendererSelector = null;
  @@ -163,15 +163,14 @@
               }
               this.manager.release( this.profileManager );
               this.manager.release( this.linkService );
  -            this.manager = null;
               this.profileManager = null;
               this.linkService = null;
  -            this.manager.release( (Component)this.copletFactory );
  -            this.manager.release( (Component)this.layoutFactory );
  +            this.manager.release((Component)this.copletFactory);
  +            this.manager.release((Component)this.layoutFactory);
               this.copletFactory = null;
               this.layoutFactory = null;
  +            this.manager = null;
           }
  -
       }
   
       /* (non-Javadoc)
  
  
  

Mime
View raw message