Skip to content

Commit 097959a

Browse files
committed
Merge remote-tracking branch 'origin/3.1.x'
2 parents 2eaaf28 + 483798a commit 097959a

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-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<>();
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<>(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
@@ -31,21 +31,25 @@ public class ThreadLocalScopeCache implements ScopeCache {
3131

3232
private ThreadLocal<ConcurrentMap<String, Object>> data = ThreadLocal.withInitial(ConcurrentHashMap::new);
3333

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

39+
@Override
3840
public Collection<Object> clear() {
3941
ConcurrentMap<String, Object> map = this.data.get();
4042
Collection<Object> values = new ArrayList<>(map.values());
4143
map.clear();
4244
return values;
4345
}
4446

47+
@Override
4548
public Object get(String name) {
4649
return this.data.get().get(name);
4750
}
4851

52+
@Override
4953
public Object put(String name, Object value) {
5054
Object result = this.data.get().putIfAbsent(name, value);
5155
if (result != null) {

spring-cloud-loadbalancer/src/main/java/org/springframework/cloud/loadbalancer/annotation/LoadBalancerClientSpecification.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public LoadBalancerClientSpecification(String name, Class<?>[] configuration) {
4242
this.configuration = configuration;
4343
}
4444

45+
@Override
4546
public String getName() {
4647
return this.name;
4748
}
@@ -51,6 +52,7 @@ public void setName(String name) {
5152
this.name = name;
5253
}
5354

55+
@Override
5456
public Class<?>[] getConfiguration() {
5557
return this.configuration;
5658
}

0 commit comments

Comments
 (0)