diff options
author | Andreas Beeker <kiwiwings@apache.org> | 2020-08-17 20:25:08 +0000 |
---|---|---|
committer | Andreas Beeker <kiwiwings@apache.org> | 2020-08-17 20:25:08 +0000 |
commit | b7b0a0c21579b38b8f1aa553eda35564cb01e3d2 (patch) | |
tree | 8f6d7afee458bdd761965d49f4a8ccb218022361 /src/ooxml | |
parent | f8040e5f8c0e74b064db13c93ec9c5025542848c (diff) | |
download | poi-b7b0a0c21579b38b8f1aa553eda35564cb01e3d2.tar.gz poi-b7b0a0c21579b38b8f1aa553eda35564cb01e3d2.zip |
Activate Forbidden-Apis-Check also for other tests
Max supported Java version is currently Java 14
Fix the check failures
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1880944 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/ooxml')
-rw-r--r-- | src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFWorkbook.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFWorkbook.java b/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFWorkbook.java index 9e592df284..efabb8c00e 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFWorkbook.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFWorkbook.java @@ -417,10 +417,8 @@ public final class TestSXSSFWorkbook extends BaseTestXWorkbook { private static void saveTwice(Workbook wb) throws Exception { for (int i = 0; i < 2; i++) { - try { - NullOutputStream out = new NullOutputStream(); + try (NullOutputStream out = new NullOutputStream()) { wb.write(out); - out.close(); } catch (Exception e) { throw new Exception("ERROR: failed on " + (i + 1) + "th time calling " + wb.getClass().getName() |