Skip to content
Permalink
Browse files
[JENKINS-34710] - PluginWrapper should not throw IOException if someb…
…ody enables the enabled plugin (#2327)

(cherry picked from commit c83a8fd)
  • Loading branch information
oleg-nenashev authored and olivergondza committed May 25, 2016
1 parent c613143 commit baf831faf6ebf0b65b165b909575d26c8592c1a9
Showing with 4 additions and 0 deletions.
  1. +4 −0 core/src/main/java/hudson/PluginWrapper.java
@@ -451,6 +451,10 @@ public void releaseClassLoader() {
* Enables this plugin next time Jenkins runs.
*/
public void enable() throws IOException {
if (!disableFile.exists()) {
LOGGER.log(Level.FINEST, "Plugin {0} has been already enabled. Skipping the enable() operation", getShortName());
return;
}
if(!disableFile.delete())
throw new IOException("Failed to delete "+disableFile);
}

0 comments on commit baf831f

Please sign in to comment.