diff --git a/common/source/java/ch/systemsx/cisd/common/parser/DefaultParser.java b/common/source/java/ch/systemsx/cisd/common/parser/DefaultParser.java index e82a2b20af0c611a8871398c5814b85886454d29..e715fc77493fde65148d593540f464758b67dd06 100644 --- a/common/source/java/ch/systemsx/cisd/common/parser/DefaultParser.java +++ b/common/source/java/ch/systemsx/cisd/common/parser/DefaultParser.java @@ -80,7 +80,11 @@ public class DefaultParser<E> implements IParser<E> { throw new ParsingException(parserException, tokens, number); } - elements.add(object); + // Skip null values + if (null != object) + { + elements.add(object); + } } } lineTokenizer.destroy(); diff --git a/common/source/java/ch/systemsx/cisd/common/parser/IParserObjectFactory.java b/common/source/java/ch/systemsx/cisd/common/parser/IParserObjectFactory.java index 93fb8bf241db2cf80246672cdb08ff294c897850..894745a8178da788284d2d94dc0284afd9a8ec0c 100644 --- a/common/source/java/ch/systemsx/cisd/common/parser/IParserObjectFactory.java +++ b/common/source/java/ch/systemsx/cisd/common/parser/IParserObjectFactory.java @@ -53,7 +53,8 @@ public interface IParserObjectFactory<E> }; /** - * Parses given text line and returns an appropriate <i>Object</i>. + * Parses given text line and returns an appropriate <i>Object</i>. If null is return, the value + * is skipped. If an error is encountered, throw a ParserException. */ public E createObject(final String[] lineTokens) throws ParserException; } \ No newline at end of file