On 14/02/2018 01:23, yumin qi wrote:
This looks much better but you've removed a permission check from the
Windows getUserPath implementation. That code the same permission check
as the resolve method in the Unix implementation.
I have update the webrev:
In this version, as suggested by Alan(thanks!), property of
"user.dir" is cached and behave like it is 'read only'. The change
made to *inux as well as windows. Since property of "user.dir" is
cached, any changes via property setting for it has no effect.
I think the test needs works. The simplest would be to call
getCanonicalFile before changing the system property, then call it after
and check that you an equal result. Also no need to hack the Properties
object, you can use System.setProperty instead.