[jdom-interest] Protected methods to make private

Jason Hunter jhunter at servlets.com
Tue Jun 17 12:55:07 PDT 2003


Laurent Bihanic wrote:
> 
> Jason Hunter wrote:
> 
>> SAXHandler:
>>   flushCharacters(String)
>>
>> Brad, I seem to recall you had a performance trick involving this 
>> method?  What's the point of keeping it?
> 
> 
> This method was introduced to allow implementing handlers that strip the 
> white spaces from the text content such as:
> 
> protected void flushCharacters(String data) throws SAXException {
>     super.flushCharacters(data.trim());
> }

Yep, that's the right history of why it's there.  Must we keep it?  It 
seems like an odd duck method where subclasses could have real problems 
if we change our SAXHandler implementation design in the future.  Could 
an XMLFilter or something suffice?  What kind of whitespace stripping do 
people want to do that we don't currently provide?

-jh-





More information about the jdom-interest mailing list