-
Notifications
You must be signed in to change notification settings - Fork 38.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Increase scope of regex pattern cache for the SpEL matches
operator
#30140
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: backported
An issue that has been backported to maintenance branches
type: enhancement
A general enhancement
Milestone
Comments
sbrannen
added
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
labels
Mar 19, 2023
github-actions
bot
added
status: backported
An issue that has been backported to maintenance branches
and removed
for: backport-to-5.3.x
labels
Mar 19, 2023
izeye
added a commit
to izeye/spring-framework
that referenced
this issue
Mar 23, 2023
jgallimore
pushed a commit
to tomitribe/spring-framework
that referenced
this issue
Mar 31, 2023
Prior to this commit, the pattern cache for the SpEL `matches` operator only applied to expressions such as the following where the same `matches` operator is invoked multiple times with different input: "map.keySet().?[#this matches '.+xyz']" The pattern cache did not apply to expressions such as the following where the same pattern ('.+xyz') is used in multiple `matches` operations: "foo matches '.+xyz' AND bar matches '.+xyz'" This commit addresses this by moving the instance of the pattern cache map from OperatorMatches to InternalSpelExpressionParser so that the cache can be reused for all `matches` operations for the given parser. Closes spring-projectsgh-30140
jgallimore
pushed a commit
to tomitribe/spring-framework
that referenced
this issue
Mar 31, 2023
Prior to this commit, the pattern cache for the SpEL `matches` operator only applied to expressions such as the following where the same `matches` operator is invoked multiple times with different input: "map.keySet().?[#this matches '.+xyz']" The pattern cache did not apply to expressions such as the following where the same pattern ('.+xyz') is used in multiple `matches` operations: "foo matches '.+xyz' AND bar matches '.+xyz'" This commit addresses this by moving the instance of the pattern cache map from OperatorMatches to InternalSpelExpressionParser so that the cache can be reused for all `matches` operations for the given parser. Closes spring-projectsgh-30140
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: backported
An issue that has been backported to maintenance branches
type: enhancement
A general enhancement
The pattern cache for the SpEL
matches
operator only applies to expressions such as the following where the samematches
operator is invoked multiple times with different input:The pattern cache does not apply to expressions such as the following where the same pattern (
.+xyz
) is used in multiplematches
operations:We should increase the scope of the regex pattern cache for the SpEL
matches
operator so that the cache can be reused for allmatches
operations for the given parser.The text was updated successfully, but these errors were encountered: