Hi.

> >> [...]
> >> +    protected void checkIndices(final int start, final int end) {
> >> +        final int dim = getDimension();
> >> +        if ((start < 0) || (start >= dim)) {
> >> +            throw new OutOfRangeException(LocalizedFormats.INDEX,
> >> +                                          Integer.valueOf(start),
> >                                             ^^^^^^^^^^^^^^^
> >
> > Why do you call "valueOf"?
> >
> 
> I am not Sébastien, but this should be obvious:
> 
> The constructor used here is
> 
> public OutOfRangeException(Localizable specific,
> Number wrong,
> Number lo,
> Number hi)
> 
> Integer.valueOf() is the best way to convert  int -> Integer

No, the best way is to let the compiler do the conversion, in order to have
a cleaner source code.


Regards,
Gilles

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to