making findbugs happier

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@11273 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2008-08-06 16:50:03 +00:00
1 parent bea24634eb
commit 8baf9682c0
1 file changed
+2 -6
+2 -6
View File
@@ -682,15 +682,11 @@ public final class FilePath implements Serializable {
File f = new File(remote);
f.getParentFile().mkdirs();
FileOutputStream fos = new FileOutputStream(f);
Writer w = encoding != null ? new OutputStreamWriter(fos, encoding) : new OutputStreamWriter(fos);
try {
Writer w;
if(encoding!=null)
w = new OutputStreamWriter(fos, encoding);
else
w = new OutputStreamWriter(fos);
w.write(content);
} finally {
fos.close();
w.close();
}
return null;
}