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
This commit is contained in:
Dominik Stadler 2021-05-14 08:20:45 +00:00
parent d2cfa01471
commit 5b02df43b4
3 changed files with 10 additions and 8 deletions

View File

@ -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());
}

View File

@ -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() {
}
}

View File

@ -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")) {