When index == arrayLength, the array index is also out of bounds.
For this use case, a SpelEvaluationException should be thrown instead of
ArrayIndexOutOfBoundsException.
Comment From: sbrannen
Can you please provide a test case that fails before the change and passes after the change?
Comment From: JoyceZhan
Can you please provide a test case that fails before the change and passes after the change?
Test case is checked in, see to IndexerTests.java
Comment From: sbrannen
Test case is checked in, see to IndexerTests.java
Thanks for adding the test!
This PR breaks the build due to:
- a missing copyright header
- a missing blank link in the imports
- a missing newline at the end of the file
For future reference, please make sure you run ./gradlew check before pushing commits.
I'll fix those minor issues before merging.
Comment From: sbrannen
This has been merged into master in fde7b1e5454ed169719562234799941d9e409135, and I revised the test and moved it to PropertyAccessTests in 734ceed3012162513d0e65b0b31edb87f78bd3ab.
Thanks!