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?
I see no problems. Go ahead and commit it.
Cheers,
Marcus
------------------------------------------------------------------------
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]
--
"They that give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety."
- Benjamin Franklin
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
