Merge branch '3.2.x' into 3.3.x
Closes gh-42107
This commit is contained in:
@@ -440,7 +440,12 @@ public class Restarter {
|
||||
}
|
||||
|
||||
public Object getOrAddAttribute(String name, final ObjectFactory<?> objectFactory) {
|
||||
return this.attributes.computeIfAbsent(name, (ignore) -> objectFactory.getObject());
|
||||
Object value = this.attributes.get(name);
|
||||
if (value == null) {
|
||||
value = objectFactory.getObject();
|
||||
this.attributes.put(name, value);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object removeAttribute(String name) {
|
||||
|
||||
Reference in New Issue
Block a user