Repository navigation
Fall back to interpreted SpEL when compilation fails - #37468
Open
linghengqian wants to merge 1 commit into
Open
linghengqian wants to merge 1 commit into
linghengqian wants to merge 1 commit into
Conversation
Signed-off-by: Qiheng He <linghengqian@outlook.com>
linghengqian
force-pushed
the
spel-check
branch
from
October 13, 2026 09:59
d0421f6 to
a085dde
Compare
linghengqian
marked this pull request as ready for review
October 13, 2026 10:00
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
compilerModewas set toMIXEDorIMMEDIATE(e.g., due to aspring.expression.compiler.modeconfiguration or the parsing of an expression requiring compilation)—SpelCompilerwould attempt to calldefineClassto generateCompiledExpression00001upon the 100th evaluation (forMIXED) or the 2nd evaluation (forIMMEDIATE). GraalVM would then throw anUnsupportedFeatureError(which is anError, whereas the legacy code only caughtExceptiontypes); this caused the entire evaluation process to crash, resulting in the process receiving a raw internal Graal error.failedAttempts, expressions fall back to interpreted execution with correct results (verified: 15 OK), andMIXEDmode stops attempting compilation after 100 failures—aligning with the JVM behavior where non-compilable expressions fall back to the interpreter.IMMEDIATEmode also no longer leaks raw errors.defineClasssucceeds as expected on the JVM, so the fallback path is not triggered, and the full:spring-expression:testsuite passes.-H:+RuntimeClassLoading + Preserve,defineClasssucceeds; empirical testing confirms thatCompiledExpression00001is indeed generated and the compiled execution path is taken, ensuring the fallback logic is not inadvertently triggered.