diff options
author | Jonathan Nieder <jrn@google.com> | 2015-06-09 15:54:52 -0700 |
---|---|---|
committer | Jonathan Nieder <jrn@google.com> | 2015-06-09 15:58:12 -0700 |
commit | cd3d952ec66fa3de24faecc413398b97aa37dc18 (patch) | |
tree | 23d943e3cff7a17c14fcbddee14f73ed7ee6749c /org.eclipse.jgit/src | |
parent | a89dbbd87e587a8c123c96109136fee536322d1b (diff) | |
download | jgit-cd3d952ec66fa3de24faecc413398b97aa37dc18.tar.gz jgit-cd3d952ec66fa3de24faecc413398b97aa37dc18.zip |
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 <jrn@google.com>
Diffstat (limited to 'org.eclipse.jgit/src')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java | 2 |
1 files changed, 1 insertions, 1 deletions
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; } /** |