From 9cbac985fbe20df1b0cce399dd238183de9befbc Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Wed, 30 Oct 2013 19:28:08 +0100 Subject: [PATCH] Refined check for cache turnoff threshold Issue: SPR-10803 --- .../src/main/java/org/springframework/util/AntPathMatcher.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-core/src/main/java/org/springframework/util/AntPathMatcher.java b/spring-core/src/main/java/org/springframework/util/AntPathMatcher.java index 3e2abc62a6..a4d5779e4c 100644 --- a/spring-core/src/main/java/org/springframework/util/AntPathMatcher.java +++ b/spring-core/src/main/java/org/springframework/util/AntPathMatcher.java @@ -279,7 +279,7 @@ public class AntPathMatcher implements PathMatcher { } if (matcher == null) { matcher = new AntPathStringMatcher(pattern); - if (cachePatterns == null && this.stringMatcherCache.size() == CACHE_TURNOFF_THRESHOLD) { + if (cachePatterns == null && this.stringMatcherCache.size() >= CACHE_TURNOFF_THRESHOLD) { // Try to adapt to the runtime situation that we're encountering: // There are obviously too many different paths coming in here... // So let's turn off the cache since the patterns are unlikely to be reoccurring.