On 12/18/2015 04:07 PM, Phil Steitz wrote:
On 12/18/15 2:59 PM, Ole Ersoy wrote:
I think it makes sense.  If the destination array is too small,
throw an IAE.
Right.  That is what the implementations do - it is just a
specialized IAE.  We decided a while back not to throw "raw" IAE but
to use things like MatrixDimensionMismatchException which is what
AbstractFieldMatrix does for the case described in the javadoc.
Got it - thanks for the heads up.  So in this case should:

@throws MatrixDimensionMismatchException if the dimensions of
{@code destination} do not match those of {@code this}.

Be replaced with:
@throws MatrixDimensionMismatchException if the destination array is to small.

Which should replace the IAE?

Ole


Phil
Perhaps the implementations need to be updated.  I'm attempting to
modularize the linear package ATM so I'll have a closer look.

Cheers,
- Ole

On 12/18/2015 01:31 PM, Phil Steitz wrote:
It does not look to me like any implementation we have of this
interface actually throws raw IAE anywhere.  I think maybe it is the
javadoc that is wrong.

On 12/18/15 4:47 AM, l...@apache.org wrote:
Repository: commons-math
Updated Branches:
    refs/heads/master abb205795 -> 5566a21d2


Updated FieldMatrix exceptions thrown to match javadoc.

Github: closes #20


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit:
http://git-wip-us.apache.org/repos/asf/commons-math/commit/5566a21d
Tree:
http://git-wip-us.apache.org/repos/asf/commons-math/tree/5566a21d
Diff:
http://git-wip-us.apache.org/repos/asf/commons-math/diff/5566a21d

Branch: refs/heads/master
Commit: 5566a21d2b34090d1ce8129f41b551a1187e7d5b
Parents: abb2057
Author: Luc Maisonobe <l...@apache.org>
Authored: Fri Dec 18 12:47:13 2015 +0100
Committer: Luc Maisonobe <l...@apache.org>
Committed: Fri Dec 18 12:47:13 2015 +0100

----------------------------------------------------------------------

   src/main/java/org/apache/commons/math4/linear/FieldMatrix.java
| 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------



http://git-wip-us.apache.org/repos/asf/commons-math/blob/5566a21d/src/main/java/org/apache/commons/math4/linear/FieldMatrix.java

----------------------------------------------------------------------

diff --git
a/src/main/java/org/apache/commons/math4/linear/FieldMatrix.java
b/src/main/java/org/apache/commons/math4/linear/FieldMatrix.java
index 0db94b9..4c0ad9f 100644
---
a/src/main/java/org/apache/commons/math4/linear/FieldMatrix.java
+++
b/src/main/java/org/apache/commons/math4/linear/FieldMatrix.java
@@ -195,7 +195,7 @@ public interface FieldMatrix<T extends
FieldElement<T>> extends AnyMatrix {
       void copySubMatrix(int startRow, int endRow, int
startColumn, int endColumn,
                          T[][] destination)
       throws MatrixDimensionMismatchException,
NumberIsTooSmallException,
-    OutOfRangeException;
+    OutOfRangeException, IllegalArgumentException;
       /**
      * Copy a submatrix. Rows and columns are indicated

.

---------------------------------------------------------------------

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


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

Reply via email to