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:
Dave Borowitz
2015-06-09 15:38:57 -07:00
parent b63e4398b5
commit 03f5a6bb4f
2 changed files with 2 additions and 2 deletions

View File

@@ -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",