diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2019-08-10 23:48:42 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2019-08-10 23:57:21 +0200 |
commit | 65cee6ccbf0526e94f1cdb7fd06597c6ffa7c01a (patch) | |
tree | 302c09c6e72ac33c6a096e130673493bd8cd4706 | |
parent | a7338dd1e5173b081d0ec1a7f31f48ed34b07d70 (diff) | |
download | jgit-65cee6ccbf0526e94f1cdb7fd06597c6ffa7c01a.tar.gz jgit-65cee6ccbf0526e94f1cdb7fd06597c6ffa7c01a.zip |
Override FileBasedConfig's save method in MockConfig
This ensures we don't try to persist MockConfig using its superclasses
save() method which fails with an NPE since MockConfig has no backing
file.
Change-Id: Ifba2d24c9438bb30d3828ed31a4c131f940b45eb
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r-- | org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java index 8de386e344..abbbf32969 100644 --- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java +++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java @@ -81,6 +81,11 @@ public class MockSystemReader extends SystemReader { } @Override + public void save() throws IOException { + // Do nothing + } + + @Override public boolean isOutdated() { return false; } |