Consistently open workbook in readonly mode
The itemreaders provided by this project are reading only. So it makes sense to open them with only read-only priviliges. We already did this for the streaming version of the itemreader. With this commit we also enable this for the regular itemreader. Closes: #128
This commit is contained in:
@@ -81,7 +81,7 @@ public class PoiItemReader<T> extends AbstractExcelItemReader<T> {
|
||||
protected void openExcelFile(final Resource resource, String password) throws Exception {
|
||||
if (resource.isFile()) {
|
||||
File file = resource.getFile();
|
||||
this.workbook = WorkbookFactory.create(file, password, false);
|
||||
this.workbook = WorkbookFactory.create(file, password, true);
|
||||
}
|
||||
else {
|
||||
this.inputStream = resource.getInputStream();
|
||||
|
||||
Reference in New Issue
Block a user