Skip to content

Commit bc57131

Browse files
fbelzuncolivergondza
authored andcommittedMar 31, 2015
JENKINS-27183 Avoid deadlock when using build-monitor-plugin
(cherry picked from commit fb5540e)
1 parent 0488078 commit bc57131

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed
 

‎core/src/main/java/hudson/model/AbstractItem.java

+3-5
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@ protected void doSetName(String name) {
215215
protected void renameTo(final String newName) throws IOException {
216216
// always synchronize from bigger objects first
217217
final ItemGroup parent = getParent();
218+
String oldName = this.name;
219+
String oldFullName = getFullName();
218220
synchronized (parent) {
219221
synchronized (this) {
220222
// sanity check
@@ -247,9 +249,6 @@ public Void call() throws IOException {
247249
}
248250
});
249251

250-
251-
String oldName = this.name;
252-
String oldFullName = getFullName();
253252
File oldRoot = this.getRootDir();
254253

255254
doSetName(newName);
@@ -323,10 +322,9 @@ public Void call() throws IOException {
323322
} catch (AbstractMethodError _) {
324323
// ignore
325324
}
326-
327-
ItemListener.fireLocationChange(this, oldFullName);
328325
}
329326
}
327+
ItemListener.fireLocationChange(this, oldFullName);
330328
}
331329

332330
public void movedTo(DirectlyModifiableTopLevelItemGroup destination, AbstractItem newItem, File destDir) throws IOException {

0 commit comments

Comments
 (0)
Please sign in to comment.