Browse Source
If the determination of the user home directory produces a Java File object with an invalid path, spurious exceptions may occur at the most inopportune moments anytime later. In the case in the linked bug report, start-up of EGit failed, leading to numerous user-visible problems in Eclipse. So validate the return value of FS.userHomeImpl(). If converting that File to a Path throws an exception, log the problem and fall back to Java system property user.home. If that also is not valid, use null. (A null user home directory is allowed by FS, and calling in Java new File(null, "some_string") is fine and produces a File relative to the current working directory.) Bug: 563739 Change-Id: If9eec0f9a31a45bd815231706285c71b09f8cf56 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>master
Thomas Wolf
5 years ago
committed by
Matthias Sohn
3 changed files with 33 additions and 1 deletions
Loading…
Reference in new issue