Mercurial > hg > monetdb-java
diff src/main/java/nl/cwi/monetdb/mcl/parser/HeaderLineParser.java @ 116:04c535b05c52
Fixed negative number parsing on the StartOfHeaderParser
author | Pedro Ferreira <pedro.ferreira@monetdbsolutions.com> |
---|---|
date | Thu, 16 Feb 2017 11:07:55 +0100 (2017-02-16) |
parents | 839ffec1d36d |
children | a030c3e53cf5 |
line wrap: on
line diff
--- a/src/main/java/nl/cwi/monetdb/mcl/parser/HeaderLineParser.java +++ b/src/main/java/nl/cwi/monetdb/mcl/parser/HeaderLineParser.java @@ -157,6 +157,10 @@ public class HeaderLineParser extends MC * Returns an array of ints containing the values between * ',\t' separators. * + * Feb2017 note - This integer parser doesn't have to parse negative + * numbers, because it is only used to parse column lengths + * which is always greater than 0. + * * @param chrLine a character array holding the input data * @param start where the relevant data starts * @param stop where the relevant data stops @@ -171,7 +175,6 @@ public class HeaderLineParser extends MC if (chrLine[i] == ',' && chrLine[i + 1] == '\t') { intValues[elem++] = tmp; tmp = 0; - start = i++; } else { tmp *= 10; // note: don't use Character.isDigit() here, because