Skip to content

Commit

Permalink
Set type of FileAttribute for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkEWaite committed Jul 28, 2020
1 parent da85939 commit 1b69fc2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1821,7 +1821,7 @@ private File createTempFileInSystemDir(String prefix, String suffix) throws IOEx
return Files.createTempFile(prefix, suffix).toFile();
}
Set<PosixFilePermission> ownerOnly = PosixFilePermissions.fromString("rw-------");
FileAttribute fileAttribute = PosixFilePermissions.asFileAttribute(ownerOnly);
FileAttribute<Set<PosixFilePermission>> fileAttribute = PosixFilePermissions.asFileAttribute(ownerOnly);
return Files.createTempFile(prefix, suffix, fileAttribute).toFile();
}

Expand Down Expand Up @@ -1887,7 +1887,7 @@ File createTempFile(String prefix, String suffix) throws IOException {
return createTempFileInSystemDir(prefix, suffix);
}
Set<PosixFilePermission> ownerOnly = PosixFilePermissions.fromString("rw-------");
FileAttribute fileAttribute = PosixFilePermissions.asFileAttribute(ownerOnly);
FileAttribute<Set<PosixFilePermission>> fileAttribute = PosixFilePermissions.asFileAttribute(ownerOnly);
return Files.createTempFile(tmpPath, prefix, suffix, fileAttribute).toFile();
}

Expand Down

0 comments on commit 1b69fc2

Please sign in to comment.