Skip to content

Commit

Permalink
Merge pull request #1597 from fbelzunc/JENKINS-27183
Browse files Browse the repository at this point in the history
[FIXED JENKINS-27183] Avoid deadlock when using build-monitor-plugin
  • Loading branch information
olivergondza committed Mar 13, 2015
2 parents 8480016 + fb5540e commit 4edbb25
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 4edbb25

Please sign in to comment.