[JENKINS-42934] Avoid using new FileInputStream / new FileOutputStream

This commit is contained in:
Stephen Connolly committed 2017-03-20 12:50:46 +00:00
1 parent 4948d6c556
commit f0cd7ae8ff
41 files changed
+188 -159

No files matched your search

+2 -1
View File
@@ -29,6 +29,7 @@ import hudson.PluginManager.PluginInstanceStore;
import hudson.model.AdministrativeMonitor;
import hudson.model.Api;
import hudson.model.ModelObject;
import java.nio.file.Files;
import jenkins.YesNoMaybe;
import jenkins.model.Jenkins;
import hudson.model.UpdateCenter;
@@ -495,7 +496,7 @@ public class PluginWrapper implements Comparable<PluginWrapper>, ModelObject {
*/
public void disable() throws IOException {
// creates an empty file
OutputStream os = new FileOutputStream(disableFile);
OutputStream os = Files.newOutputStream(disableFile.toPath());
os.close();
}