SpEL compiler creating bad byte code for some values that are added together via OpPlus [SPR-12426] #17032
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Milestone
Andy Clement opened SPR-12426 and commented
There is a problem with compilation of operands for the plus operator. If the types of the operands at runtime are strings but the statically determinable types are not strings, then a CHECKCAST is missed out during code gen and a verify error results. Simply example:
and the expression
object+' world'
. The expression will be compiled such that getObject() is called but it is declared to return an Object. When this happens an extra CHECKCAST is necessary during byte code generation to ensure the JVM knows it is really a string.Affects: 4.1.2
Issue Links:
Referenced from: commits 58756b0, e410129, 94ee763
Backported to: 4.1.9
The text was updated successfully, but these errors were encountered: