mcconnell    2003/09/12 08:26:20

  Modified:    merlin/kernel/impl/src/java/org/apache/avalon/merlin/kernel/impl
                        DefaultKernelContext.java
  Log:
  Move from <host>something</host> to <host path="something"/>.
  
  Revision  Changes    Path
  1.26      +20 -2     
avalon-sandbox/merlin/kernel/impl/src/java/org/apache/avalon/merlin/kernel/impl/DefaultKernelContext.java
  
  Index: DefaultKernelContext.java
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/merlin/kernel/impl/src/java/org/apache/avalon/merlin/kernel/impl/DefaultKernelContext.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- DefaultKernelContext.java 9 Sep 2003 14:59:30 -0000       1.25
  +++ DefaultKernelContext.java 12 Sep 2003 15:26:20 -0000      1.26
  @@ -424,7 +424,25 @@
               Configuration host = hosts[i];
               try
               {
  -                String path = host.getValue();
  +                String path = host.getAttribute( "path", null );
  +                if(( path == null ) && ( host.getValue( null ) != null ))
  +                {
  +                    path = host.getValue( null );
  +                    final String warning = 
  +                      "Your kernel file container a depricated <host> statement. "
  +                      + "Please replace all <host>...</host> references "
  +                      + "with <host path=\"...\"/>."
  +                      + ConfigurationUtil.list( host )
  +                      + "/nkernel: " + m_kernelURL;
  +                    getLogger().warn( warning );
  +                }
  +                else
  +                {
  +                    final String error = 
  +                      "Missing host path attribute."
  +                      + ConfigurationUtil.list( host );
  +                    throw new KernelException( error );
  +                }
                   if( !path.endsWith( "/" ) )
                   {
                       path = path + "/";
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to