From 65cee6ccbf0526e94f1cdb7fd06597c6ffa7c01a Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Sat, 10 Aug 2019 23:48:42 +0200 Subject: [PATCH] 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 --- .../src/org/eclipse/jgit/junit/MockSystemReader.java | 5 +++++ 1 file changed, 5 insertions(+) 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 @@ -80,6 +80,11 @@ public class MockSystemReader extends SystemReader { // Do nothing } + @Override + public void save() throws IOException { + // Do nothing + } + @Override public boolean isOutdated() { return false; -- 2.39.5