Improve diagnostics in SpEL for large array creation · spring-projects/spring-framework@90cfde9 · GitHub
Skip to content

Commit 90cfde9

Browse files
sbrannenbclozel
authored andcommitted
Improve diagnostics in SpEL for large array creation
Attempting to create a large array in a SpEL expression can result in an OutOfMemoryError. Although the JVM recovers from that, the error message is not very helpful to the user. This commit improves the diagnostics in SpEL for large array creation by throwing a SpelEvaluationException with a meaningful error message in order to improve diagnostics for the user. Closes gh-28257
1 parent 94f52bc commit 90cfde9

2 files changed

Lines changed: 29 additions & 4 deletions

File tree

‎spring-expression/src/main/java/org/springframework/expression/spel/SpelMessage.java‎

Lines changed: 7 additions & 2 deletions

‎spring-expression/src/main/java/org/springframework/expression/spel/ast/ConstructorReference.java‎

Lines changed: 22 additions & 2 deletions

0 commit comments

Comments
 (0)