avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: avalon-sandbox/merlin/assembly/src/java/org/apache/avalon/assembly/appliance/impl DefaultAppliance.java
Date Thu, 29 May 2003 21:00:03 GMT
mcconnell    2003/05/29 14:00:03

  Modified:    merlin/assembly/src/java/org/apache/avalon/assembly/appliance/impl
                        DefaultAppliance.java
  Log:
  Addition of state validity checks on context accessor.
  
  Revision  Changes    Path
  1.8       +9 -1      avalon-sandbox/merlin/assembly/src/java/org/apache/avalon/assembly/appliance/impl/DefaultAppliance.java
  
  Index: DefaultAppliance.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/assembly/src/java/org/apache/avalon/assembly/appliance/impl/DefaultAppliance.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DefaultAppliance.java	8 May 2003 03:02:39 -0000	1.7
  +++ DefaultAppliance.java	29 May 2003 21:00:03 -0000	1.8
  @@ -569,9 +569,17 @@
        * Get the component context.
        *
        * @return the component context
  +     * @exception IllegalStateException if the operation is accessed 
  +     *   prior to assembly of the appliance
        */
       public Map getContextMap()
       {
  +        if( !m_assembled )
  +        {
  +            final String error =
  +              "Appliance: '" + this + "' has not been assembled.";
  +            throw new IllegalStateException( error );
  +        }
           return m_context;
       }
   
  
  
  

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


Mime
View raw message