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
  • Loading branch information
fbelzunc committed Mar 9, 2015
1 parent e9bf4b7 commit fb5540e
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 fb5540e

Please sign in to comment.