2012/9/21 Gilles Sadowski <gil...@harfang.homelinux.org>: > On Fri, Sep 21, 2012 at 01:53:29AM -0000, celes...@apache.org wrote: >> Author: celestin >> Date: Fri Sep 21 01:53:28 2012 >> New Revision: 1388296 >> >> URL: http://svn.apache.org/viewvc?rev=1388296&view=rev >> Log: >> In AbstractRealMatrix, removed empty abstract method copy() (specified in >> interface RealMatrix). > > I'm not sure that it's the preferrable option: specifying those abstract > methods made it possible to use the "@Override" annotation (under Java5 too). > > Now you have removed the annotation so that Continuum does not report > failures. Hence there is no compiler check anymore that a supposedly > inherited method indeed overrides one defined (or declared) in one of the > parent classes (or interfaces). >
I take your point. It just seems a lot of spurious code, solely to avoid using Java 6. I'd like to point out that I'm not sure this patttern is applied everywhere in the library (I'm pretty sure I've never done that). I think that even in AbstractRealMatrix, this pattern was not applied consistently (until this morning, that is). I will (quite reluctantly...) revert these changes. I guess it does not really matter anyway, because in a near future, I was going to propose that we merge RealMatrix and AbstractRealMatrix (like we did for RealVector and AbstractRealVector). Thanks for reviewing, Sébastien > > Regards, > Gilles > >> >> Modified: >> >> commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/AbstractRealMatrix.java >> >> commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/Array2DRowRealMatrix.java >> >> commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/BlockRealMatrix.java >> >> commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/OpenMapRealMatrix.java >> >> Modified: >> commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/AbstractRealMatrix.java >> URL: >> http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/AbstractRealMatrix.java?rev=1388296&r1=1388295&r2=1388296&view=diff >> ============================================================================== >> --- >> commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/AbstractRealMatrix.java >> (original) >> +++ >> commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/AbstractRealMatrix.java >> Fri Sep 21 01:53:28 2012 >> @@ -74,9 +74,6 @@ public abstract class AbstractRealMatrix >> } >> >> /** {@inheritDoc} */ >> - public abstract RealMatrix copy(); >> - >> - /** {@inheritDoc} */ >> public RealMatrix add(RealMatrix m) >> throws MatrixDimensionMismatchException { >> MatrixUtils.checkAdditionCompatible(this, m); >> >> Modified: >> commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/Array2DRowRealMatrix.java >> URL: >> http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/Array2DRowRealMatrix.java?rev=1388296&r1=1388295&r2=1388296&view=diff >> ============================================================================== >> --- >> commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/Array2DRowRealMatrix.java >> (original) >> +++ >> commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/Array2DRowRealMatrix.java >> Fri Sep 21 01:53:28 2012 >> @@ -145,7 +145,6 @@ public class Array2DRowRealMatrix extend >> } >> >> /** {@inheritDoc} */ >> - @Override >> public RealMatrix copy() { >> return new Array2DRowRealMatrix(copyOut(), false); >> } >> >> Modified: >> commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/BlockRealMatrix.java >> URL: >> http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/BlockRealMatrix.java?rev=1388296&r1=1388295&r2=1388296&view=diff >> ============================================================================== >> --- >> commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/BlockRealMatrix.java >> (original) >> +++ >> commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/BlockRealMatrix.java >> Fri Sep 21 01:53:28 2012 >> @@ -271,7 +271,6 @@ public class BlockRealMatrix extends Abs >> } >> >> /** {@inheritDoc} */ >> - @Override >> public BlockRealMatrix copy() { >> // create an empty matrix >> BlockRealMatrix copied = new BlockRealMatrix(rows, columns); >> >> Modified: >> commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/OpenMapRealMatrix.java >> URL: >> http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/OpenMapRealMatrix.java?rev=1388296&r1=1388295&r2=1388296&view=diff >> ============================================================================== >> --- >> commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/OpenMapRealMatrix.java >> (original) >> +++ >> commons/proper/math/trunk/src/main/java/org/apache/commons/math3/linear/OpenMapRealMatrix.java >> Fri Sep 21 01:53:28 2012 >> @@ -69,7 +69,6 @@ public class OpenMapRealMatrix extends A >> } >> >> /** {@inheritDoc} */ >> - @Override >> public OpenMapRealMatrix copy() { >> return new OpenMapRealMatrix(this); >> } >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org > For additional commands, e-mail: dev-h...@commons.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org