Просмотр исходного кода

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>
tags/v0.8.1
Shawn O. Pearce 14 лет назад
Родитель
Сommit
4f346afa1a
1 измененных файлов: 2 добавлений и 0 удалений
  1. 2
    0
      org.eclipse.jgit.iplog/src/org/eclipse/jgit/iplog/CSV.java

+ 2
- 0
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);

Загрузка…
Отмена
Сохранить