Skip to content

Commit 9cbac98

Browse files
committed
Refined check for cache turnoff threshold
Issue: SPR-10803
1 parent e5aef5e commit 9cbac98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-core/src/main/java/org/springframework/util/AntPathMatcher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ protected AntPathStringMatcher getStringMatcher(String pattern) {
279279
}
280280
if (matcher == null) {
281281
matcher = new AntPathStringMatcher(pattern);
282-
if (cachePatterns == null && this.stringMatcherCache.size() == CACHE_TURNOFF_THRESHOLD) {
282+
if (cachePatterns == null && this.stringMatcherCache.size() >= CACHE_TURNOFF_THRESHOLD) {
283283
// Try to adapt to the runtime situation that we're encountering:
284284
// There are obviously too many different paths coming in here...
285285
// So let's turn off the cache since the patterns are unlikely to be reoccurring.

0 commit comments

Comments
 (0)