mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +00:00
add "throws IOException" to java.io.File.createTempFile
This commit is contained in:
parent
f63d4584c2
commit
3111f07430
@ -35,11 +35,16 @@ public class File implements Serializable {
|
||||
this(parent.getPath() + FileSeparator + child);
|
||||
}
|
||||
|
||||
public static File createTempFile(String prefix, String suffix) {
|
||||
public static File createTempFile(String prefix, String suffix)
|
||||
throws IOException
|
||||
{
|
||||
return createTempFile(prefix, suffix, null);
|
||||
}
|
||||
|
||||
public static File createTempFile(String prefix, String suffix, File directory) {
|
||||
public static File createTempFile(String prefix, String suffix,
|
||||
File directory)
|
||||
throws IOException
|
||||
{
|
||||
if(directory == null) {
|
||||
directory = new File(System.getProperty("java.io.tmpdir"));
|
||||
}
|
||||
|
@ -21,7 +21,9 @@ public class Files {
|
||||
|
||||
}
|
||||
|
||||
private static void setExecutableTestWithPermissions(boolean executable) {
|
||||
private static void setExecutableTestWithPermissions(boolean executable)
|
||||
throws Exception
|
||||
{
|
||||
File file = File.createTempFile("avian.", null);
|
||||
file.setExecutable(executable);
|
||||
if (executable) {
|
||||
@ -33,7 +35,7 @@ public class Files {
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
public static void main(String[] args) throws Exception {
|
||||
isAbsoluteTest(true);
|
||||
isAbsoluteTest(false);
|
||||
setExecutableTestWithPermissions(true);
|
||||
|
Loading…
Reference in New Issue
Block a user