On 15.03.2004 19:37, [EMAIL PROTECTED] wrote:
http://issues.apache.org/bugzilla/show_bug.cgi?id=27678
AbstractXMLProducer.setConsumer implementation is incorrect
The implementation of org.apache.cocoon.xml.AbstractXMLProducer.setConsumer does
not match its Javadoc. Patch is below. Current workaround is to include implementation specified in Javadoc in subclass.
- this.contentHandler = consumer; - this.lexicalHandler = consumer; + setContentHandler(consumer); + setLexicalHandler(consumer);
This can make indeed a difference when subclassing AbstractXMLProducer, but the question is if it's useful usable. Shall we apply it? I guess we can break someone's code who implemented the both functions incorrectly, but never called them himself, but I don't fear this.
Will it break AbstractTextSerializer? It should be fixed or changed then too - currently it overrides all three methods (and calls super). May be we simply need to change javadoc?
Vadim
