Switch to ConcurrentHashMap for licenses.
This means that we shouldn't get any problems with concurrent access to licenses.
This commit is contained in:
parent
034fb3dd93
commit
c883de13d1
1 changed files with 2 additions and 1 deletions
|
@ -43,6 +43,7 @@ import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.StringTokenizer;
|
import java.util.StringTokenizer;
|
||||||
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
import com.sun.syndication.feed.impl.EqualsBean;
|
import com.sun.syndication.feed.impl.EqualsBean;
|
||||||
import com.sun.syndication.feed.impl.ToStringBean;
|
import com.sun.syndication.feed.impl.ToStringBean;
|
||||||
|
@ -53,7 +54,7 @@ import com.sun.syndication.feed.impl.ToStringBean;
|
||||||
*/
|
*/
|
||||||
public class License {
|
public class License {
|
||||||
private static final String CC_START = "http://creativecommons.org/licenses/";
|
private static final String CC_START = "http://creativecommons.org/licenses/";
|
||||||
private static final Map lookupLicense = new HashMap();
|
private static final Map lookupLicense = new ConcurrentHashMap();
|
||||||
public static final License NO_DERIVS = new License("http://creativecommons.org/licenses/nd/1.0/", new Behaviour[0], new Behaviour[] {
|
public static final License NO_DERIVS = new License("http://creativecommons.org/licenses/nd/1.0/", new Behaviour[0], new Behaviour[] {
|
||||||
Behaviour.DISTRIBUTION, Behaviour.REPRODUCTION });
|
Behaviour.DISTRIBUTION, Behaviour.REPRODUCTION });
|
||||||
public static final License NO_DERIVS_NONCOMMERCIAL = new License("http://creativecommons.org/licenses/nd-nc/1.0/",
|
public static final License NO_DERIVS_NONCOMMERCIAL = new License("http://creativecommons.org/licenses/nd-nc/1.0/",
|
||||||
|
|
Loading…
Reference in a new issue