Change-Id: Ie14143f5be809a8c7e54fc7bc5f7f639d6da4ece
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/49269
Reviewed-by: Hudson CI
Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com>
Tested-by: Patrick Tasse <patrick.tasse@gmail.com>
fFile = source;
InputStream in = new FileInputStream(source);
- // Check if it's a GZIPInputStream.
- fInternalEntryStream = new GZIPInputStream(in);
+ try {
+ // Check if it's a GZIPInputStream.
+ fInternalEntryStream = new GZIPInputStream(in);
+ } catch (IOException e) {
+ in.close();
+ throw e;
+ }
String name = source.getName();
fEntry = new GzipEntry(name.substring(0, name.lastIndexOf(GZIP_EXTENSION)));
fCurEntry = fEntry;