Skip to content
Permalink
Browse files
[JENKINS-34710] - PluginWrapper should not throw IOException if someb…
…ody enables the enabled plugin (#2327)
  • Loading branch information
oleg-nenashev committed May 11, 2016
1 parent 58a5d22 commit c83a8fdf0d048905928ba531d45527c1173f868d
Showing with 4 additions and 0 deletions.
  1. +4 −0 core/src/main/java/hudson/PluginWrapper.java
@@ -441,6 +441,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 c83a8fd

Please sign in to comment.