dxbjavid opened a new pull request, #324:
URL: https://github.com/apache/commons-math/pull/324

   Spotted while reading the ArrayRealVector/ArrayFieldVector subarray 
constructors: the `d.length < pos + size` check computes `pos + size` as int, 
so a large `pos` wraps it negative and the check is skipped. The constructor 
then throws a raw ArrayIndexOutOfBoundsException instead of the documented 
NumberIsTooLargeException, and the message reports the wrapped value. Widened 
the sum to long in all four constructors and added tests that fail without the 
change.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to