Skip to content

Commit 483798a

Browse files
mroccyenOlgaMaciaszek
authored andcommitted
add override annotation for ScopeCache child class
1 parent d22b30b commit 483798a

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

spring-cloud-context/src/main/java/org/springframework/cloud/context/scope/StandardScopeCache.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,24 @@ public class StandardScopeCache implements ScopeCache {
3131

3232
private final ConcurrentMap<String, Object> cache = new ConcurrentHashMap<String, Object>();
3333

34+
@Override
3435
public Object remove(String name) {
3536
return this.cache.remove(name);
3637
}
3738

39+
@Override
3840
public Collection<Object> clear() {
3941
Collection<Object> values = new ArrayList<Object>(this.cache.values());
4042
this.cache.clear();
4143
return values;
4244
}
4345

46+
@Override
4447
public Object get(String name) {
4548
return this.cache.get(name);
4649
}
4750

51+
@Override
4852
public Object put(String name, Object value) {
4953
Object result = this.cache.putIfAbsent(name, value);
5054
if (result != null) {

spring-cloud-context/src/main/java/org/springframework/cloud/context/scope/thread/ThreadLocalScopeCache.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,25 @@ protected ConcurrentMap<String, Object> initialValue() {
3535
}
3636
};
3737

38+
@Override
3839
public Object remove(String name) {
3940
return this.data.get().remove(name);
4041
}
4142

43+
@Override
4244
public Collection<Object> clear() {
4345
ConcurrentMap<String, Object> map = this.data.get();
4446
Collection<Object> values = new ArrayList<Object>(map.values());
4547
map.clear();
4648
return values;
4749
}
4850

51+
@Override
4952
public Object get(String name) {
5053
return this.data.get().get(name);
5154
}
5255

56+
@Override
5357
public Object put(String name, Object value) {
5458
Object result = this.data.get().putIfAbsent(name, value);
5559
if (result != null) {

0 commit comments

Comments
 (0)