More java.io.File improvements.
Three themes to this change: not making unnecessary native calls (like the
pointless "exists" check in canWrite), being consistent in our
treatment of the empty path, and removing unnecessary cruft from the native
code.
I'm sure there must be a better implementation for handling the empty
path (the few methods for which it *isn't* invalid should be the special
cases, not every single method), but in this patch I'm just interested
in correctness.
With this patch, we pass the jtreg empty path test (which we previously
failed) and we pass my more complete test (added to FileTest.java in this
patch).
Bug: 2281992
3 files changed