cstroe / svndumpapi

A Java library for manipulating a Subversion dump file.
GNU Affero General Public License v3.0
5 stars 1 forks source link

SvnDumpWriter never checks for an exception caught by PrintStream #40

Closed cstroe closed 8 years ago

cstroe commented 8 years ago

Based on the Java documentation, PrintStream never throws an IOException. This means that if there is a problem writing to the output stream, the SvnDumpWriter will never know, and won't terminate early.

This is a problem when piping input to CliConsumer and there is an error in the output stream (for example svnadmin load encounters unknown input), SvnDumpWriter will continue "writing" to the bad stream as if nothing ever happened.

We should check for the exception and throw it anew, or use another Stream that doesn't swallow exceptions.