From cd3d952ec66fa3de24faecc413398b97aa37dc18 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Tue, 9 Jun 2015 15:54:52 -0700 Subject: Revert "Config: Distinguish between empty and null strings" This reverts commit 96eb3ee3976e7e9e3e118851fa614cce8a1f7d88, which broke Gerrit tests that set a config value to 'null', serialize the result, deserialize, and expect 'null' from Config.getString[1]. The intent of that commit was to make it possible to distinguish between an absent and an empty config value, which we'll have to do with a new method. Revert the behavior change. Keep the tests from 428cb23f2de8, since they test the behavior more precisely than the old tests did. [1] https://gerrit-review.googlesource.com/68452 Change-Id: Ie8042f380ea0e34e3203e1991aa0feb2e6e44641 Signed-off-by: Jonathan Nieder --- org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'org.eclipse.jgit/src') diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java index 16953bb340..e48386d024 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java @@ -1266,7 +1266,7 @@ public class Config { value.append((char) c); } - return value.toString(); + return value.length() > 0 ? value.toString() : null; } /** -- cgit v1.2.3