提交 182e99c2 编写于 作者: J Jesse Glick

@oleg-nenashev suggests making get/setBuildDiscarder synchronized.

上级 3c0d9449
......@@ -429,12 +429,12 @@ public abstract class Job<JobT extends Job<JobT, RunT>, RunT extends Run<JobT, R
/**
* Returns the configured build discarder for this job, via {@link BuildDiscarderProperty}, or null if none.
*/
public BuildDiscarder getBuildDiscarder() {
public synchronized BuildDiscarder getBuildDiscarder() {
BuildDiscarderProperty prop = getProperty(BuildDiscarderProperty.class);
return prop != null ? prop.getStrategy() : /* settings compatibility */ logRotator;
}
public void setBuildDiscarder(BuildDiscarder bd) throws IOException {
public synchronized void setBuildDiscarder(BuildDiscarder bd) throws IOException {
BulkChange bc = new BulkChange(this);
try {
removeProperty(BuildDiscarderProperty.class);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册