From: Archie Cobbs (archie@whistle.com)
Date: Mon Sep 21 1998 - 01:50:34 EDT
Godmar Back writes:
> > Godmar Back writes:
> > > I haven't looked at that fix yet, so take what I'm saying with caution:
> > > If we derived Byte from Number (as the spec says), then this would give
> > > Byte a shortValue() method cause it's not abstract in Number.
> > > In truth, however, Byte.shortValue overrides Number.shortValue
> > > so we need to both extend Number and override. Why Byte.shortValue()
> > > cannot be implemented as (short)intValue() as in Number, I don't know.
> >
> > Must admit I hadn't researched it that much. It looks like the real
> > bug is that class Byte does not extend Number, as it should according
> > to the JDK docs.
> >
> > So should I back out that patch and change Byte to extend Number?
>
> No, the real fix is to change Byte to extend Number AND still
> override shortValue in Byte.
>
> That is, if the "overrides in" part of the JDK *documentation* is actually
> a binding *specification*.
OK, I'll just make Byte extend Number then.
Thanks,
-Archie
___________________________________________________________________________
Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com
This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 19:56:58 EDT