未验证 提交 3a529636 编写于 作者: O Oleg Nenashev 提交者: GitHub

Merge pull request #3198 from johnou/contention-JENKINS-48505

[JENKINS-48505] - Invoke optimistic get before computeIfAbsent to avoid contention.
......@@ -2595,7 +2595,8 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
*/
@SuppressWarnings({"unchecked"})
public <T> ExtensionList<T> getExtensionList(Class<T> extensionType) {
return extensionLists.computeIfAbsent(extensionType, key -> ExtensionList.create(this, key));
ExtensionList<T> extensionList = extensionLists.get(extensionType);
return extensionList != null ? extensionList : extensionLists.computeIfAbsent(extensionType, key -> ExtensionList.create(this, key));
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册