[jdom-interest] detach() [eg]
bob mcwhirter
bob at werken.com
Thu Apr 26 09:50:45 PDT 2001
> Firstly I can find zero, no, none, nada documentation that would suggest ISE
> is limited to the case ERH mentions. Without a root the Document *is* in an
> illegal state, no amount of arguing is going to change that. ISE is the way
> to flag it.
Agreed.
> Secondly, changing the behaviour of detach() in the way Elliotte has
> suggested, whilst ideal if we were starting from scratch, will break
> existing code and would cause considerable confusion. Modifying the Document
> to throw an ISE maintains all existing code.
I think maintaining backwards-compatibility isn't one of the higher
goals, right now. Things will break anyhow, after the JSR, and
we get pushed into javax.xml.tree.* or whatever package is decided.
Since this is pre-release software, there's more wiggle room to
break code.
While breaking code is evil, I don't think "but it would break code"
is a valid argument to prevent changes from being made.
> Thirdly, Document isn't a bean so I fail to see why it should be constrained
> to behave like one.
Agreed.
-bob
More information about the jdom-interest
mailing list