You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by mc...@apache.org on 2003/06/03 19:14:51 UTC

cvs commit: avalon-sandbox/merlin/assembly/src/java/org/apache/avalon/assembly/lifestyle/impl AbstractLifestyleHandler.java

mcconnell    2003/06/03 10:14:51

  Modified:    merlin   project.xml
               merlin/assembly/src/java/org/apache/avalon/assembly/lifestyle/impl
                        AbstractLifestyleHandler.java
  Log:
  Applied patch from David Bernard re. lifecycle handling validation of potentially null handler.
  
  Revision  Changes    Path
  1.13      +1 -1      avalon-sandbox/merlin/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/project.xml,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- project.xml	14 May 2003 09:36:09 -0000	1.12
  +++ project.xml	3 Jun 2003 17:14:51 -0000	1.13
  @@ -134,7 +134,7 @@
         <name>David Bernard</name>
         <email>dwayne@java-fan.com</email>
         <roles>
  -        <role>Documentation and tutorial review, testing and patches.</role>
  +        <role>Documentation and tutorial review, testing and patches. Updates to lifecycle handlers.</role>
         </roles>
       </contributor>
       <contributor>
  
  
  
  1.3       +4 -3      avalon-sandbox/merlin/assembly/src/java/org/apache/avalon/assembly/lifestyle/impl/AbstractLifestyleHandler.java
  
  Index: AbstractLifestyleHandler.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/assembly/src/java/org/apache/avalon/assembly/lifestyle/impl/AbstractLifestyleHandler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractLifestyleHandler.java	8 May 2003 03:02:39 -0000	1.2
  +++ AbstractLifestyleHandler.java	3 Jun 2003 17:14:51 -0000	1.3
  @@ -317,9 +317,10 @@
               throw new IllegalStateException( error );
           }
   
  -        if( Accessor.class.isAssignableFrom( getImplementationClass() ) )
  +        Object handler = provider.resolve( this );
  +        if ((handler != null)  && (handler instanceof Accessor))
           {
  -            Accessor extension = (Accessor) provider.resolve( this );
  +            Accessor extension = (Accessor) handler;
               try
               {
                   Context context = new DefaultContext( getAppliance().getContextMap() );
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org