-
Notifications
You must be signed in to change notification settings - Fork 38.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support safe navigation operator with void methods in SpEL
Prior to this commit the Spring Expression Language (SpEL) was able to properly parse an expression that uses the safe navigation operator (?.) with a method that has a `void` return type (for example, "myObject?.doSomething()"); however, SpEL was not able to evaluate or compile such expressions. This commit addresses the evaluation issue by selectively not boxing the exit type descriptor (for inclusion in the generated bytecode) when the method's return type is `void`. This commit addresses the compilation issue by pushing a null object reference onto the stack in the generated byte code when the method's return type is `void`. Closes gh-27421
- Loading branch information
Showing
2 changed files
with
85 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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