Skip to content

Commit 1495677

Browse files
junnacuijunna.cui
andcommitted
STRY50515803: Fixed NullPointerException when saving .jgitconfig file (#17)
Co-authored-by: junna.cui <[email protected]>
1 parent 6499bde commit 1495677

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
import java.io.IOException;
1818
import java.net.InetAddress;
1919
import java.net.UnknownHostException;
20-
//import java.nio.file.InvalidPathException;
20+
import java.nio.file.InvalidPathException;
2121
import java.nio.file.Path;
22-
//import java.nio.file.Paths;
22+
import java.nio.file.Paths;
2323
import java.security.AccessControlException;
2424
import java.security.AccessController;
2525
import java.security.PrivilegedAction;
@@ -117,7 +117,7 @@ public FileBasedConfig openUserConfig(Config parent, FS fs) {
117117
}
118118

119119
private Path getXDGConfigHome(FS fs) {
120-
/*String configHomePath = getenv(Constants.XDG_CONFIG_HOME);
120+
String configHomePath = getenv(Constants.XDG_CONFIG_HOME);
121121
if (StringUtils.isEmptyOrNull(configHomePath)) {
122122
configHomePath = new File(fs.userHome(), ".config") //$NON-NLS-1$
123123
.getAbsolutePath();
@@ -127,7 +127,7 @@ private Path getXDGConfigHome(FS fs) {
127127
} catch (InvalidPathException e) {
128128
LOG.error(JGitText.get().logXDGConfigHomeInvalid,
129129
configHomePath, e);
130-
}*/
130+
}
131131
return null;
132132
}
133133

0 commit comments

Comments
 (0)