diff --git a/changelog.html b/changelog.html index fd32e27730dc9ad63733165d455fe71b9455a37e..0fcea88dbf26ca0a7548fee8ffa7545fb95e7ab0 100644 --- a/changelog.html +++ b/changelog.html @@ -70,9 +70,6 @@ Upcoming changes
  • Word-break links in build logs to preserve page width (pull 1308) -
  • - Synchronization issue during tool installation - (issue 17667)
  • Log rotation fails with "...looks to have already been deleted" (issue 22395) diff --git a/core/src/main/java/hudson/tools/InstallerTranslator.java b/core/src/main/java/hudson/tools/InstallerTranslator.java index b874761bc8bf01ba92dfaf15de4e08aaee60d184..39325d95bb5003eea37844ca30fd101ea70c82d1 100644 --- a/core/src/main/java/hudson/tools/InstallerTranslator.java +++ b/core/src/main/java/hudson/tools/InstallerTranslator.java @@ -50,22 +50,16 @@ public class InstallerTranslator extends ToolLocationTranslator { if (isp == null) { return null; } - for (ToolInstaller installer : isp.installers) { if (installer.appliesTo(node)) { - Map mutexByTool; - Semaphore semaphore; - - synchronized(mutexByNode) { - mutexByTool = mutexByNode.get(node); - if (mutexByTool == null) { - mutexByNode.put(node, mutexByTool = new WeakHashMap()); - mutexByTool.put(tool, semaphore = new Semaphore(1)); - } else { - semaphore = mutexByTool.get(tool); - } + Map mutexByTool = mutexByNode.get(node); + if (mutexByTool == null) { + mutexByNode.put(node, mutexByTool = new WeakHashMap()); + } + Semaphore semaphore = mutexByTool.get(tool); + if (semaphore == null) { + mutexByTool.put(tool, semaphore = new Semaphore(1)); } - semaphore.acquire(); try { return installer.performInstallation(tool, node, log).getRemote();