Java compatibility? (was Re: Not a bash, just the facts)

Alan McKinnon alan at linuxholdings.co.za
Mon Mar 27 19:45:41 UTC 2006


On Monday 27 March 2006 13:33, Dalibor Topic wrote:
> Alan McKinnon <alan <at> linuxholdings.co.za> writes:

> > > Has any deprecated feature ever actually been removed?
> >
> > I was wondering that myself three posts back. Some reading
> > meanwhile indicates:
> >
> > No.
>
> Sort of.
>
> There have been changes that break binary compatibility between
> different J2SE releases. For example, when wheeled mice became
> popular enough to have to be supported somehow in AWT, the constant
> denoting the number of possible AWT mouse events had to be
> incremented. Changing the value of a constant is a binary
> compatibility breaking change, of course, see the Java Language
> Specification for details. It's a pretty bad API design, anyway,
> but we're stuck with it.

I last used AWT way back when 1.1 was still New! Improved! which 
explains why I never ran into it.

> There have been quite a few annoying cases where the spec and/or
> behaviour of methods has changed radically between releases.
> System.getenv() went from sort of working, to always throwing a
> runtime exception and back to hopefully working between three
> different J2SE releases.

I'm reminded of the gc and finaliser methods which sometimes worked 
erratically and sometimes did nothing observable at all. Lucky for 
Sun they had a cop-out in the spec - "these methods suggest to the 
run time system to expend effort in reclaiming memory"... And the 
broken threading methods...

But of all these engineering mistakes, has Sun ever removed any of 
them after they were deprecated?

-- 
Alan McKinnon
alan at linuxholdings dot co dot za
+27 82, double three seven, one nine three five




More information about the ubuntu-users mailing list