mirror of
https://github.com/apache/poi.git
synced 2026-02-27 20:40:08 +08:00
sxssf workbook dispose no longer needed
This commit is contained in:
parent
fa9428511a
commit
1eee67fb8b
@ -53,12 +53,13 @@ public class DeferredGeneration {
|
||||
|
||||
try (FileOutputStream fileOut = new FileOutputStream("DeferredGeneration.xlsx")) {
|
||||
wb.write(fileOut);
|
||||
//writeAvoidingTempFiles was added as an experimental change in POI 5.1.0
|
||||
//wb.writeAvoidingTempFiles(fileOut);
|
||||
} finally {
|
||||
//the dispose call is necessary to ensure temp files are removed
|
||||
wb.dispose();
|
||||
// writeAvoidingTempFiles was added as an experimental change in POI 5.1.0
|
||||
// wb.writeAvoidingTempFiles(fileOut);
|
||||
}
|
||||
// finally {
|
||||
// the dispose call is no longer necessary to ensure temp files are removed
|
||||
// wb.dispose();
|
||||
// }
|
||||
System.out.println("wrote DeferredGeneration.xlsx");
|
||||
}
|
||||
}
|
||||
|
||||
@ -46,10 +46,11 @@ public class Outlining {
|
||||
|
||||
try (FileOutputStream fileOut = new FileOutputStream("outlining_collapsed.xlsx")) {
|
||||
wb2.write(fileOut);
|
||||
} finally {
|
||||
//the dispose call is necessary to ensure temp files are removed
|
||||
wb2.dispose();
|
||||
}
|
||||
// finally {
|
||||
// the dispose call is no longer necessary to ensure temp files are removed
|
||||
// wb2.dispose();
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user