Ensure workbooks are closed after reading/writing
This commit is contained in:
parent
461b352035
commit
e2aa929908
@ -141,8 +141,8 @@ public class XlsExporter implements StreamExporter {
|
||||
project, engine, params, serializer);
|
||||
|
||||
wb.write(outputStream);
|
||||
wb.close();
|
||||
outputStream.flush();
|
||||
wb.close();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -117,6 +117,7 @@ public class ExcelImporter extends TabularImportingParserBase {
|
||||
}
|
||||
JSONUtilities.append(sheetRecords, sheetRecord);
|
||||
}
|
||||
wb.close();
|
||||
} finally {
|
||||
is.close();
|
||||
}
|
||||
@ -146,7 +147,6 @@ public class ExcelImporter extends TabularImportingParserBase {
|
||||
Workbook wb = null;
|
||||
if (!inputStream.markSupported()) {
|
||||
inputStream = new BufferedInputStream(inputStream);
|
||||
;
|
||||
}
|
||||
|
||||
try {
|
||||
|
@ -222,6 +222,7 @@ public class ExcelImporterTests extends ImporterTest {
|
||||
wb.write(outputStream);
|
||||
outputStream.flush();
|
||||
outputStream.close();
|
||||
wb.close();
|
||||
} catch (IOException e) {
|
||||
return null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user