You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Gilles Sadowski <gi...@harfang.homelinux.org> on 2012/08/08 14:55:04 UTC

[Math] Wrong diagnostic by Clirr?

Hi.

Following issue MATH-838, the "probability(double)" method was moved up to
the base class "AbstractRealDistribution". Following MATH-839, a new
"probabibility(double, double)" has been created. That method is overridden
in "NormalDistribution" and "LogNormalDistribution".
Clirr now considers that, in those classes, method "probabibility" has
changed signature, but this not true since both (overloaded) methods (with
one and two arguments) exist: the one-arg is inherited and the two-args is
overridden.

Isn't Clirr's assessment (that backwards compatiblity is broken) wrong?


Regards,
Gilles

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


Re: [Math] Wrong diagnostic by Clirr?

Posted by Gilles Sadowski <gi...@harfang.homelinux.org>.
> [...]
> 
> This:
> ---
> Method 'public double dotProduct(org.apache.commons.math3.linear.OpenMapRealVector)' has been removed
> ---
> is indicated as an error, and fails to run (unless the argument is cast to
> "RealVector"). [Sébastien, I think that you have to add this method back for
> 3.1.]

I've fixed it (revision 1378083).

Gilles

> [...]

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


Re: [Math] Wrong diagnostic by Clirr?

Posted by Gilles Sadowski <gi...@harfang.homelinux.org>.
Hi.

> >
> > Following issue MATH-838, the "probability(double)" method was moved up to
> > the base class "AbstractRealDistribution". Following MATH-839, a new
> > "probabibility(double, double)" has been created. That method is overridden
> > in "NormalDistribution" and "LogNormalDistribution".
> > Clirr now considers that, in those classes, method "probabibility" has
> > changed signature, but this not true since both (overloaded) methods (with
> > one and two arguments) exist: the one-arg is inherited and the two-args is
> > overridden.
> >
> > Isn't Clirr's assessment (that backwards compatiblity is broken) wrong?
> >
> 
> It's easy enough to create a test class to check this.
> 
> Compile against previous version of MATH and see if class still runs
> with current MATH.

I've done that.

This:
---
In method 'public double probability(double)' the number of arguments has changed
---
is indicated as an error, but runs fine.

This:
---
Return type of method 'public org.apache.commons.math3.analysis.DifferentiableUnivariateFunction derivative()' has been changed to org.apache.commons.math3.analysis.UnivariateFunction
---
is indicated as an error, but runs fine.

This:
---
Method 'public double dotProduct(org.apache.commons.math3.linear.OpenMapRealVector)' has been removed
---
is indicated as an error, and fails to run (unless the argument is cast to
"RealVector"). [Sébastien, I think that you have to add this method back for
3.1.]


Is there some procedure to keep track that some of the problems reported by
Clirr are not problems actually?


Regards,
Gilles

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


Re: [Math] Wrong diagnostic by Clirr?

Posted by sebb <se...@gmail.com>.
On 8 August 2012 13:55, Gilles Sadowski <gi...@harfang.homelinux.org> wrote:
> Hi.
>
> Following issue MATH-838, the "probability(double)" method was moved up to
> the base class "AbstractRealDistribution". Following MATH-839, a new
> "probabibility(double, double)" has been created. That method is overridden
> in "NormalDistribution" and "LogNormalDistribution".
> Clirr now considers that, in those classes, method "probabibility" has
> changed signature, but this not true since both (overloaded) methods (with
> one and two arguments) exist: the one-arg is inherited and the two-args is
> overridden.
>
> Isn't Clirr's assessment (that backwards compatiblity is broken) wrong?
>

It's easy enough to create a test class to check this.

Compile against previous version of MATH and see if class still runs
with current MATH.

>
> 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