[jdom-interest] SAXBuilder.build broken from b8?

dion at multitask.com.au dion at multitask.com.au
Sun May 5 16:17:31 PDT 2002


Yep, I know you can't do it without changing the method name.

Personally, I'd much rather have had 
1) A release where new methods were introduced, and deprecated the old 
ones
2) Another release where the old ones were removed and the added ones 
deprecated
3) A third release to remove the now deprecated and add them back under 
their 'correct' names

I realise this is an ugly process for you guys. But....

The code to support both versions of the methods is fairly ugly. And we 
can't force people to use unreleased code, but they can choose to do so. 
There's no 'release' or binary build for people to download that includes 
the new code, so it's not an easy task to force our clients to switch.

So our code has to catch the common superclass of JDOMException and 
IOException and check via instanceof which one we have.

If anyone's got a simpler solution, I'm all ears.
--
dIon Gillard, Multitask Consulting
Work:      http://www.multitask.com.au
Developers: http://adslgateway.multitask.com.au/developers




Elliotte Rusty Harold <elharo at metalab.unc.edu>
05/05/02 10:54 PM

 
        To:     dion at multitask.com.au, jdom-interest at jdom.org
        cc: 
        Subject:        Re: [jdom-interest] SAXBuilder.build broken from b8?


At 3:49 PM +1000 5/5/02, dion at multitask.com.au wrote:
>The SAXBuilder.build methods now throw IOException as well as
>JDOMExceptions. Would it be possible to deprecate them in a release (b9?)
>before changing the public signature next time? This will at least give 
us
>a chance to change the code before it's broken.
>--

No, because Java can't overload based on exceptions thrown. Thus the 
methods were not replaced by new methods. They were simply changed.
-- 

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|          The XML Bible, 2nd Edition (Hungry Minds, 2001)           |
|             http://www.cafeconleche.org/books/bible2/              |
|   http://www.amazon.com/exec/obidos/ISBN=0764547607/cafeaulaitA/   |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.cafeconleche.org/    |
+----------------------------------+---------------------------------+






More information about the jdom-interest mailing list