Issue #4269 - Restoring PrintWriter contract on errors

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
Joakim Erdfelt 2019-11-07 15:59:13 -06:00
parent b119a8f59f
commit c0866ebeae
No known key found for this signature in database
GPG Key ID: 2D0E1FB8FE4B68B4
1 changed files with 5 additions and 2 deletions

View File

@ -128,10 +128,13 @@ public class ResponseWriter extends PrintWriter
private void isOpen() throws IOException
{
if (_ioException != null)
throw new RuntimeIOException(_ioException);
throw _ioException;
if (_isClosed)
throw new EofException("Stream closed");
{
_ioException = new EofException("Stream closed");
throw _ioException;
}
}
@Override