Fix NPE in SystemReader in tests
SystemReader.updateAll() must _not_ test whether the file exists. In
tests at least there are FileBasedConfigs with a null file. Test
configs should (and do) override isOutdated() to deal with this case.
Change-Id: I56303fe0d56afeb9f2203ee807a92c5dcf3809e9
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java
index 59184ff..e16a886 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java
@@ -428,9 +428,6 @@
updateAll(config.getBaseConfig());
if (config instanceof FileBasedConfig) {
FileBasedConfig cfg = (FileBasedConfig) config;
- if (!cfg.getFile().exists()) {
- return;
- }
if (cfg.isOutdated()) {
LOG.debug("loading config {}", cfg); //$NON-NLS-1$
cfg.load();