spring-framework/framework-docs/modules/ROOT
Sam Brannen 380184e85a Support SpEL compilation of #root or #this with non-public type
Prior to this commit, if a Spring Expression Language (SpEL) expression
referenced the root context object via the #root or #this variable, we
inserted a checkcast in the generated byte code that cast the object to
its concrete type. However if the root context object's type was
non-public, that resulted in an IllegalAccessError when the compiled
byte code was executed.

VariableReference.getValueInternal() already contains a solution for
global variables which inserts a checkcast to Object in the generated
byte code instead of to the object's concrete non-public type.

This commit therefore applies the same logic to #root (or #this when
used to reference the root context object) that is already applied to
global variables.

Closes gh-32356
2024-03-03 14:49:42 +01:00
..
assets/images Migrate Structure 2023-05-04 15:35:05 +01:00
examples Use include-code Macro 2023-05-04 15:35:05 +01:00
pages Support SpEL compilation of #root or #this with non-public type 2024-03-03 14:49:42 +01:00
partials/web Extract recurring asciidoc links to attributes, cleanup old doc files 2023-11-21 15:59:24 +01:00
nav.adoc Rename class-data-sharing.adoc to cds.adoc 2024-01-18 10:16:45 +01:00