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:
		| @@ -189,7 +189,7 @@ public class GerritServer { | ||||
|     cfg.setString("httpd", null, "listenUrl", url); | ||||
|     cfg.setString("sshd", null, "listenAddress", forceEphemeralPort); | ||||
|     cfg.setBoolean("sshd", null, "testUseInsecureRandom", true); | ||||
|     cfg.setString("cache", null, "directory", null); | ||||
|     cfg.unset("cache", null, "directory"); | ||||
|     cfg.setString("gerrit", null, "basePath", "git"); | ||||
|     cfg.setBoolean("sendemail", null, "enable", true); | ||||
|     cfg.setInt("sendemail", null, "threadPoolSize", 0); | ||||
|   | ||||
| @@ -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
	 Dave Borowitz
					Dave Borowitz