commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From luc <...@spaceroots.org>
Subject Re: [Math] MATH-1256
Date Mon, 17 Aug 2015 10:15:13 GMT
Le 2015-08-17 12:06, Gilles a écrit :
> Hi.
> 
> Cf. issue reported in
>   https://issues.apache.org/jira/browse/MATH-1256
> 
> Quoting the OP:
> ---
> In class Interval, which is in the package
> org.apache.commons.math4.geometry.euclidean.oned
> it is possible to pass the value for variable upper less than the
> value of variable lower,
> which is logically incorrect and also causes the method getSize() to
> return negative value
> ---
> 
> Is it ever necessary to allow negative intervals (e.g. wrt to 
> "tolerance")?
> 
> If not, I propose to add a check in the constructor:
> ---CUT---
>    if (upper < lower) {
>        throw new
> NumberIsTooSmallException(LocalizedFormats.ENDPOINTS_NOT_AN_INTERVAL,
>                                            upper, lower, true);
>    }
> ---CUT---
> 
> OK?

Sure!

Luc

> 
> Regards,
> Gilles
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org

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


Mime
View raw message