add override annotation for ScopeCache child class
This commit is contained in:
committed by
Olga Maciaszek-Sharma
parent
d22b30b508
commit
483798a7d2
@@ -31,20 +31,24 @@ public class StandardScopeCache implements ScopeCache {
|
||||
|
||||
private final ConcurrentMap<String, Object> cache = new ConcurrentHashMap<String, Object>();
|
||||
|
||||
@Override
|
||||
public Object remove(String name) {
|
||||
return this.cache.remove(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<Object> clear() {
|
||||
Collection<Object> values = new ArrayList<Object>(this.cache.values());
|
||||
this.cache.clear();
|
||||
return values;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object get(String name) {
|
||||
return this.cache.get(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object put(String name, Object value) {
|
||||
Object result = this.cache.putIfAbsent(name, value);
|
||||
if (result != null) {
|
||||
|
||||
@@ -35,10 +35,12 @@ public class ThreadLocalScopeCache implements ScopeCache {
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public Object remove(String name) {
|
||||
return this.data.get().remove(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<Object> clear() {
|
||||
ConcurrentMap<String, Object> map = this.data.get();
|
||||
Collection<Object> values = new ArrayList<Object>(map.values());
|
||||
@@ -46,10 +48,12 @@ public class ThreadLocalScopeCache implements ScopeCache {
|
||||
return values;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object get(String name) {
|
||||
return this.data.get().get(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object put(String name, Object value) {
|
||||
Object result = this.data.get().putIfAbsent(name, value);
|
||||
if (result != null) {
|
||||
|
||||
Reference in New Issue
Block a user