Fix unreleased stream resources
Some streams were not properly closed.
1. ProtoGen:
The OutputStream returned by lock.getOutputStream() was not closed in
case the instantiation of OutputStreamWriter failed with an
IOException.
2. InitUtil:
The InputStream was never closed. IO.readWholeStream(...) says that it
is the responsibility of the caller to close the stream.
3. Libraries:
The InputStream was not closed in case the instantiation of
InputStreamReader failed with an IOException.
4. JythonShell:
The InputStream was never closed.
5. LogFileCompressor:
The FileOuputStream was not closed in case the instantiation of
GZIPOutputStream failed with an IOException.
6. Version:
The InputStream was not closed in case the instantiation of
InputStreamReader failed with an IOException.
7. PrologCompiler:
The FileOutputStream was not closed in case the instantiation of
JarOutputStream failed with an IOException.
8. EncryptedContactStore:
The FileInputStream was not closed in case
PGPUtil.getDecoderStream(in) failed with an IOException.
9. HttpContactStoreConnection:
The OutputStream was not closed in case out.write(body) failed with an
IOException.
Change-Id: I05e10ab67b2daaf85b9324a13c8c8daf510545f7
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
9 files changed