cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: DO NOT REPLY [Bug 27678] New: - AbstractXMLProducer.setConsumer implementation is incorrect
Date Wed, 17 Mar 2004 22:06:09 GMT
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

Mime
View raw message