diff options
author | Jonathan Nieder <jrn@google.com> | 2015-06-09 19:45:33 -0400 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org <gerrit@eclipse.org> | 2015-06-09 19:45:34 -0400 |
commit | e75bc4321ab7dc5431dcd38481224eb6e2979133 (patch) | |
tree | 68055ccbe247071ee785bb8225ec00abbb6dc032 /org.eclipse.jgit.test | |
parent | 852cc71344a47a6ace5834bebac07a8efd7273b2 (diff) | |
parent | cd3d952ec66fa3de24faecc413398b97aa37dc18 (diff) | |
download | jgit-e75bc4321ab7dc5431dcd38481224eb6e2979133.tar.gz jgit-e75bc4321ab7dc5431dcd38481224eb6e2979133.zip |
Merge "Revert "Config: Distinguish between empty and null strings""
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java index b90a0c4671..6238a354d8 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java @@ -707,8 +707,8 @@ public class ConfigTest { assertEquals("0", c.getString("a", null, "x")); assertEquals(0, c.getInt("a", null, "x", 1)); - assertEquals("", c.getString("a", null, "y")); - assertArrayEquals(new String[]{""}, c.getStringList("a", null, "y")); + assertNull(c.getString("a", null, "y")); + assertArrayEquals(new String[]{null}, c.getStringList("a", null, "y")); try { c.getInt("a", null, "y", 1); } catch (IllegalArgumentException e) { @@ -730,9 +730,13 @@ public class ConfigTest { public void testEmptyValueAtEof() throws Exception { String text = "[a]\nx ="; Config c = parse(text); - assertEquals("", c.getString("a", null, "x")); + assertNull(c.getString("a", null, "x")); + assertArrayEquals(new String[]{null}, + c.getStringList("a", null, "x")); c = parse(text + "\n"); - assertEquals("", c.getString("a", null, "x")); + assertNull(c.getString("a", null, "x")); + assertArrayEquals(new String[]{null}, + c.getStringList("a", null, "x")); } private static void assertReadLong(long exp) throws ConfigInvalidException { |