Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

import java.util.ArrayList;
import java.util.Collection;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.HashMap;
import java.util.Map;

import org.springframework.cloud.context.scope.ScopeCache;

Expand All @@ -29,9 +29,9 @@
*/
public class ThreadLocalScopeCache implements ScopeCache {

private ThreadLocal<ConcurrentMap<String, Object>> data = new ThreadLocal<ConcurrentMap<String, Object>>() {
protected ConcurrentMap<String, Object> initialValue() {
return new ConcurrentHashMap<String, Object>();
private ThreadLocal<Map<String, Object>> data = new ThreadLocal<Map<String, Object>>() {
protected Map<String, Object> initialValue() {
return new HashMap<String, Object>();
}
};

Expand All @@ -40,7 +40,7 @@ public Object remove(String name) {
}

public Collection<Object> clear() {
ConcurrentMap<String, Object> map = this.data.get();
Map<String, Object> map = this.data.get();
Collection<Object> values = new ArrayList<Object>(map.values());
map.clear();
return values;
Expand Down