You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2021/03/22 09:40:08 UTC
[struts] branch master updated: Fix: remove contention during
localized text lookup (JDK 1.8+)
This is an automated email from the ASF dual-hosted git repository.
lukaszlenart pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/struts.git
The following commit(s) were added to refs/heads/master by this push:
new 83c2354 Fix: remove contention during localized text lookup (JDK 1.8+)
new ca99c7b Merge pull request #476 from davoustp/contention-in-localized-resources-2.6.x
83c2354 is described below
commit 83c2354bb3ba1532dab3ad716710fe9715272657
Author: Pascal Davoust <pa...@eptica.com>
AuthorDate: Mon Mar 15 11:53:13 2021 +0100
Fix: remove contention during localized text lookup (JDK 1.8+)
---
.../com/opensymphony/xwork2/util/AbstractLocalizedTextProvider.java | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/core/src/main/java/com/opensymphony/xwork2/util/AbstractLocalizedTextProvider.java b/core/src/main/java/com/opensymphony/xwork2/util/AbstractLocalizedTextProvider.java
index d197d05..fabb89c 100644
--- a/core/src/main/java/com/opensymphony/xwork2/util/AbstractLocalizedTextProvider.java
+++ b/core/src/main/java/com/opensymphony/xwork2/util/AbstractLocalizedTextProvider.java
@@ -31,8 +31,6 @@ import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.text.MessageFormat;
-import java.util.Collections;
-import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
@@ -65,7 +63,7 @@ abstract class AbstractLocalizedTextProvider implements LocalizedTextProvider {
private final ConcurrentMap<MessageFormatKey, MessageFormat> messageFormats = new ConcurrentHashMap<>();
private final ConcurrentMap<Integer, List<String>> classLoaderMap = new ConcurrentHashMap<>();
- private final Set<String> missingBundles = Collections.synchronizedSet(new HashSet<String>());
+ private final Set<String> missingBundles = ConcurrentHashMap.newKeySet();
private final ConcurrentMap<Integer, ClassLoader> delegatedClassLoaderMap = new ConcurrentHashMap<>();
/**