/*******************************************************************************
 * Copyright (c) 2015 Eclipse RDF4J contributors, Aduna, and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Distribution License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/org/documents/edl-v10.php.
 *******************************************************************************/
package org.eclipse.rdf4j.workbench.util;

import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Map;

import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;

public class BasicServletConfig implements ServletConfig {

	private String name;

	private ServletContext context;

	private Hashtable<String, String> params;

	public BasicServletConfig(String name, ServletContext context) {
		this.name = name;
		this.context = context;
		params = new Hashtable<String, String>();
	}

	@SuppressWarnings("unchecked")
	public BasicServletConfig(String name, ServletConfig config) {
		this(name, config.getServletContext());
		Enumeration<String> e = config.getInitParameterNames();
		while (e.hasMoreElements()) {
			String param = e.nextElement();
			params.put(param, config.getInitParameter(param));
		}
	}

	public BasicServletConfig(String name, ServletConfig config, Map<String, String> params) {
		this(name, config);
		this.params.putAll(params);
	}

	public BasicServletConfig(String name, ServletContext context, Map<String, String> params) {
		this.name = name;
		this.context = context;
		this.params = new Hashtable<String, String>(params);
	}

	public String getServletName() {
		return name;
	}

	public ServletContext getServletContext() {
		return context;
	}

	public Enumeration<String> getInitParameterNames() {
		return params.keys();
	}

	public String getInitParameter(String name) {
		return params.get(name);
	}

}

@@ -575,25 +575,19 @@
 va.util.
-Hashtable
+Map
 ;%0Aimport
@@ -593,24 +593,49 @@
 t java.util.
+concurrent.ConcurrentHash
 Map;%0A%0Aimport
@@ -828,25 +828,33 @@
 private 
-Hashtable
+ConcurrentHashMap
 %3CString,
@@ -1002,32 +1002,26 @@
 new 
-Hashtable%3CString, String
+ConcurrentHashMap%3C
 %3E();
@@ -1662,46 +1662,58 @@
 new 
-Hashtable%3CString, String%3E(params);%0A%09%7D%0A
+ConcurrentHashMap%3C%3E(params);%0A%09%7D%0A%0A        @Override
 %0A%09pu
@@ -1758,24 +1758,42 @@
 n name;%0A%09%7D%0A%0A
+        @Override%0A
 %09public Serv
@@ -1843,24 +1843,42 @@
 ontext;%0A%09%7D%0A%0A
+        @Override%0A
 %09public Enum
@@ -1943,24 +1943,42 @@
 keys();%0A%09%7D%0A%0A
+        @Override%0A
 %09public Stri

use ConcurrentHashMap instead of Hashtable + added annotations