From: Dominik Stadler Date: Fri, 14 May 2021 08:20:45 +0000 (+0000) Subject: Try to fix compiling on some CI-runs to support all active types of JDKs X-Git-Tag: REL_5_1_0~209 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5b02df43b4d072300baedcf4fafaccdd7a9daa66;p=poi.git Try to fix compiling on some CI-runs to support all active types of JDKs git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1889885 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/streaming/TestDeferredSXSSFWorkbook.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/streaming/TestDeferredSXSSFWorkbook.java index 74df887a50..92cbd37ef2 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xssf/streaming/TestDeferredSXSSFWorkbook.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/streaming/TestDeferredSXSSFWorkbook.java @@ -58,8 +58,8 @@ public final class TestDeferredSXSSFWorkbook extends BaseTestXWorkbook { */ @Override @Test - protected void cloneSheet() throws IOException { - RuntimeException e = assertThrows(RuntimeException.class, () -> super.cloneSheet()); + public void cloneSheet() throws IOException { + RuntimeException e = assertThrows(RuntimeException.class, super::cloneSheet); assertEquals("Not Implemented", e.getMessage()); } @@ -68,8 +68,8 @@ public final class TestDeferredSXSSFWorkbook extends BaseTestXWorkbook { */ @Override @Test - protected void sheetClone() throws IOException { - RuntimeException e = assertThrows(RuntimeException.class, () -> super.sheetClone()); + public void sheetClone() { + RuntimeException e = assertThrows(RuntimeException.class, super::sheetClone); assertEquals("Not Implemented", e.getMessage()); } diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/streaming/TestSXSSFWorkbook.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/streaming/TestSXSSFWorkbook.java index 17c4eec074..88bf9b417d 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xssf/streaming/TestSXSSFWorkbook.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/streaming/TestSXSSFWorkbook.java @@ -72,7 +72,7 @@ public final class TestSXSSFWorkbook extends BaseTestXWorkbook { */ @Override @Test - protected void cloneSheet() throws IOException { + public void cloneSheet() throws IOException { RuntimeException e = assertThrows(RuntimeException.class, super::cloneSheet); assertEquals("Not Implemented", e.getMessage()); } @@ -82,7 +82,7 @@ public final class TestSXSSFWorkbook extends BaseTestXWorkbook { */ @Override @Test - protected void sheetClone() { + public void sheetClone() { RuntimeException e = assertThrows(RuntimeException.class, super::sheetClone); assertEquals("Not Implemented", e.getMessage()); } @@ -358,6 +358,7 @@ public final class TestSXSSFWorkbook extends BaseTestXWorkbook { @Disabled("Crashes the JVM because of documented JVM behavior with concurrent writing/reading of zip-files, " + "see http://www.oracle.com/technetwork/java/javase/documentation/overview-156328.html") + @Test void bug53515a() throws Exception { File out = new File("Test.xlsx"); assertTrue(!out.exists() || out.delete()); @@ -528,6 +529,7 @@ public final class TestSXSSFWorkbook extends BaseTestXWorkbook { } @Disabled("not implemented") + @Test void changeSheetNameWithSharedFormulas() { } } diff --git a/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestWorkbook.java b/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestWorkbook.java index a38ec3448f..b70ea3402b 100644 --- a/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestWorkbook.java +++ b/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestWorkbook.java @@ -441,7 +441,7 @@ public abstract class BaseTestWorkbook { } @Test - protected void cloneSheet() throws IOException { + public void cloneSheet() throws IOException { try (Workbook book = _testDataProvider.createWorkbook()) { Sheet sheet = book.createSheet("TEST"); sheet.createRow(0).createCell(0).setCellValue("Test"); @@ -804,7 +804,7 @@ public abstract class BaseTestWorkbook { } @Test - protected void sheetClone() throws IOException { + public void sheetClone() throws IOException { // First up, try a simple file try (Workbook b = _testDataProvider.createWorkbook(); Workbook bBack = HSSFTestDataSamples.openSampleWorkbook("SheetWithDrawing.xls")) {