diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2010-05-28 14:30:27 -0700 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2010-05-28 14:32:22 -0700 |
commit | 4f346afa1a173c7fc864c119ba1cbb95bbc7edba (patch) | |
tree | 6e2303cf16bc44ccd35ca27f40ce328763eca8df /org.eclipse.jgit.iplog/src | |
parent | 072ad087ff274ed8e0bee2fc941ced3d82ff6f4f (diff) | |
download | jgit-4f346afa1a173c7fc864c119ba1cbb95bbc7edba.tar.gz jgit-4f346afa1a173c7fc864c119ba1cbb95bbc7edba.zip |
eclipse-ipzilla: Correctly parse result with empty last field
If the last field of our IPzilla query comes back empty, we were
skipping over and not including it in the result List, causing an
IndexOutOfBoundsException when it was read into our data model.
If the last field is empty, actually add the empty string.
Change-Id: Ib18b335990c73e036b185199d0004f4ffc395867
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'org.eclipse.jgit.iplog/src')
-rw-r--r-- | org.eclipse.jgit.iplog/src/org/eclipse/jgit/iplog/CSV.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/org.eclipse.jgit.iplog/src/org/eclipse/jgit/iplog/CSV.java b/org.eclipse.jgit.iplog/src/org/eclipse/jgit/iplog/CSV.java index 3f80c7d1fc..12dbf47f73 100644 --- a/org.eclipse.jgit.iplog/src/org/eclipse/jgit/iplog/CSV.java +++ b/org.eclipse.jgit.iplog/src/org/eclipse/jgit/iplog/CSV.java @@ -116,6 +116,8 @@ class CSV { } else if (line.charAt(p) == ',') { row.add(""); p++; + if (p == line.length()) + row.add(""); } else { int comma = line.indexOf(',', p); |