Hi All,
Hope all is well.
I think I've discovered a small bug in the Component class that's used when
collecting meta information about components in Fortress' tools jar.
I have one component which has a custom handler, and when I was specifying
@fortress.handler in the class comments, the handler name wasn't appearing
in the generated meta file for that class.
As a result the component was being assigned the default handler.
The patch to fix this is above, but I just wanted to get a second set of eyes
over the fix to make sure the it does as was intended. Anyone see any problems
there?
Cheers,
Marcus
--
.....
,,$$$$$$$$$, Marcus Crafter
;$' '$$$$: Computer Systems Engineer
$: $$$$: ManageSoft GmbH
$ o_)$$$: 82-84 Mainzer Landstrasse
;$, _/\ &&:' 60327 Frankfurt Germany
' /( &&&
\_&&&&'
&&&&.
&&&&&&&:
Index: Component.java
===================================================================
RCS file:
/home/cvs/avalon/fortress/tools/src/java/org/apache/avalon/fortress/tools/Component.java,v
retrieving revision 1.16
diff -u -r1.16 Component.java
--- Component.java 18 Jun 2003 13:16:48 -0000 1.16
+++ Component.java 8 Jul 2003 12:09:47 -0000
@@ -243,13 +243,17 @@
}
}
- if ( null != avalonLifecycle )
+ if ( null != avalonLifecycle ) // lifecycle specified directly
{
lifecycle = stripQuotes( avalonLifecycle.getNamedParameter( ATTR_TYPE ) );
}
- else if ( handler != null )
+ else if ( null != fortressHandler ) // handler specified directly
{
- handler = ( null == fortressHandler ) ? MetaInfoEntry.PER_THREAD_HANDLER
: stripQuotes( fortressHandler.getNamedParameter( ATTR_TYPE ) );
+ handler = stripQuotes( fortressHandler.getNamedParameter( ATTR_TYPE ) );
+ }
+ else // no lifecycle or handler specified, and no inspection match
+ {
+ handler = MetaInfoEntry.PER_THREAD_HANDLER;
}
if ( null != lifecycle ) setAttribute( TAG_LIFESTYLE, lifecycle );
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]