mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-10-28 03:55:20 +00:00
[JENKINS-42934] Avoid using new FileInputStream / new FileOutputStream
This commit is contained in:
1 parent
4948d6c556
commit
f0cd7ae8ff
41 files changed
+188
-159
No files matched your search
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user