Use Config.unset instead of setting to null
JGit's behavior around null values is ill-defined, particularly when serializing/deserializing configs. Don't depend on setting null actually working, and use unset instead. Change-Id: I995bb9fedda9b012adb655f27b125a033e84c35f
This commit is contained in:
@@ -88,7 +88,7 @@ public class InMemoryModule extends FactoryModule {
|
||||
cfg.setString("gerrit", null, "allProjects", "Test-Projects");
|
||||
cfg.setString("user", null, "name", "Gerrit Code Review");
|
||||
cfg.setString("user", null, "email", "gerrit@localhost");
|
||||
cfg.setString("cache", null, "directory", null);
|
||||
cfg.unset("cache", null, "directory");
|
||||
cfg.setString("index", null, "type", "lucene");
|
||||
cfg.setBoolean("index", "lucene", "testInmemory", true);
|
||||
cfg.setInt("index", "lucene", "testVersion",
|
||||
|
||||
Reference in New Issue
Block a user