提交 fb5540e3 编写于 作者: F Felix Belzunce Arcos

JENKINS-27183 Avoid deadlock when using build-monitor-plugin

上级 e9bf4b71
......@@ -216,6 +216,8 @@ public abstract class AbstractItem extends Actionable implements Item, HttpDelet
protected void renameTo(final String newName) throws IOException {
// always synchronize from bigger objects first
final ItemGroup parent = getParent();
String oldName = this.name;
String oldFullName = getFullName();
synchronized (parent) {
synchronized (this) {
// sanity check
......@@ -248,9 +250,6 @@ public abstract class AbstractItem extends Actionable implements Item, HttpDelet
}
});
String oldName = this.name;
String oldFullName = getFullName();
File oldRoot = this.getRootDir();
doSetName(newName);
......@@ -324,10 +323,9 @@ public abstract class AbstractItem extends Actionable implements Item, HttpDelet
} catch (AbstractMethodError _) {
// ignore
}
ItemListener.fireLocationChange(this, oldFullName);
}
}
ItemListener.fireLocationChange(this, oldFullName);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册