On 05/04/2009, sebb <[email protected]> wrote:
> On 05/04/2009, Phil Steitz <[email protected]> wrote:
>  > sebb wrote:
>  >
>  > > On 05/04/2009, Phil Steitz <[email protected]> wrote:
>  > >
>  > >
>  > > > [email protected] wrote:
>  > > >
>  > > >  We need to be careful with removing all of these casts.  They were
>  > inserted
>  > > > earlier to eliminate some errors resulting from int/int computations in
>  > > > larger expressions resulting in incorrect values.   Could be later JDKs
>  > > > handle all of this seamlessly, but I would prefer to be safe rather 
> than
>  > > > sorry here and leave the explicit casts from int/long to double alone.
>  > > >
>  > > >
>  > >
>  > > I've just checked, and there are still some (double) casts left in the
>  > > code that Eclipse does not complain about, so I assume that Eclipse
>  > > distinguishes between casts that Java does anyway and casts that
>  > > affect the resulting code.
>  > >
>  > >
>  >  I would rather not leave this decision to Eclipse.  I will review and
>  > selectively revert.
>
>
> OK, thanks, I will go through the commits as well.
>

I've looked at both the java and test tree commits, and cannot find
any incorrect cast removals.

I did find one place in the test classes where Eclipse removed one
cast and not the other:

old: expected[i] = (double)smallSampleSize*100/(double)16;
new: expected[i] = (double)smallSampleSize*100/16;

which is to be expected as smallSampleSize is long.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to