-
Bug
-
Resolution: Fixed
-
P3
-
9
-
b42
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8084693 | emb-9 | Alan Bateman | P3 | Resolved | Fixed | team |
1. We think that there is some kind of incompleteness in return value description. Found "Returns: the path" but it seems that it's not clearly what it is the same path which we are passing in first arg. We think that it will be good if you will make description more precise.
2. There is description of conditions in which SecurityException will be throwed:
"SecurityException - In the case of the default provider, the security manager's checkWrite method is invoked to check write access to file".
It sounds like "Each time checkWrite is called we get SecurityException".
In contrast to this spec you can find j.n.f.Files.setOwner(Path, UserPrincipal) spec and description of conditions in which SecurityException will be throwed:
"In the case of the default provider, and a security manager is installed, it denies RuntimePermission("accessUserInformation") or its checkWrite method denies write access to the file."
And this description is much clearer.
We think that it will be good if you will make description more precise in j.n.f.Files.setLastModifiedTime(Path, FileTime). And there is a lot of just the same unclear SecurityException specs in j.n.f.Files methods.
2. There is description of conditions in which SecurityException will be throwed:
"SecurityException - In the case of the default provider, the security manager's checkWrite method is invoked to check write access to file".
It sounds like "Each time checkWrite is called we get SecurityException".
In contrast to this spec you can find j.n.f.Files.setOwner(Path, UserPrincipal) spec and description of conditions in which SecurityException will be throwed:
"In the case of the default provider, and a security manager is installed, it denies RuntimePermission("accessUserInformation") or its checkWrite method denies write access to the file."
And this description is much clearer.
We think that it will be good if you will make description more precise in j.n.f.Files.setLastModifiedTime(Path, FileTime). And there is a lot of just the same unclear SecurityException specs in j.n.f.Files methods.
- backported by
-
JDK-8084693 (fs spec) Files.setLastModifiedTime should specify SecurityException more clearly
-
- Resolved
-