Merged bug fix from Stable into Unstable
This commit is contained in:
commit
85bffe1dca
|
|
@ -89,10 +89,10 @@ public class TableCodec implements ReferenceDependentFeatureCodec {
|
||||||
boolean isFirst = true;
|
boolean isFirst = true;
|
||||||
while ((line = reader.readLine()) != null) {
|
while ((line = reader.readLine()) != null) {
|
||||||
System.out.println(line);
|
System.out.println(line);
|
||||||
if ( isFirst && ! line.startsWith(headerDelimiter) ) {
|
if ( isFirst && ! line.startsWith(headerDelimiter) && ! line.startsWith(commentDelimiter)) {
|
||||||
throw new UserException.MalformedFile("TableCodec file does not have a header");
|
throw new UserException.MalformedFile("TableCodec file does not have a header");
|
||||||
}
|
}
|
||||||
isFirst &= false;
|
isFirst &= line.startsWith(commentDelimiter);
|
||||||
if (line.startsWith(headerDelimiter)) {
|
if (line.startsWith(headerDelimiter)) {
|
||||||
if (header.size() > 0) throw new IllegalStateException("Input table file seems to have two header lines. The second is = " + line);
|
if (header.size() > 0) throw new IllegalStateException("Input table file seems to have two header lines. The second is = " + line);
|
||||||
String spl[] = line.split(delimiterRegex);
|
String spl[] = line.split(delimiterRegex);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue