Skip to content

Commit

Permalink
[JENKINS-34710] - PluginWrapper should not throw IOException if someb…
Browse files Browse the repository at this point in the history
…ody enables the enabled plugin (#2327)
  • Loading branch information
oleg-nenashev committed May 11, 2016
1 parent 58a5d22 commit c83a8fd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/src/main/java/hudson/PluginWrapper.java
Expand Up @@ -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);
}
Expand Down

0 comments on commit c83a8fd

Please sign in to comment.