Skip to content

Commit b6e2b97

Browse files
committed
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
1 parent b3cbefb commit b6e2b97

File tree

1 file changed

+1
-1
lines changed
  • spring-batch-excel/src/main/java/org/springframework/batch/extensions/excel/poi

1 file changed

+1
-1
lines changed

spring-batch-excel/src/main/java/org/springframework/batch/extensions/excel/poi/PoiItemReader.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ protected void doClose() throws Exception {
8181
protected void openExcelFile(final Resource resource, String password) throws Exception {
8282
if (resource.isFile()) {
8383
File file = resource.getFile();
84-
this.workbook = WorkbookFactory.create(file, password, false);
84+
this.workbook = WorkbookFactory.create(file, password, true);
8585
}
8686
else {
8787
this.inputStream = resource.getInputStream();

0 commit comments

Comments
 (0)