Skip to content

Commit

Permalink
Use CHM instead of Hashtable.
Browse files Browse the repository at this point in the history
  • Loading branch information
alesj committed Oct 9, 2012
1 parent 7e8ed35 commit 196d316
Showing 1 changed file with 3 additions and 3 deletions.
@@ -1,7 +1,8 @@
package org.jboss.weld.bootstrap.api.helpers;

import java.util.Hashtable;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import org.jboss.weld.bootstrap.api.Singleton;
import org.jboss.weld.bootstrap.api.SingletonProvider;

Expand All @@ -21,8 +22,7 @@ public <T> Singleton<T> create(Class<? extends T> type)

private static class RegistrySingleton<T> implements Singleton<T>
{
// use Hashtable for concurrent access
private final Map<String, T> store = new Hashtable<String, T>();
private final Map<String, T> store = new ConcurrentHashMap<String, T>();

public T get(String id)
{
Expand Down

0 comments on commit 196d316

Please sign in to comment.