projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove IOException from parser interface
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
text
/
SoneTextParser.java
diff --git
a/src/main/java/net/pterodactylus/sone/text/SoneTextParser.java
b/src/main/java/net/pterodactylus/sone/text/SoneTextParser.java
index
18ac467
..
18dd53f
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/text/SoneTextParser.java
+++ b/
src/main/java/net/pterodactylus/sone/text/SoneTextParser.java
@@
-118,7
+118,7
@@
public class SoneTextParser implements Parser<SoneTextParserContext> {
* {@inheritDoc}
*/
@Override
* {@inheritDoc}
*/
@Override
- public Iterable<Part> parse(SoneTextParserContext context, String source)
throws IOException
{
+ public Iterable<Part> parse(SoneTextParserContext context, String source) {
PartContainer parts = new PartContainer();
BufferedReader bufferedReader = new BufferedReader(new StringReader(source));
try {
PartContainer parts = new PartContainer();
BufferedReader bufferedReader = new BufferedReader(new StringReader(source));
try {
@@
-271,6
+271,9
@@
public class SoneTextParser implements Parser<SoneTextParserContext> {
}
lastLineEmpty = false;
}
}
lastLineEmpty = false;
}
+ } catch (IOException ioe1) {
+ // a buffered reader around a string reader should never throw.
+ throw new RuntimeException(ioe1);
} finally {
Closer.close(bufferedReader);
}
} finally {
Closer.close(bufferedReader);
}