]> source.dussan.org Git - poi.git/commitdiff
bug 61840: close workbook to prevent resource leak in unit test
authorJaven O'Neal <onealj@apache.org>
Fri, 1 Dec 2017 17:51:19 +0000 (17:51 +0000)
committerJaven O'Neal <onealj@apache.org>
Fri, 1 Dec 2017 17:51:19 +0000 (17:51 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1816893 13f79535-47bb-0310-9956-ffa450edef68

src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetShiftRows.java

index 6bbfe0a9168982890f4e6f3200525024ea9364e1..3959d80694816efb08944e62790089351d671f13 100644 (file)
@@ -742,7 +742,7 @@ public abstract class BaseTestSheetShiftRows {
     }
     
     @Test
-    public void test61840_shifting_rows_up_does_not_produce_REF_errors() throws Exception {
+    public void test61840_shifting_rows_up_does_not_produce_REF_errors() throws IOException {
         Workbook wb = _testDataProvider.createWorkbook();
         Sheet sheet = wb.createSheet();
         Cell cell = sheet.createRow(4).createCell(0);
@@ -759,6 +759,8 @@ public abstract class BaseTestSheetShiftRows {
         Cell shiftedCell = sheet.getRow(3).getCell(0);
         assertNotNull(shiftedCell);
         assertEquals("(B4-C4)/B4", shiftedCell.getCellFormula());
+        
+        wb.close();
     }