mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-10-29 04:25:23 +00:00
make sure to close writer
This commit is contained in:
1 parent
e4ea2fa75c
commit
26f913baaa
1 file changed
+5
-2
@@ -1235,8 +1235,11 @@ public final class FilePath implements Serializable {
|
||||
}
|
||||
|
||||
Writer w = new FileWriter(f);
|
||||
w.write(contents);
|
||||
w.close();
|
||||
try {
|
||||
w.write(contents);
|
||||
} finally {
|
||||
w.close();
|
||||
}
|
||||
|
||||
return f.getAbsolutePath();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user