mcconnell 02/05/14 22:45:29
Modified: merlin/src/java/org/apache/excalibur/merlin UnitInfo.java
Log:
Updated to handle block name inport in the form
<block>
<name>Some name</name>
</block>
Checks for name attribute for backward compatability if name element not
found.
Revision Changes Path
1.4 +11 -1
jakarta-avalon-excalibur/merlin/src/java/org/apache/excalibur/merlin/UnitInfo.java
Index: UnitInfo.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/merlin/src/java/org/apache/excalibur/merlin/UnitInfo.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- UnitInfo.java 12 May 2002 13:08:47 -0000 1.3
+++ UnitInfo.java 15 May 2002 05:45:29 -0000 1.4
@@ -197,8 +197,18 @@
m_config = new CascadingConfiguration( conf, configuration );
// get the default name
+ // use the attribute as a default value (backward compatability)
+ // use the child name value as the declaration
- m_name = xinfo.getChild( "block" ).getAttribute( "name",
getClassName() );
+ m_name = xinfo.getChild( "block" ).getChild( "name" ).getValue( null
);
+ if( m_name == null )
+ {
+ m_name = xinfo.getChild( "block" ).getAttribute( "name", null );
+ if( m_name == null )
+ {
+ m_name = getClassName();
+ }
+ }
// get the default context
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>