Skip to content

Commit

Permalink
Remove useless code
Browse files Browse the repository at this point in the history
Conflicts:
	weld-spi/src/main/java/org/jboss/weld/bootstrap/api/helpers/RegistrySingletonProvider.java
  • Loading branch information
mathieuancelin authored and jharting committed Jul 3, 2013
1 parent 7f39a7c commit 7eca5c9
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,13 @@ 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);
if (instance == null) {
Expand Down

0 comments on commit 7eca5c9

Please sign in to comment.