On 17.03.2004 02:09, Vadim Gritsenko wrote:

-        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?

No AFAICS.


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?

For avoiding code duplication - even if it is the simplest one here - the patch would be good. If either setContentHandler() or setLexicalHandler() are changed setConsumer() would profit from this change too.


Joerg

Reply via email to