[Schmitzm-commits] r2014 - trunk/schmitzm-core/src/main/java/de/schmitzm/regex

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Sat May 26 23:03:23 CEST 2012


Author: alfonx
Date: 2012-05-26 23:03:23 +0200 (Sat, 26 May 2012)
New Revision: 2014

Modified:
   trunk/schmitzm-core/src/main/java/de/schmitzm/regex/RegexCache.java
Log:


Modified: trunk/schmitzm-core/src/main/java/de/schmitzm/regex/RegexCache.java
===================================================================
--- trunk/schmitzm-core/src/main/java/de/schmitzm/regex/RegexCache.java	2012-05-26 21:02:17 UTC (rev 2013)
+++ trunk/schmitzm-core/src/main/java/de/schmitzm/regex/RegexCache.java	2012-05-26 21:03:23 UTC (rev 2014)
@@ -46,7 +46,7 @@
 
 	// TODO
 	// http://lucene.apache.org/solr/api/org/apache/solr/util/ConcurrentLRUCache.html#ConcurrentLRUCache%28int,%20int%29
-	private final ConcurrentHashMap<Pattern, ConcurrentHashMap<String, MyMatchResult>> matchers = new ConcurrentHashMap<Pattern, ConcurrentHashMap<String, MyMatchResult>>(
+	private final ConcurrentHashMap<Pattern, ConcurrentHashMap<String, MyMatchResult>> matcherResults = new ConcurrentHashMap<Pattern, ConcurrentHashMap<String, MyMatchResult>>(
 			CACHE_VALUES_TO_RESULT_SIZE);
 	// private final LimitedConcurrentHashMap<Pattern, LimitedConcurrentHashMap<String, MyMatchResult>> matchers = new
 	// LimitedConcurrentHashMap<Pattern, LimitedConcurrentHashMap<String, MyMatchResult>>(
@@ -186,10 +186,10 @@
 		final Pattern pattern = getPattern(regex);
 
 		ConcurrentHashMap<String, MyMatchResult> m;
-		synchronized (matchers) {
-			m = matchers.get(pattern);
+		synchronized (matcherResults) {
+			m = matcherResults.get(pattern);
 			if (m == null) {
-				matchers.put(pattern, m = new ConcurrentHashMap<String, MyMatchResult>(CACHE_VALUES_TO_RESULT_SIZE));
+				matcherResults.put(pattern, m = new ConcurrentHashMap<String, MyMatchResult>(CACHE_VALUES_TO_RESULT_SIZE));
 			}
 		}
 		// LimitedConcurrentHashMap<String, MyMatchResult> m;



More information about the Schmitzm-commits mailing list