Skip to main content
diff options
authorShawn O. Pearce2010-04-15 01:39:19 +0000
committerShawn O. Pearce2010-04-15 01:39:19 +0000
commit5c780b387f5d2da42885907a58b6829f0f825263 (patch)
tree791325d6ea6e016754c89f4491aabcb578ad866a /org.eclipse.jgit.junit/src
parent6da38b9474f943b66c6594c58510aec234742669 (diff)
Fix unit tests using MockSystemReader with user configuation
Since cc905e7d4be "Make Repository.getConfig aware of changed config" its invalid to have a null result from FileBasedConfig.getFile(), as the path is used to stat the location on disk before returning the Config object from Repository.getConfig(). Mock out the isOutdated() method to return false all of the time in the mock test environment, so we don't crash with an NPE when this mock user configuration is being called. Change-Id: I0b4d9cbd346d5dc225ec12674da905c35457fa7c Signed-off-by: Shawn O. Pearce <>
Diffstat (limited to 'org.eclipse.jgit.junit/src')
1 files changed, 7 insertions, 1 deletions
diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/
index 306d432e63..b4f0b7e909 100644
--- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/
+++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/
@@ -70,7 +70,13 @@ public class MockSystemReader extends SystemReader {
public void load() throws IOException, ConfigInvalidException {
// Do nothing
- }};
+ }
+ @Override
+ public boolean isOutdated() {
+ return false;
+ }
+ };
private void init(final String n) {

Back to the top