Made BdfDictionary and BdfList thread-safe.

This commit is contained in:
akwizgran
2016-01-19 11:03:27 +00:00
parent 77054cbae7
commit cd08867611
4 changed files with 12 additions and 10 deletions

View File

@@ -2,10 +2,11 @@ package org.briarproject.api.data;
import org.briarproject.api.FormatException;
import java.util.HashMap;
import java.util.Hashtable;
// This class is not thread-safe
public class BdfDictionary extends HashMap<String, Object> {
public class BdfDictionary extends Hashtable<String, Object> {
public static final Object NULL_VALUE = new Object();
public Boolean getBoolean(String key) throws FormatException {
Object o = get(key);