[
https://issues.apache.org/jira/browse/JEXL-448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gary D. Gregory resolved JEXL-448.
----------------------------------
Resolution: Fixed
> Engines caching misses local variables handling and global eviction
> capability.
> -------------------------------------------------------------------------------
>
> Key: JEXL-448
> URL: https://issues.apache.org/jira/browse/JEXL-448
> Project: Commons JEXL
> Issue Type: Bug
> Affects Versions: 3.5.0
> Reporter: Henri Biestro
> Assignee: Henri Biestro
> Priority: Minor
> Fix For: 3.6.0
>
>
> WHAT:
> 1. When setting a new class loader, JEXL should invalidate all 'uberspected'
> objects to avoid keeping strong references on classes that should be
> unloaded.
> The JXLT engine(s) cache(s) is/are detached from JEXL and can not be cleared
> leading to potential strong references being kept on objects that otherwise
> would be GCed.
> 2. An expression AST is dependent on the local variables that are accessed;
> caching expressions must be thus verify that the local variables are the
> same. This is especially true for interpolation strings that do quite often
> refer to local variables.
> HOW:
> 1. A Metacache class that keeps track of created caches through weak
> references allows cleaning them if & when necessary.
> 2. The Source class is augmented with the scope local variables so those are
> part of the equality/comparison constraints. The interpolation strings are
> also cached in the Engine cache, their TemplateEngine being transient.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)