Improve diagnostics in SpEL for large array creation (original) (raw)

Attempting to create a large array in a SpEL expression can result in an OutOfMemoryError. Although the JVM recovers from that, we should throw an exception with a meaningful error message in order to improve diagnostics for the user.