The protected method findDynamicTag() in org.apache.commons.jelly.impl.StaticTagScript assumes that any dynamically registered TagLibrary (with the URI of this Tag) is an instance of a DynamicTagLibrary. It could however be any kind of TagLibrary. This patch removes this unnecessary dependency.
As a further step I think that all the org.apache.commons.jelly.impl.Dynamic* classes (including DynamicBeanTag, DynamicDynaBeanTag, DynamicTag, and DynamicTagLibrary) can be moved to the define tag library, which was split off the core. There aren't any classes in core that depend on them (except the yet unpatched StaticTagScript ;-)). Cheers, -- knut
Index: StaticTagScript.java =================================================================== RCS file: /home/cvspublic/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/impl/StaticTagScript.java,v retrieving revision 1.12 diff -u -r1.12 StaticTagScript.java --- StaticTagScript.java 11 Dec 2002 12:40:55 -0000 1.12 +++ StaticTagScript.java 23 Jan 2003 08:34:32 -0000 @@ -148,9 +148,8 @@ protected Tag findDynamicTag(JellyContext context, StaticTag tag) throws Exception { // lets see if there's a tag library for this URI... TagLibrary taglib = context.getTagLibrary( tag.getUri() ); - if ( taglib instanceof DynamicTagLibrary ) { - DynamicTagLibrary dynaLib = (DynamicTagLibrary) taglib; - Tag newTag = dynaLib.createTag( tag.getLocalName(), getSaxAttributes() ); + if ( taglib != null ) { + Tag newTag = taglib.createTag( tag.getLocalName(), getSaxAttributes() ); if ( newTag != null ) { newTag.setParent( tag.getParent() ); newTag.setBody( tag.getBody() );
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>