Skip to content

Commit

Permalink
JENKINS-27183 Avoid deadlock when using build-monitor-plugin
Browse files Browse the repository at this point in the history
(cherry picked from commit fb5540e)
  • Loading branch information
fbelzunc authored and olivergondza committed Mar 30, 2015
1 parent 9bce209 commit f4611b7
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions core/src/main/java/hudson/model/AbstractItem.java
Expand Up @@ -216,6 +216,8 @@ protected void doSetName(String name) {
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
Expand Down Expand Up @@ -248,9 +250,6 @@ public Void call() throws IOException {
}
});


String oldName = this.name;
String oldFullName = getFullName();
File oldRoot = this.getRootDir();

doSetName(newName);
Expand Down Expand Up @@ -324,10 +323,9 @@ public Void call() throws IOException {
} catch (AbstractMethodError _) {
// ignore
}

ItemListener.fireLocationChange(this, oldFullName);
}
}
ItemListener.fireLocationChange(this, oldFullName);
}


Expand Down

0 comments on commit f4611b7

Please sign in to comment.