diff --git a/common/source/java/ch/systemsx/cisd/common/parser/DefaultReaderParser.java b/common/source/java/ch/systemsx/cisd/common/parser/DefaultReaderParser.java index 89f5ce4fe160c2280d14b259c1b48ae97d2df73c..b7289b7bfd934c068ddfa93e4cb2ac33b2ea47f3 100644 --- a/common/source/java/ch/systemsx/cisd/common/parser/DefaultReaderParser.java +++ b/common/source/java/ch/systemsx/cisd/common/parser/DefaultReaderParser.java @@ -22,8 +22,6 @@ import java.io.Reader; import java.util.ArrayList; import java.util.List; -import ch.systemsx.cisd.common.exceptions.CheckedExceptionTunnel; - /** * A default <code>IReaderParser</code> implementation. * <p> @@ -97,12 +95,12 @@ public class DefaultReaderParser<E> implements IReaderParser<E> // Parser /////////////////////////////////////////////////////// - public final List<E> parse(Reader reader) + public final List<E> parse(Reader reader) throws IOException { return parse(reader, COMMENT_AND_EMPTY_LINE_FILTER); } - public final List<E> parse(Reader reader, ILineFilter lineFilter) + public final List<E> parse(Reader reader, ILineFilter lineFilter) throws IOException { BufferedReader bufferedReader; if (reader instanceof BufferedReader) @@ -135,9 +133,6 @@ public class DefaultReaderParser<E> implements IReaderParser<E> } } return elements; - } catch (IOException ex) - { - throw new CheckedExceptionTunnel(ex); } finally { // Destroys line tokenizer. diff --git a/common/source/java/ch/systemsx/cisd/common/parser/IReaderParser.java b/common/source/java/ch/systemsx/cisd/common/parser/IReaderParser.java index 4133346474913bae0dd0aa727d49893ba71b5511..f9e21c7312dac3ebb3fa5179d75d1206d661b32d 100644 --- a/common/source/java/ch/systemsx/cisd/common/parser/IReaderParser.java +++ b/common/source/java/ch/systemsx/cisd/common/parser/IReaderParser.java @@ -17,6 +17,7 @@ package ch.systemsx.cisd.common.parser; import java.io.BufferedReader; +import java.io.IOException; import java.io.Reader; import java.util.List; @@ -41,7 +42,7 @@ public interface IReaderParser<E> * @return a <code>List</code> of elements. * @throws CheckedExceptionTunnel if an <code>IOException</code> occurs. */ - public List<E> parse(Reader reader, ILineFilter lineFilter) throws CheckedExceptionTunnel; + public List<E> parse(Reader reader, ILineFilter lineFilter) throws IOException; /** * Parses given <code>Reader</code>. Encapsulates given <code>Reader</code> in a {@link BufferedReader} for @@ -53,7 +54,7 @@ public interface IReaderParser<E> * @return a <code>List</code> of elements. * @throws CheckedExceptionTunnel if an <code>IOException</code> occurs. */ - public List<E> parse(Reader reader) throws CheckedExceptionTunnel; + public List<E> parse(Reader reader) throws IOException; /** * Sets the <code>IParserObjectFactory</code>.