Refined check for cache turnoff threshold

Issue: SPR-10803
master
Juergen Hoeller 11 years ago
parent e5aef5ee9d
commit 9cbac985fb
  1. 2
      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.

Loading…
Cancel
Save