leif        2003/01/09 01:43:10

  Modified:    fortress/src/java/org/apache/excalibur/fortress/container
                        DefaultContainer.java
  Log:
  Add a debug message to make it possible for users to figure out that their
  components are not being configured because the id attribute is missing.  
Before
  it was necessary to do a lot of digging to find the cause.   Is their any 
reason not
  to make this a warning message?
  
  Revision  Changes    Path
  1.16      +8 -2      
jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/container/DefaultContainer.java
  
  Index: DefaultContainer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/container/DefaultContainer.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- DefaultContainer.java     5 Jan 2003 17:03:03 -0000       1.15
  +++ DefaultContainer.java     9 Jan 2003 09:43:10 -0000       1.16
  @@ -103,7 +103,13 @@
           {
               final Configuration element = elements[ i ];
               final String hint = element.getAttribute( "id", null );
  -            if( null != hint )
  +            if ( null == hint )
  +            {
  +                // Only components with an id attribute are treated as 
components.
  +                getLogger().debug( "Ignoring configuration for component, " 
+ element.getName()
  +                    + ", because the id attribute is missing." );
  +            }
  +            else
               {
                   final String classname = getClassname( element );
                   final boolean isLazy = isLazyComponentHandler( element );
  
  
  

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

Reply via email to