Skip to content

Commit

Permalink
Remove useless code
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieuancelin authored and alesj committed Sep 17, 2012
1 parent a5cf0fb commit 0bc8336
Showing 1 changed file with 1 addition and 8 deletions.
Expand Up @@ -16,21 +16,14 @@ public class RegistrySingletonProvider extends SingletonProvider
@Override
public <T> Singleton<T> create(Class<? extends T> type)
{
return new RegistrySingleton<T>(type);
return new RegistrySingleton<T>();
}

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 Class<? extends T> clazz;

public RegistrySingleton(Class<? extends T> clazz)
{
this.clazz = clazz;
}

public T get(String id)
{
T instance = store.get(id);
Expand Down

0 comments on commit 0bc8336

Please sign in to comment.