Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[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 baf831f
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 @@ -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);
}
Expand Down

0 comments on commit baf831f

Please sign in to comment.