[jdom-interest] Visibility patch: org.jdom.output

Jason Hunter jhunter at acm.org
Wed May 28 11:23:49 PDT 2003


Alex Rosen wrote:
> No getters for Format?

Ah, good point.

> "OK, now to *everyone interested in subclassing*, please give these 
> patches a look and let me know if you have any concerns.  I'll probably
> 
> be checking them in tomorrow night California time.  I'd rather have
> the 
> problems raised now than at the next beta cycle."
> 
> This is good, but realize that most people who are using JDOM probably
> aren't on this list, and probably won't hear about any new versions
> until 1.0 comes out. 

True, but most people using JDOM don't use protected methods.  That's 
more an advanced feature, and so we have a higher likelihood of such 
people being on this list.  If not, well we aren't going straight to 1.0 
from here, so people can complain at b10.  The reason we kept it beta 
was specifically because we knew we had to make these changes.  They've 
been in the TODO.  I at least am feeling much better about the API today 
than I did two months ago.  People will probably put up with it if they 
get a 1.0 out of the deal.

> I'm especially worried that we're taking away
> extension points that they've been using, and so there won't be any
> solution for them, except to copy and modify the JDOM code, or we add
> back the new extension points (i.e. convert private back to protected)
> and they wait for 1.1, or we tell them to stick with the beta version.

We can add protected methods in a 1.0.1 if necessary, or add other ways 
of extending.  At the end of the day protected methods are part of the 
public interface and shouldn't be included unless absolutely necessary. 
  We kind of got sloppy in the past, I postponed tightening things up, 
but to get to 1.0 we have to do the tightening.

When we first envisioned the input/output packages we thought we'd write 
some classes and other people would write their own for special 
behavior.  But of course SAXBuilder and XMLOutputter are huge monstrous 
beasts that no one would want to write from scratch, so everyone wants 
to leverage the existing work for their special tweaks.  It's a tough 
spot.  At some point copying the class and tweaking it to create a 
custom builder or outputter is OK.

-jh-




More information about the jdom-interest mailing list