[ 
https://issues.apache.org/jira/browse/MATH-424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12916949#action_12916949
 ] 

Gilles commented on MATH-424:
-----------------------------

I knew about this one. I didn't "clone" because I figured out that one should 
be pretty pervert to fiddle with data coming from an exception. At that point, 
the only sane thing would be to examine/print the content...
So this is an optimization to avoid copying the data several times (see the 
accessor methods in the subclass {{MatrixDimensionMismatchException}}).


> MultiDimensionMismatchException.getWrongDimensions() fails to clone the array
> -----------------------------------------------------------------------------
>
>                 Key: MATH-424
>                 URL: https://issues.apache.org/jira/browse/MATH-424
>             Project: Commons Math
>          Issue Type: Bug
>            Reporter: Sebb
>
> MultiDimensionMismatchException.getWrongDimensions() returns a pointer to the 
> array, which allows callers to modify it.
> The constructor takes care to clone the input array, so presumably the getter 
> should do so too?
> Same applies to getExpectedDimensions()

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to