Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestHyperlink.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestHyperlink.java?rev=1885281&r1=1885280&r2=1885281&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestHyperlink.java (original) +++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestHyperlink.java Fri Jan 8 23:50:02 2021 @@ -103,7 +103,7 @@ public abstract class BaseTestHyperlink // copy a hyperlink via the copy constructor @Test - public void testCopyHyperlink() throws IOException { + void testCopyHyperlink() throws IOException { final Workbook wb = _testDataProvider.createWorkbook(); final CreationHelper createHelper = wb.getCreationHelper();
Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestNamedRange.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestNamedRange.java?rev=1885281&r1=1885280&r2=1885281&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestNamedRange.java (original) +++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestNamedRange.java Fri Jan 8 23:50:02 2021 @@ -605,7 +605,7 @@ public abstract class BaseTestNamedRange } @Test - public void testBug56930() throws IOException { + void testBug56930() throws IOException { Workbook wb = _testDataProvider.createWorkbook(); // x1 on sheet1 defines "x=1" @@ -638,7 +638,7 @@ public abstract class BaseTestNamedRange // bug 56781: name validation only checks for first character's validity and presence of spaces // bug 60246: validate name does not allow DOT in named ranges @Test - public void testValid() throws IOException { + void testValid() throws IOException { Workbook wb = _testDataProvider.createWorkbook(); Name name = wb.createName(); @@ -658,7 +658,7 @@ public abstract class BaseTestNamedRange } @Test - public void testInvalid() { + void testInvalid() { Workbook wb = _testDataProvider.createWorkbook(); Name name = wb.createName(); Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestPicture.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestPicture.java?rev=1885281&r1=1885280&r2=1885281&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestPicture.java (original) +++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestPicture.java Fri Jan 8 23:50:02 2021 @@ -104,7 +104,7 @@ public abstract class BaseTestPicture { @Test - public void testResizeNoColumns() throws IOException { + void testResizeNoColumns() throws IOException { try (Workbook wb = _testDataProvider.createWorkbook()) { Sheet sheet = wb.createSheet(); @@ -115,7 +115,7 @@ public abstract class BaseTestPicture { } @Test - public void testResizeWithColumns() throws IOException { + void testResizeWithColumns() throws IOException { try (Workbook wb = _testDataProvider.createWorkbook()) { Sheet sheet = wb.createSheet(); Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestRangeCopier.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestRangeCopier.java?rev=1885281&r1=1885280&r2=1885281&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestRangeCopier.java (original) +++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestRangeCopier.java Fri Jan 8 23:50:02 2021 @@ -90,7 +90,7 @@ public abstract class BaseTestRangeCopie } @Test - public void testEmptyRow() { + void testEmptyRow() { // leave some rows empty in-between Row row = sheet1.createRow(23); row.createCell(0).setCellValue(1.2); @@ -104,7 +104,7 @@ public abstract class BaseTestRangeCopie } @Test - public void testSameSheet() { + void testSameSheet() { // leave some rows empty in-between Row row = sheet1.createRow(23); row.createCell(0).setCellValue(1.2); @@ -119,7 +119,7 @@ public abstract class BaseTestRangeCopie } @Test - public void testCopyStyles() { + void testCopyStyles() { String cellContent = "D6 aligned to the right"; HorizontalAlignment toTheRight = HorizontalAlignment.RIGHT; // create cell with content aligned to the right @@ -138,7 +138,7 @@ public abstract class BaseTestRangeCopie } @Test - public void testMergedRanges() { + void testMergedRanges() { String cellContent = "D6 merged to E7"; // create cell merged from D6 to E7 Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestRow.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestRow.java?rev=1885281&r1=1885280&r2=1885281&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestRow.java (original) +++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestRow.java Fri Jan 8 23:50:02 2021 @@ -46,7 +46,7 @@ public abstract class BaseTestRow { } @Test - public void testLastAndFirstColumns() throws IOException { + void testLastAndFirstColumns() throws IOException { Workbook workbook = _testDataProvider.createWorkbook(); Sheet sheet = workbook.createSheet(); Row row = sheet.createRow(0); @@ -76,7 +76,7 @@ public abstract class BaseTestRow { * This test was added in response to bug report 44987. */ @Test - public void testBoundsInMultipleRows() throws IOException { + void testBoundsInMultipleRows() throws IOException { Workbook workbook = _testDataProvider.createWorkbook(); Sheet sheet = workbook.createSheet(); Row rowA = sheet.createRow(0); @@ -102,7 +102,7 @@ public abstract class BaseTestRow { } @Test - public void testRemoveCell() throws IOException { + void testRemoveCell() throws IOException { Workbook wb1 = _testDataProvider.createWorkbook(); { Sheet sheet = wb1.createSheet(); @@ -145,7 +145,7 @@ public abstract class BaseTestRow { } @Test - public void testRowBounds() throws IOException { + void testRowBounds() throws IOException { int maxRowNum = _testDataProvider.getSpreadsheetVersion().getLastRowIndex(); try (Workbook workbook = _testDataProvider.createWorkbook()) { Sheet sheet = workbook.createSheet(); @@ -201,7 +201,7 @@ public abstract class BaseTestRow { * number on the row */ @Test - public void testLastCellNumIsCorrectAfterAddCell_bug43901() throws IOException { + void testLastCellNumIsCorrectAfterAddCell_bug43901() throws IOException { Workbook workbook = _testDataProvider.createWorkbook(); Sheet sheet = workbook.createSheet("test"); Row row = sheet.createRow(0); @@ -223,7 +223,7 @@ public abstract class BaseTestRow { * Tests for the missing/blank cell policy stuff */ @Test - public void testGetCellPolicy() throws IOException { + void testGetCellPolicy() throws IOException { Workbook workbook = _testDataProvider.createWorkbook(); Sheet sheet = workbook.createSheet("test"); Row row = sheet.createRow(0); @@ -295,7 +295,7 @@ public abstract class BaseTestRow { } @Test - public void testRowHeight() throws IOException { + protected void testRowHeight() throws IOException { Workbook wb1 = _testDataProvider.createWorkbook(); Sheet sheet = wb1.createSheet(); Row row1 = sheet.createRow(0); @@ -351,7 +351,7 @@ public abstract class BaseTestRow { * Test adding cells to a row in various places and see if we can find them again. */ @Test - public void testCellIterator() throws IOException { + void testCellIterator() throws IOException { Workbook wb = _testDataProvider.createWorkbook(); Sheet sheet = wb.createSheet(); Row row = sheet.createRow(0); @@ -409,7 +409,7 @@ public abstract class BaseTestRow { } @Test - public void testRowStyle() throws IOException { + void testRowStyle() throws IOException { Workbook wb1 = _testDataProvider.createWorkbook(); Sheet sheet = wb1.createSheet("test"); Row row1 = sheet.createRow(0); @@ -452,7 +452,7 @@ public abstract class BaseTestRow { } @Test - public void testCellShiftingRight() { + protected void testCellShiftingRight() { Workbook wb = _testDataProvider.createWorkbook(); Sheet sheet = wb.createSheet("sheet1"); Row row = sheet.createRow(0); @@ -481,8 +481,9 @@ public abstract class BaseTestRow { Cell c1 = row.getCell(2); assertNull(c1); } + @Test - public void testCellShiftingLeft() { + protected void testCellShiftingLeft() { Workbook wb = _testDataProvider.createWorkbook(); Sheet sheet = wb.createSheet("sheet1"); Row row = sheet.createRow(0); @@ -511,7 +512,7 @@ public abstract class BaseTestRow { } @Test - public void testLastRowEmptySheet() { + void testLastRowEmptySheet() { Workbook wb = _testDataProvider.createWorkbook(); Sheet sheet = wb.createSheet("sheet1"); @@ -523,7 +524,7 @@ public abstract class BaseTestRow { } @Test - public void testFirstRowEmptySheet() { + void testFirstRowEmptySheet() { Workbook wb = _testDataProvider.createWorkbook(); Sheet sheet = wb.createSheet("sheet1"); Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java?rev=1885281&r1=1885280&r2=1885281&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java (original) +++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java Fri Jan 8 23:50:02 2021 @@ -756,7 +756,7 @@ public abstract class BaseTestSheet { } @Test - public void testGetSetMargin() throws IOException { + void testGetSetMargin() throws IOException { double[] defaultMargins = (getClass().getName().contains("xssf")) ? new double[]{0.7, 0.7, 0.75, 0.75, 0.3, 0.3} : new double[]{0.75, 0.75, 1.0, 1.0, 0.3, 0.3}; @@ -1277,7 +1277,7 @@ public abstract class BaseTestSheet { @Test - public void testRightToLeft() throws IOException { + void testRightToLeft() throws IOException { try (Workbook wb = _testDataProvider.createWorkbook()) { Sheet sheet = wb.createSheet(); @@ -1290,7 +1290,7 @@ public abstract class BaseTestSheet { } @Test - public void testNoMergedRegionsIsEmptyList() throws IOException { + void testNoMergedRegionsIsEmptyList() throws IOException { try (Workbook wb = _testDataProvider.createWorkbook()) { Sheet sheet = wb.createSheet(); assertTrue(sheet.getMergedRegions().isEmpty()); Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetHiding.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetHiding.java?rev=1885281&r1=1885280&r2=1885281&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetHiding.java (original) +++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetHiding.java Fri Jan 8 23:50:02 2021 @@ -99,7 +99,7 @@ public abstract class BaseTestSheetHidin * the hidden flags are */ @Test - public void testTextSheets() { + void testTextSheets() { // Both should have two sheets assertEquals(2, wbH.getNumberOfSheets()); assertEquals(2, wbU.getNumberOfSheets()); @@ -128,7 +128,7 @@ public abstract class BaseTestSheetHidin * as expected */ @Test - public void testHideUnHideFlags() { + void testHideUnHideFlags() { assertTrue(wbH.isSheetHidden(0)); assertFalse(wbH.isSheetHidden(1)); assertFalse(wbU.isSheetHidden(0)); @@ -140,7 +140,7 @@ public abstract class BaseTestSheetHidin * one hidden */ @Test - public void testHide() throws IOException { + void testHide() throws IOException { wbU.setSheetHidden(0, true); assertTrue(wbU.isSheetHidden(0)); assertFalse(wbU.isSheetHidden(1)); @@ -155,7 +155,7 @@ public abstract class BaseTestSheetHidin * none hidden */ @Test - public void testUnHide() throws IOException { + void testUnHide() throws IOException { wbH.setSheetHidden(0, false); assertFalse(wbH.isSheetHidden(0)); assertFalse(wbH.isSheetHidden(1)); Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetShiftColumns.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetShiftColumns.java?rev=1885281&r1=1885280&r2=1885281&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetShiftColumns.java (original) +++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetShiftColumns.java Fri Jan 8 23:50:02 2021 @@ -98,7 +98,7 @@ public abstract class BaseTestSheetShift } @Test - public void testShiftOneColumnRight() { + void testShiftOneColumnRight() { sheet1.shiftColumns(1, 2, 1); double c1Value = sheet1.getRow(0).getCell(2).getNumericCellValue(); assertEquals(1d, c1Value, 0.01); @@ -127,7 +127,7 @@ public abstract class BaseTestSheetShift } @Test - public void testShiftTwoColumnsRight() { + void testShiftTwoColumnsRight() { sheet1.shiftColumns(1, 2, 2); String formulaA4 = sheet1.getRow(3).getCell(0).getCellFormula(); assertEquals("A2*D3", formulaA4); @@ -145,7 +145,7 @@ public abstract class BaseTestSheetShift } @Test - public void testShiftOneColumnLeft() { + void testShiftOneColumnLeft() { sheet1.shiftColumns(1, 2, -1); String formulaA5 = sheet1.getRow(4).getCell(0).getCellFormula(); @@ -159,12 +159,12 @@ public abstract class BaseTestSheetShift } @Test - public void testShiftTwoColumnsLeft() { + void testShiftTwoColumnsLeft() { assertThrows(IllegalStateException.class, () -> sheet1.shiftColumns(1, 2, -2)); } @Test - public void testShiftHyperlinks() throws IOException { + protected void testShiftHyperlinks() throws IOException { Workbook wb = _testDataProvider.createWorkbook(); Sheet sheet = wb.createSheet("test"); Row row = sheet.createRow(0); @@ -312,7 +312,7 @@ public abstract class BaseTestSheetShift } @Test - public void testShiftWithMergedRegions() throws IOException { + protected void testShiftWithMergedRegions() throws IOException { Workbook wb = _testDataProvider.createWorkbook(); Sheet sheet = wb.createSheet(); Row row = sheet.createRow(0); @@ -337,7 +337,7 @@ public abstract class BaseTestSheetShift protected static final String AMDOCS_TEST = "Amdocs:\ntest\n"; @Test - public void testCommentsShifting() throws IOException { + protected void testCommentsShifting() throws IOException { Workbook inputWb = openWorkbook("56017.xlsx"); Sheet sheet = inputWb.getSheetAt(0); @@ -378,7 +378,7 @@ public abstract class BaseTestSheetShift // transposed version of TestXSSFSheetShiftRows.testBug54524() @Test - public void testBug54524() throws IOException { + protected void testBug54524() throws IOException { Workbook wb = _testDataProvider.createWorkbook(); Sheet sheet = wb.createSheet(); Row firstRow = sheet.createRow(0); Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetShiftRows.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetShiftRows.java?rev=1885281&r1=1885280&r2=1885281&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetShiftRows.java (original) +++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetShiftRows.java Fri Jan 8 23:50:02 2021 @@ -136,7 +136,7 @@ public abstract class BaseTestSheetShift * When shifting rows, the page breaks should go with it */ @Test - public void testShiftRowBreaks() throws IOException { + protected void testShiftRowBreaks() throws IOException { // TODO - enable XSSF test try (Workbook wb = _testDataProvider.createWorkbook()) { Sheet s = wb.createSheet(); @@ -150,7 +150,7 @@ public abstract class BaseTestSheetShift } @Test - public void testShiftWithComments() throws IOException { + void testShiftWithComments() throws IOException { Workbook wb1 = _testDataProvider.openSampleWorkbook("comments." + _testDataProvider.getStandardFileNameExtension()); Sheet sheet = wb1.getSheet("Sheet1"); @@ -478,7 +478,7 @@ public abstract class BaseTestSheetShift } @Test - public void testBug55280() throws IOException { + void testBug55280() throws IOException { Workbook w = _testDataProvider.createWorkbook(); Sheet s = w.createSheet(); for (int row = 0; row < 5000; ++row) { @@ -490,7 +490,7 @@ public abstract class BaseTestSheetShift } @Test - public void test47169() throws IOException { + void test47169() throws IOException { Workbook wb = _testDataProvider.createWorkbook(); Sheet sheet = wb.createSheet(); sheet.createRow(30); @@ -506,7 +506,7 @@ public abstract class BaseTestSheetShift * bug 52903: HSSFSheet.shiftRows should shift hyperlinks */ @Test - public void testBug46742_52903_shiftHyperlinks() throws IOException { + void testBug46742_52903_shiftHyperlinks() throws IOException { Workbook wb = _testDataProvider.createWorkbook(); Sheet sheet = wb.createSheet("test"); Row row = sheet.createRow(0); @@ -742,7 +742,7 @@ public abstract class BaseTestSheetShift } @Test - public void test61840_shifting_rows_up_does_not_produce_REF_errors() throws IOException { + 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); Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetUpdateArrayFormulas.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetUpdateArrayFormulas.java?rev=1885281&r1=1885280&r2=1885281&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetUpdateArrayFormulas.java (original) +++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetUpdateArrayFormulas.java Fri Jan 8 23:50:02 2021 @@ -236,7 +236,7 @@ public abstract class BaseTestSheetUpdat * Test that we can set pre-calculated formula result for array formulas */ @Test - public void testModifyArrayCells_setFormulaResult() throws IOException { + void testModifyArrayCells_setFormulaResult() throws IOException { try (Workbook workbook = _testDataProvider.createWorkbook()) { Sheet sheet = workbook.createSheet(); @@ -263,7 +263,7 @@ public abstract class BaseTestSheetUpdat } @Test - public void testModifyArrayCells_setCellType() throws IOException { + void testModifyArrayCells_setCellType() throws IOException { try (Workbook workbook = _testDataProvider.createWorkbook()) { Sheet sheet = workbook.createSheet(); @@ -298,7 +298,7 @@ public abstract class BaseTestSheetUpdat } @Test - public void testModifyArrayCells_setCellFormula() throws IOException { + void testModifyArrayCells_setCellFormula() throws IOException { try (Workbook workbook = _testDataProvider.createWorkbook()) { Sheet sheet = workbook.createSheet(); @@ -338,7 +338,7 @@ public abstract class BaseTestSheetUpdat } @Test - public void testModifyArrayCells_removeCell() throws IOException { + void testModifyArrayCells_removeCell() throws IOException { try (Workbook workbook = _testDataProvider.createWorkbook()) { Sheet sheet = workbook.createSheet(); @@ -380,7 +380,7 @@ public abstract class BaseTestSheetUpdat } @Test - public void testModifyArrayCells_removeRow() throws IOException { + void testModifyArrayCells_removeRow() throws IOException { try (Workbook workbook = _testDataProvider.createWorkbook()) { Sheet sheet = workbook.createSheet(); @@ -422,7 +422,7 @@ public abstract class BaseTestSheetUpdat } @Test - public void testModifyArrayCells_mergeCellsSingle() throws IOException { + void testModifyArrayCells_mergeCellsSingle() throws IOException { try (Workbook workbook = _testDataProvider.createWorkbook()) { Sheet sheet = workbook.createSheet(); assertEquals(0, sheet.getNumMergedRegions()); @@ -440,7 +440,7 @@ public abstract class BaseTestSheetUpdat } @Test - public void testModifyArrayCells_mergeCellsMulti() throws IOException { + void testModifyArrayCells_mergeCellsMulti() throws IOException { try (Workbook workbook = _testDataProvider.createWorkbook()) { Sheet sheet = workbook.createSheet(); int expectedNumMergedRegions = 0; @@ -480,7 +480,7 @@ public abstract class BaseTestSheetUpdat } @Test - public void testModifyArrayCells_shiftRows() throws IOException { + void testModifyArrayCells_shiftRows() throws IOException { try (Workbook workbook = _testDataProvider.createWorkbook()) { Sheet sheet = workbook.createSheet(); Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestWorkbook.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestWorkbook.java?rev=1885281&r1=1885280&r2=1885281&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestWorkbook.java (original) +++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestWorkbook.java Fri Jan 8 23:50:02 2021 @@ -295,7 +295,7 @@ public abstract class BaseTestWorkbook { } @Test - public void testSetActiveCell() throws IOException { + void testSetActiveCell() throws IOException { try (Workbook wb = _testDataProvider.createWorkbook()) { Sheet sheet = wb.createSheet("new sheet"); final CellAddress initialActiveCell = sheet.getActiveCell(); @@ -764,7 +764,7 @@ public abstract class BaseTestWorkbook { } @Test - public void test58499() throws IOException { + void test58499() throws IOException { try (Workbook workbook = _testDataProvider.createWorkbook(); OutputStream os = new NullOutputStream()) { Sheet sheet = workbook.createSheet(); Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java?rev=1885281&r1=1885280&r2=1885281&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java (original) +++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java Fri Jan 8 23:50:02 2021 @@ -86,7 +86,7 @@ public class TestDataFormatter { * how to format normal numbers */ @Test - public void testLocale() { + void testLocale() { DataFormatter dfUS = new DataFormatter(Locale.US); DataFormatter dfFR = new DataFormatter(Locale.FRENCH); @@ -103,7 +103,7 @@ public class TestDataFormatter { * the locale (eg '[$-1010409]') isn't there */ @Test - public void testLocaleBasedFormats() { + void testLocaleBasedFormats() { DataFormatter dfUS = new DataFormatter(Locale.US); // Standard formats @@ -122,7 +122,7 @@ public class TestDataFormatter { * how to format normal numbers */ @Test - public void testGrouping() { + void testGrouping() { DataFormatter dfUS = new DataFormatter(Locale.US); DataFormatter dfDE = new DataFormatter(Locale.GERMAN); @@ -140,7 +140,7 @@ public class TestDataFormatter { * zapped from within the format strings */ @Test - public void testColours() { + void testColours() { DataFormatter dfUS = new DataFormatter(Locale.US); String[] formats = { @@ -168,7 +168,7 @@ public class TestDataFormatter { } @Test - public void testColoursAndBrackets() { + void testColoursAndBrackets() { DataFormatter dfUS = new DataFormatter(Locale.US); // Without currency symbols @@ -203,7 +203,7 @@ public class TestDataFormatter { } @Test - public void testConditionalRanges() { + void testConditionalRanges() { DataFormatter dfUS = new DataFormatter(Locale.US); String format = "[>=10]#,##0;[<10]0.0"; @@ -218,7 +218,7 @@ public class TestDataFormatter { * yet in place for all of these */ @Test - public void testNegativeZero() { + void testNegativeZero() { DataFormatter dfUS = new DataFormatter(Locale.US); String all2dp = "00.00"; @@ -263,7 +263,7 @@ public class TestDataFormatter { * format string, eg # #/# */ @Test - public void testFractions() { + void testFractions() { DataFormatter dfUS = new DataFormatter(Locale.US); // Excel often prefers "# #/#" @@ -335,7 +335,7 @@ public class TestDataFormatter { * correctly ignored by us. */ @Test - public void testPaddingSpaces() { + void testPaddingSpaces() { DataFormatter dfUS = new DataFormatter(Locale.US); assertEquals("12.34", dfUS.formatRawCellContents(12.343, -1, "##.##_ ")); assertEquals("12.34", dfUS.formatRawCellContents(12.343, -1, "##.##_1")); @@ -352,7 +352,7 @@ public class TestDataFormatter { * DataFormatter is the CSV mode preserves spaces */ @Test - public void testPaddingSpacesCSV() { + void testPaddingSpacesCSV() { DataFormatter dfUS = new DataFormatter(Locale.US, true); assertEquals("12.34 ", dfUS.formatRawCellContents(12.343, -1, "##.##_ ")); assertEquals("-12.34 ", dfUS.formatRawCellContents(-12.343, -1, "##.##_ ")); @@ -386,7 +386,7 @@ public class TestDataFormatter { * gets turned into the first letter of the month */ @Test - public void testMMMMM() { + void testMMMMM() { DataFormatter dfUS = new DataFormatter(Locale.US); Calendar c = LocaleUtil.getLocaleCalendar(2010, 5, 1, 2, 0, 0); @@ -400,7 +400,7 @@ public class TestDataFormatter { * Tests that we do AM/PM handling properly */ @Test - public void testAMPM() { + void testAMPM() { DataFormatter dfUS = new DataFormatter(Locale.US); assertEquals("06:00", dfUS.formatRawCellContents(0.25, -1, "hh:mm")); @@ -418,7 +418,7 @@ public class TestDataFormatter { * eg formatting 1 day 4 hours as 28 hours */ @Test - public void testElapsedTime() { + void testElapsedTime() { DataFormatter dfUS = new DataFormatter(Locale.US); double hour = 1.0/24.0; @@ -516,7 +516,7 @@ public class TestDataFormatter { } @Test - public void testDateWindowing() { + void testDateWindowing() { DataFormatter dfUS = new DataFormatter(Locale.US); assertEquals("1899-12-31 00:00:00", dfUS.formatRawCellContents(0.0, -1, "yyyy-mm-dd hh:mm:ss")); @@ -525,7 +525,7 @@ public class TestDataFormatter { } @Test - public void testScientificNotation() { + void testScientificNotation() { DataFormatter dfUS = new DataFormatter(Locale.US); assertEquals("1.23E+01", dfUS.formatRawCellContents(12.343, -1, "0.00E+00")); @@ -534,7 +534,7 @@ public class TestDataFormatter { } @Test - public void testInvalidDate() { + void testInvalidDate() { DataFormatter df1 = new DataFormatter(Locale.US); assertEquals("-1.0", df1.formatRawCellContents(-1, -1, "mm/dd/yyyy")); @@ -544,7 +544,7 @@ public class TestDataFormatter { } @Test - public void testEscapes() { + void testEscapes() { DataFormatter dfUS = new DataFormatter(Locale.US); assertEquals("1901-01-01", dfUS.formatRawCellContents(367.0, -1, "yyyy-mm-dd")); @@ -558,7 +558,7 @@ public class TestDataFormatter { } @Test - public void testFormatsWithPadding() { + void testFormatsWithPadding() { DataFormatter dfUS = new DataFormatter(Locale.US, true); // These request space-padding, based on the cell width @@ -583,7 +583,7 @@ public class TestDataFormatter { } @Test - public void testErrors() throws IOException { + void testErrors() throws IOException { DataFormatter dfUS = new DataFormatter(Locale.US, true); // Create a spreadsheet with some formula errors in it @@ -601,7 +601,7 @@ public class TestDataFormatter { } @Test - public void testBoolean() throws IOException { + void testBoolean() throws IOException { DataFormatter formatter = new DataFormatter(); // Create a spreadsheet with some TRUE/FALSE boolean values in it @@ -624,7 +624,7 @@ public class TestDataFormatter { * should at least handle it as it if wasn't there */ @Test - public void testDatesWithLocales() { + void testDatesWithLocales() { DataFormatter dfUS = new DataFormatter(Locale.US, true); String dateFormatEnglish = "[$-409]mmmm dd yyyy h:mm AM/PM"; @@ -650,7 +650,7 @@ public class TestDataFormatter { */ @Test @Disabled - public void testCustomFormats() { + void testCustomFormats() { DataFormatter dfUS = new DataFormatter(Locale.US, true); String fmt; @@ -668,7 +668,7 @@ public class TestDataFormatter { * ExcelStyleDateFormatter should work for Milliseconds too */ @Test - public void testExcelStyleDateFormatterStringOnMillis() { + void testExcelStyleDateFormatterStringOnMillis() { // Test directly with the .000 style DateFormat formatter1 = new ExcelStyleDateFormatter("ss.000"); @@ -698,7 +698,7 @@ public class TestDataFormatter { } @Test - public void testBug54786() { + void testBug54786() { DataFormatter formatter = new DataFormatter(); String format = "[h]\"\"h\"\" m\"\"m\"\""; assertTrue(DateUtil.isADateFormat(-1,format)); @@ -721,7 +721,7 @@ public class TestDataFormatter { } @Test - public void testIsADateFormat() { + void testIsADateFormat() { // first check some cases that should not be a date, also call multiple times to ensure the cache is used assertFalse(DateUtil.isADateFormat(-1, null)); assertFalse(DateUtil.isADateFormat(-1, null)); @@ -744,7 +744,7 @@ public class TestDataFormatter { @Test - public void testLargeNumbersAndENotation() throws IOException{ + void testLargeNumbersAndENotation() throws IOException{ assertFormatsTo("1E+86", 99999999999999999999999999999999999999999999999999999999999999999999999999999999999999d); assertFormatsTo("1E-84", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000001d); // Smallest double @@ -794,7 +794,7 @@ public class TestDataFormatter { } @Test - public void testFormulaEvaluation() throws IOException { + void testFormulaEvaluation() throws IOException { Workbook wb = HSSFTestDataSamples.openSampleWorkbook("FormulaEvalTestData.xls"); CellReference ref = new CellReference("D47"); @@ -811,7 +811,7 @@ public class TestDataFormatter { } @Test - public void testFormatWithTrailingDotsUS() { + void testFormatWithTrailingDotsUS() { DataFormatter dfUS = new DataFormatter(Locale.US); assertEquals("1,000,000", dfUS.formatRawCellContents(1000000, -1, "#,##0")); assertEquals("1,000", dfUS.formatRawCellContents(1000000, -1, "#,##0,")); @@ -826,7 +826,7 @@ public class TestDataFormatter { } @Test - public void testFormatWithTrailingDotsOtherLocale() { + void testFormatWithTrailingDotsOtherLocale() { DataFormatter dfIT = new DataFormatter(Locale.ITALY); assertEquals("1.000.000", dfIT.formatRawCellContents(1000000, -1, "#,##0")); assertEquals("1.000", dfIT.formatRawCellContents(1000000, -1, "#,##0,")); @@ -844,7 +844,7 @@ public class TestDataFormatter { * bug 60031: DataFormatter parses months incorrectly when put at the end of date segment */ @Test - public void testBug60031() { + void testBug60031() { // 23-08-2016 08:51:01 which is 42605.368761574071 as double was parsed // with format "yyyy-dd-MM HH:mm:ss" into "2016-23-51 08:51:01". DataFormatter dfUS = new DataFormatter(Locale.US); @@ -866,7 +866,7 @@ public class TestDataFormatter { } @Test - public void testDateFormattingWithLocales() { + void testDateFormattingWithLocales() { // 2017-12-01 09:54:33 which is 42747.412892397523 as double DataFormatter dfDE = new DataFormatter(Locale.GERMANY); DataFormatter dfZH = new DataFormatter(Locale.PRC); @@ -882,7 +882,7 @@ public class TestDataFormatter { * bug 60422 : simple number formats seem ok */ @Test - public void testSimpleNumericFormatsInGermanyLocale() { + void testSimpleNumericFormatsInGermanyLocale() { Locale[] locales = new Locale[] {Locale.GERMANY, Locale.US, Locale.ROOT}; for (Locale locale : locales) { //show that LocaleUtil has no effect on these tests @@ -905,7 +905,7 @@ public class TestDataFormatter { * bug 60422 : DataFormatter has issues with a specific NumberFormat in Germany default locale â */ @Test - public void testBug60422() { + void testBug60422() { char euro = '\u20AC'; DataFormatter df = new DataFormatter(Locale.GERMANY); String formatString = String.format(Locale.ROOT, @@ -916,7 +916,7 @@ public class TestDataFormatter { } @Test - public void testBug62839() { + void testBug62839() { Workbook wb = new HSSFWorkbook(); Sheet sheet = wb.createSheet(); Row row = sheet.createRow(0); @@ -932,7 +932,7 @@ public class TestDataFormatter { * Bug #63292 */ @Test - public void test1904With4PartFormat() { + void test1904With4PartFormat() { Date date = new Date(); int formatIndex = 105; String formatString1 = "[$-F400]m/d/yy h:mm:ss\\ AM/PM"; @@ -960,7 +960,7 @@ public class TestDataFormatter { } @Test - public void testConcurrentCellFormat() throws Exception { + void testConcurrentCellFormat() throws Exception { DataFormatter formatter1 = new DataFormatter(); DataFormatter formatter2 = new DataFormatter(); doFormatTestSequential(formatter1); @@ -975,7 +975,7 @@ public class TestDataFormatter { * A numeric format string like 0E+0 should be E+ */ @Test - public void testWithEinFormat() throws Exception { + void testWithEinFormat() throws Exception { DataFormatter formatter = new DataFormatter(); // Format string literals with an E in them shouldn't be Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestExcelStyleDateFormatter.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestExcelStyleDateFormatter.java?rev=1885281&r1=1885280&r2=1885281&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestExcelStyleDateFormatter.java (original) +++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestExcelStyleDateFormatter.java Fri Jan 8 23:50:02 2021 @@ -50,7 +50,7 @@ public class TestExcelStyleDateFormatter * [Bug 60369] Month format 'MMMMM' issue with TEXT-formula and Java 8 */ @Test - public void test60369() { + void test60369() { Map<Locale, String> testMap = initializeLocales(); // We have to set up dates as well. @@ -137,13 +137,13 @@ public class TestExcelStyleDateFormatter } @Test - public void testConstruct() { + void testConstruct() { new ExcelStyleDateFormatter(EXCEL_DATE_FORMAT, LocaleUtil.getUserLocale()); new ExcelStyleDateFormatter(EXCEL_DATE_FORMAT); } @Test - public void testWithLocale() throws ParseException { + void testWithLocale() throws ParseException { Locale before = LocaleUtil.getUserLocale(); try { LocaleUtil.setUserLocale(Locale.GERMAN); @@ -156,7 +156,7 @@ public class TestExcelStyleDateFormatter } @Test - public void testWithPattern() throws ParseException { + void testWithPattern() throws ParseException { String dateStr = new ExcelStyleDateFormatter("yyyy|" + EXCEL_DATE_FORMAT + "|").format( DATE_FORMAT.parse("2016-03-26")); assertEquals("2016|M|", dateStr); Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestFractionFormat.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestFractionFormat.java?rev=1885281&r1=1885280&r2=1885281&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestFractionFormat.java (original) +++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestFractionFormat.java Fri Jan 8 23:50:02 2021 @@ -37,7 +37,7 @@ import org.junit.jupiter.api.Test; */ public final class TestFractionFormat { @Test - public void testSingle() { + void testSingle() { FractionFormat f = new FractionFormat("", "##"); double val = 321.321; String ret = f.format(val); @@ -45,7 +45,7 @@ public final class TestFractionFormat { } @Test - public void testInvalid() { + void testInvalid() { assertThrows(IllegalStateException.class, () -> new FractionFormat("", "9999999999999999999999999999")); } @@ -61,7 +61,7 @@ public final class TestFractionFormat { } @Test - public void testWithBigWholePart() { + void testWithBigWholePart() { FractionFormat f = new FractionFormat("#", "???/???"); assertEquals("10100136259702", f.format(10100136259702d)); @@ -77,7 +77,7 @@ public final class TestFractionFormat { } @Test - public void testTruthFile() throws Exception { + void testTruthFile() throws Exception { File truthFile = HSSFTestDataSamples.getSampleFile("54686_fraction_formats.txt"); try (BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(truthFile), LocaleUtil.CHARSET_1252))) { Workbook wb = HSSFTestDataSamples.openSampleWorkbook("54686_fraction_formats.xls"); Modified: poi/trunk/src/testcases/org/apache/poi/ss/util/TestAreaReference.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/util/TestAreaReference.java?rev=1885281&r1=1885280&r2=1885281&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/ss/util/TestAreaReference.java (original) +++ poi/trunk/src/testcases/org/apache/poi/ss/util/TestAreaReference.java Fri Jan 8 23:50:02 2021 @@ -33,7 +33,7 @@ import org.junit.jupiter.api.Test; */ public class TestAreaReference { @Test - public void testWholeColumn() { + void testWholeColumn() { AreaReference oldStyle = AreaReference.getWholeColumn(SpreadsheetVersion.EXCEL97, "A", "B"); assertEquals(0, oldStyle.getFirstCell().getCol()); assertEquals(0, oldStyle.getFirstCell().getRow()); @@ -56,7 +56,7 @@ public class TestAreaReference { } @Test - public void testWholeRow() { + void testWholeRow() { AreaReference oldStyle = AreaReference.getWholeRow(SpreadsheetVersion.EXCEL97, "1", "2"); assertEquals(0, oldStyle.getFirstCell().getCol()); assertEquals(0, oldStyle.getFirstCell().getRow()); @@ -71,7 +71,7 @@ public class TestAreaReference { } @Test - public void test62810() { + void test62810() { final Workbook wb = new HSSFWorkbook(); final Sheet sheet = wb.createSheet("Ctor test"); final String sheetName = sheet.getSheetName(); Modified: poi/trunk/src/testcases/org/apache/poi/ss/util/TestCellAddress.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/util/TestCellAddress.java?rev=1885281&r1=1885280&r2=1885281&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/ss/util/TestCellAddress.java (original) +++ poi/trunk/src/testcases/org/apache/poi/ss/util/TestCellAddress.java Fri Jan 8 23:50:02 2021 @@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test; */ public final class TestCellAddress { @Test - public void testConstructors() { + void testConstructors() { CellAddress cellAddress; final CellReference cellRef = new CellReference("Sheet1", 0, 0, true, true); final String address = "A1"; @@ -49,19 +49,19 @@ public final class TestCellAddress { } @Test - public void testFormatAsString() { + void testFormatAsString() { assertEquals("A1", CellAddress.A1.formatAsString()); } @Test - public void testEquals() { + void testEquals() { assertEquals(new CellReference(6, 4), new CellReference(6, 4)); assertNotEquals(new CellReference(4, 6), new CellReference(6, 4)); } @SuppressWarnings("EqualsWithItself") @Test - public void testCompareTo() { + void testCompareTo() { final CellAddress A1 = new CellAddress(0, 0); final CellAddress A2 = new CellAddress(1, 0); final CellAddress B1 = new CellAddress(0, 1); @@ -95,13 +95,13 @@ public final class TestCellAddress { } @Test - public void testGetRow() { + void testGetRow() { final CellAddress addr = new CellAddress(6, 4); assertEquals(6, addr.getRow()); } @Test - public void testGetColumn() { + void testGetColumn() { final CellAddress addr = new CellAddress(6, 4); assertEquals(4, addr.getColumn()); } Modified: poi/trunk/src/testcases/org/apache/poi/ss/util/TestCellRangeAddress.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/util/TestCellRangeAddress.java?rev=1885281&r1=1885280&r2=1885281&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/ss/util/TestCellRangeAddress.java (original) +++ poi/trunk/src/testcases/org/apache/poi/ss/util/TestCellRangeAddress.java Fri Jan 8 23:50:02 2021 @@ -41,7 +41,7 @@ public final class TestCellRangeAddress }; @Test - public void testLoad() { + void testLoad() { CellRangeAddress ref = new CellRangeAddress( TestcaseRecordInputStream.create(0x000, data)); assertEquals(2, ref.getFirstRow()); @@ -53,14 +53,14 @@ public final class TestCellRangeAddress } @Test - public void testLoadInvalid() { + void testLoadInvalid() { RuntimeException e = assertThrows(RuntimeException.class, () -> new CellRangeAddress(TestcaseRecordInputStream.create(0x000, new byte[]{(byte) 0x02}))); assertTrue(e.getMessage().contains("Ran out of data")); } @Test - public void testStore() throws IOException { + void testStore() throws IOException { CellRangeAddress ref = new CellRangeAddress(0, 0, 0, 0); byte[] recordBytes; @@ -93,26 +93,26 @@ public final class TestCellRangeAddress } @Test - public void testCreateIllegal() { + void testCreateIllegal() { // for some combinations we expected exceptions assertThrows(IllegalArgumentException.class, () -> new CellRangeAddress(1, 0, 0, 0)); assertThrows(IllegalArgumentException.class, () -> new CellRangeAddress(0, 0, 1, 0)); } @Test - public void testCopy() throws IOException { + void testCopy() throws IOException { CellRangeAddress ref = new CellRangeAddress(1, 2, 3, 4); CellRangeAddress copy = ref.copy(); assertEquals(ref.toString(), copy.toString()); } @Test - public void testGetEncodedSize() { + void testGetEncodedSize() { assertEquals(2*CellRangeAddress.ENCODED_SIZE, CellRangeAddress.getEncodedSize(2)); } @Test - public void testFormatAsString() { + void testFormatAsString() { CellRangeAddress ref = new CellRangeAddress(1, 2, 3, 4); assertEquals("D2:E3", ref.formatAsString()); @@ -167,7 +167,7 @@ public final class TestCellRangeAddress } @Test - public void testEquals() { + void testEquals() { final CellRangeAddress ref1 = new CellRangeAddress(1, 2, 3, 4); final CellRangeAddress ref2 = new CellRangeAddress(1, 2, 3, 4); assertEquals(ref1, ref2); @@ -187,7 +187,7 @@ public final class TestCellRangeAddress } @Test - public void testGetMinMaxRow() { + void testGetMinMaxRow() { final CellRangeAddress ref = new CellRangeAddress(1, 2, 3, 4); assertEquals(1, ref.getMinRow()); assertEquals(2, ref.getMaxRow()); @@ -199,7 +199,7 @@ public final class TestCellRangeAddress } @Test - public void testGetMinMaxColumn() { + void testGetMinMaxColumn() { final CellRangeAddress ref = new CellRangeAddress(1, 2, 3, 4); assertEquals(3, ref.getMinColumn()); assertEquals(4, ref.getMaxColumn()); @@ -211,7 +211,7 @@ public final class TestCellRangeAddress } @Test - public void testIntersects() { + void testIntersects() { final CellRangeAddress baseRegion = new CellRangeAddress(0, 1, 0, 1); final CellRangeAddress duplicateRegion = new CellRangeAddress(0, 1, 0, 1); Modified: poi/trunk/src/testcases/org/apache/poi/ss/util/TestCellRangeUtil.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/util/TestCellRangeUtil.java?rev=1885281&r1=1885280&r2=1885281&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/ss/util/TestCellRangeUtil.java (original) +++ poi/trunk/src/testcases/org/apache/poi/ss/util/TestCellRangeUtil.java Fri Jan 8 23:50:02 2021 @@ -42,7 +42,7 @@ public final class TestCellRangeUtil { private static final CellRangeAddress A1_A2 = new CellRangeAddress(0, 1, 0, 0); @Test - public void testMergeCellRanges() { + void testMergeCellRanges() { // Note that the order of the output array elements does not matter // And that there may be more than one valid outputs for a given input. Any valid output is accepted. // POI should use a strategy that is consistent and predictable (it currently is not). Modified: poi/trunk/src/testcases/org/apache/poi/ss/util/TestCellReference.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/util/TestCellReference.java?rev=1885281&r1=1885280&r2=1885281&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/ss/util/TestCellReference.java (original) +++ poi/trunk/src/testcases/org/apache/poi/ss/util/TestCellReference.java Fri Jan 8 23:50:02 2021 @@ -43,7 +43,7 @@ import org.junit.jupiter.api.Test; */ public final class TestCellReference { @Test - public void testConstructors() { + void testConstructors() { CellReference cellReference; final String sheet = "Sheet1"; final String cellRef = "A1"; @@ -87,7 +87,7 @@ public final class TestCellReference { } @Test - public void testCtorFromCell() { + void testCtorFromCell() { Cell cell = mock(Cell.class, RETURNS_DEEP_STUBS); when(cell.getSheet().getSheetName()).thenReturn("sheet"); @@ -100,7 +100,7 @@ public final class TestCellReference { } @Test - public void testFormatAsString() { + void testFormatAsString() { CellReference cellReference; cellReference = new CellReference(null, 0, 0, false, false); @@ -128,7 +128,7 @@ public final class TestCellReference { } @Test - public void testGetCellRefParts() { + void testGetCellRefParts() { CellReference cellReference; String[] parts; @@ -196,7 +196,7 @@ public final class TestCellReference { } @Test - public void testGetColNumFromRef() { + void testGetColNumFromRef() { String cellRef = "A1"; CellReference cellReference = new CellReference(cellRef); assertEquals(0, cellReference.getCol()); @@ -240,7 +240,7 @@ public final class TestCellReference { } @Test - public void testGetRowNumFromRef() { + void testGetRowNumFromRef() { String cellRef = "A1"; CellReference cellReference = new CellReference(cellRef); assertEquals(0, cellReference.getRow()); @@ -255,7 +255,7 @@ public final class TestCellReference { } @Test - public void testConvertNumToColString() { + void testConvertNumToColString() { short col = 702; String collRef = new CellReference(0, col).formatAsString(); assertEquals("AAA1", collRef); @@ -274,7 +274,7 @@ public final class TestCellReference { } @Test - public void testBadRowNumber() { + void testBadRowNumber() { SpreadsheetVersion v97 = SpreadsheetVersion.EXCEL97; SpreadsheetVersion v2007 = SpreadsheetVersion.EXCEL2007; @@ -295,7 +295,7 @@ public final class TestCellReference { } @Test - public void testInvalidReference() { + void testInvalidReference() { for (String s : new String[]{"Sheet1!#REF!", "'MySheetName'!#REF!", "#REF!"}) { assertThrows(IllegalArgumentException.class, () -> new CellReference(s), "Shouldn't be able to create a #REF! "+s); @@ -310,7 +310,7 @@ public final class TestCellReference { } @Test - public void testConvertColStringToIndex() { + void testConvertColStringToIndex() { assertEquals(0, CellReference.convertColStringToIndex("A")); assertEquals(1, CellReference.convertColStringToIndex("B")); assertEquals(14, CellReference.convertColStringToIndex("O")); @@ -326,7 +326,7 @@ public final class TestCellReference { } @Test - public void testConvertNumColColString() { + void testConvertNumColColString() { assertEquals("A", CellReference.convertNumToColString(0)); assertEquals("AV", CellReference.convertNumToColString(47)); assertEquals("AW", CellReference.convertNumToColString(48)); @@ -362,13 +362,13 @@ public final class TestCellReference { } @Test - public void testToString() { + void testToString() { CellReference ref = new CellReference("'Sheet 1'!A5"); assertEquals("org.apache.poi.ss.util.CellReference ['Sheet 1'!A5]", ref.toString()); } @Test - public void testEqualsAndHashCode() { + void testEqualsAndHashCode() { CellReference ref1 = new CellReference("'Sheet 1'!A5"); CellReference ref2 = new CellReference("Sheet 1", 4, 0, false, false); assertEquals(ref1, ref2); @@ -455,7 +455,7 @@ public final class TestCellReference { } @Test - public void test62828() { + void test62828() { final Workbook wb = new HSSFWorkbook(); final Sheet sheet = wb.createSheet("Ctor test"); final String sheetName = sheet.getSheetName(); Modified: poi/trunk/src/testcases/org/apache/poi/ss/util/TestDateFormatConverter.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/util/TestDateFormatConverter.java?rev=1885281&r1=1885280&r2=1885281&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/ss/util/TestDateFormatConverter.java (original) +++ poi/trunk/src/testcases/org/apache/poi/ss/util/TestDateFormatConverter.java Fri Jan 8 23:50:02 2021 @@ -125,7 +125,7 @@ public final class TestDateFormatConvert } @Test - public void testJavaDateFormatsInExcel() throws Exception { + void testJavaDateFormatsInExcel() throws Exception { Date date = new Date(); outputLocaleDataFormats(date, true, false, DateFormat.DEFAULT, "Default" ); @@ -148,19 +148,19 @@ public final class TestDateFormatConvert } @Test - public void testJDK8EmptyLocale() { + void testJDK8EmptyLocale() { // JDK 8 seems to add an empty locale-string to the list returned via DateFormat.getAvailableLocales() // therefore we now cater for this special locale as well DateFormatConverter.getPrefixForLocale(new Locale("")); } @Test - public void testJDK11MyLocale() { + void testJDK11MyLocale() { DateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.DEFAULT, Locale.forLanguageTag("my")); } @Test - public void testAllKnownLocales() { + void testAllKnownLocales() { Pattern p = Pattern.compile("\\[\\$-(\\p{XDigit}+)]"); Set<String> excludeList = Stream.of( Modified: poi/trunk/src/testcases/org/apache/poi/ss/util/TestDateParser.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/util/TestDateParser.java?rev=1885281&r1=1885280&r2=1885281&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/ss/util/TestDateParser.java (original) +++ poi/trunk/src/testcases/org/apache/poi/ss/util/TestDateParser.java Fri Jan 8 23:50:02 2021 @@ -39,14 +39,14 @@ public class TestDateParser { // fail when is invalid date "13/13/13" }) - public void testFailWhenInvalidDate(String invalidDate) { + void testFailWhenInvalidDate(String invalidDate) { EvaluationException e = assertThrows(EvaluationException.class, () -> DateParser.parseDate(invalidDate), "Shouldn't parse " + invalidDate); assertEquals(ErrorEval.VALUE_INVALID, e.getErrorEval()); } @Test - public void testShouldParseValidDate() throws EvaluationException { + void testShouldParseValidDate() throws EvaluationException { Calendar expDate = LocaleUtil.getLocaleCalendar(1984, Calendar.OCTOBER, 20); Calendar actDate = DateParser.parseDate("1984/10/20"); assertEquals(expDate, actDate, @@ -55,7 +55,7 @@ public class TestDateParser { } @Test - public void testShouldIgnoreTimestamp() throws EvaluationException { + void testShouldIgnoreTimestamp() throws EvaluationException { Calendar expDate = LocaleUtil.getLocaleCalendar(1984, Calendar.OCTOBER, 20); Calendar actDate = DateParser.parseDate("1984/10/20 12:34:56"); assertEquals(expDate, actDate, Modified: poi/trunk/src/testcases/org/apache/poi/ss/util/TestExpandedDouble.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/util/TestExpandedDouble.java?rev=1885281&r1=1885280&r2=1885281&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/ss/util/TestExpandedDouble.java (original) +++ poi/trunk/src/testcases/org/apache/poi/ss/util/TestExpandedDouble.java Fri Jan 8 23:50:02 2021 @@ -32,7 +32,7 @@ public final class TestExpandedDouble { private static final BigInteger BIG_POW_10 = BigInteger.valueOf(1000000000); @Test - public void testNegative() { + void testNegative() { ExpandedDouble hd = new ExpandedDouble(0xC010000000000000L); assertNotEquals(-2046, hd.getBinaryExponent(), "identified bug - sign bit not masked out of exponent"); assertEquals(2, hd.getBinaryExponent()); @@ -42,7 +42,7 @@ public final class TestExpandedDouble { } @Test - public void testSubnormal() { + void testSubnormal() { ExpandedDouble hd = new ExpandedDouble(0x0000000000000001L); assertNotEquals(-1023, hd.getBinaryExponent(), "identified bug - subnormal numbers not decoded properly"); assertEquals(-1086, hd.getBinaryExponent()); @@ -55,7 +55,7 @@ public final class TestExpandedDouble { * Tests specific values for conversion from {@link ExpandedDouble} to {@link NormalisedDecimal} and back */ @Test - public void testRoundTripShifting() { + void testRoundTripShifting() { long[] rawValues = { 0x4010000000000004L, 0x7010000000000004L, Modified: poi/trunk/src/testcases/org/apache/poi/ss/util/TestNumberComparer.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/util/TestNumberComparer.java?rev=1885281&r1=1885280&r2=1885281&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/ss/util/TestNumberComparer.java (original) +++ poi/trunk/src/testcases/org/apache/poi/ss/util/TestNumberComparer.java Fri Jan 8 23:50:02 2021 @@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test; public final class TestNumberComparer { @Test - public void testAllComparisonExamples() { + void testAllComparisonExamples() { ComparisonExample[] examples = NumberComparisonExamples.getComparisonExamples(); boolean success = true; @@ -47,7 +47,7 @@ public final class TestNumberComparer { } @Test - public void testRoundTripOnComparisonExamples() { + void testRoundTripOnComparisonExamples() { ComparisonExample[] examples = NumberComparisonExamples.getComparisonExamples(); for(int i=0;i<examples.length; i++) { ComparisonExample ce = examples[i]; @@ -66,7 +66,7 @@ public final class TestNumberComparer { * The actual example from bug 47598 */ @Test - public void testSpecificExampleA() { + void testSpecificExampleA() { double a = 0.06-0.01; double b = 0.05; assertNotEquals(a, b, 0.0); @@ -77,7 +77,7 @@ public final class TestNumberComparer { * The example from the nabble posting */ @Test - public void testSpecificExampleB() { + void testSpecificExampleB() { double a = 1+1.0028-0.9973; double b = 1.0055; assertNotEquals(a, b, 0.0); Modified: poi/trunk/src/testcases/org/apache/poi/ss/util/TestNumberToTextConverter.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/util/TestNumberToTextConverter.java?rev=1885281&r1=1885280&r2=1885281&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/ss/util/TestNumberToTextConverter.java (original) +++ poi/trunk/src/testcases/org/apache/poi/ss/util/TestNumberToTextConverter.java Fri Jan 8 23:50:02 2021 @@ -36,7 +36,7 @@ public final class TestNumberToTextConve * up to contain the rendering as produced by Excel. */ @Test - public void testAll() { + void testAll() { ExampleConversion[] examples = NumberToTextConversionExamples.getExampleConversions(); for (ExampleConversion example : examples) { @@ -84,7 +84,7 @@ public final class TestNumberToTextConve } @Test - public void testSimpleRendering_bug56156() { + void testSimpleRendering_bug56156() { double dResult = 0.05+0.01; // values chosen to produce rounding anomaly String actualText = NumberToTextConverter.toText(dResult); String jdkText = Double.toString(dResult); Modified: poi/trunk/src/testcases/org/apache/poi/ss/util/TestSheetBuilder.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/util/TestSheetBuilder.java?rev=1885281&r1=1885280&r2=1885281&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/ss/util/TestSheetBuilder.java (original) +++ poi/trunk/src/testcases/org/apache/poi/ss/util/TestSheetBuilder.java Fri Jan 8 23:50:02 2021 @@ -46,7 +46,7 @@ public final class TestSheetBuilder { }; @Test - public void testNotCreateEmptyCells() throws IOException { + void testNotCreateEmptyCells() throws IOException { try (Workbook wb = new HSSFWorkbook()) { Sheet sheet = new SheetBuilder(wb, testData).build(); @@ -74,7 +74,7 @@ public final class TestSheetBuilder { } @Test - public void testEmptyCells() throws IOException { + void testEmptyCells() throws IOException { try (Workbook wb = new HSSFWorkbook()) { Sheet sheet = new SheetBuilder(wb, testData).setCreateEmptyCells(true).build(); @@ -85,7 +85,7 @@ public final class TestSheetBuilder { } @Test - public void testSheetName() throws IOException { + void testSheetName() throws IOException { final String sheetName = "TEST SHEET NAME"; try (Workbook wb = new HSSFWorkbook()) { Sheet sheet = new SheetBuilder(wb, testData).setSheetName(sheetName).build(); Modified: poi/trunk/src/testcases/org/apache/poi/ss/util/TestSheetUtil.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/util/TestSheetUtil.java?rev=1885281&r1=1885280&r2=1885281&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/ss/util/TestSheetUtil.java (original) +++ poi/trunk/src/testcases/org/apache/poi/ss/util/TestSheetUtil.java Fri Jan 8 23:50:02 2021 @@ -38,7 +38,7 @@ import static org.junit.jupiter.api.Asse */ public final class TestSheetUtil { @Test - public void testCellWithMerges() throws Exception { + void testCellWithMerges() throws Exception { try (Workbook wb = new HSSFWorkbook()) { Sheet s = wb.createSheet(); @@ -90,7 +90,7 @@ public final class TestSheetUtil { } @Test - public void testCanComputeWidthHSSF() throws IOException { + void testCanComputeWidthHSSF() throws IOException { try (Workbook wb = new HSSFWorkbook()) { // cannot check on result because on some machines we get back false here! SheetUtil.canComputeColumnWidth(wb.getFontAt(0)); @@ -98,7 +98,7 @@ public final class TestSheetUtil { } @Test - public void testGetCellWidthEmpty() throws IOException { + void testGetCellWidthEmpty() throws IOException { try (Workbook wb = new HSSFWorkbook()) { Sheet sheet = wb.createSheet("sheet"); Row row = sheet.createRow(0); @@ -110,7 +110,7 @@ public final class TestSheetUtil { } @Test - public void testGetCellWidthString() throws IOException { + void testGetCellWidthString() throws IOException { try (Workbook wb = new HSSFWorkbook()) { Sheet sheet = wb.createSheet("sheet"); Row row = sheet.createRow(0); @@ -123,7 +123,7 @@ public final class TestSheetUtil { } @Test - public void testGetCellWidthNumber() throws IOException { + void testGetCellWidthNumber() throws IOException { try (Workbook wb = new HSSFWorkbook()) { Sheet sheet = wb.createSheet("sheet"); Row row = sheet.createRow(0); @@ -136,7 +136,7 @@ public final class TestSheetUtil { } @Test - public void testGetCellWidthBoolean() throws IOException { + void testGetCellWidthBoolean() throws IOException { try (Workbook wb = new HSSFWorkbook()) { Sheet sheet = wb.createSheet("sheet"); Row row = sheet.createRow(0); @@ -149,7 +149,7 @@ public final class TestSheetUtil { } @Test - public void testGetColumnWidthString() throws IOException { + void testGetColumnWidthString() throws IOException { try (Workbook wb = new HSSFWorkbook()) { Sheet sheet = wb.createSheet("sheet"); Row row = sheet.createRow(0); Modified: poi/trunk/src/testcases/org/apache/poi/ss/util/TestWorkbookUtil.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/util/TestWorkbookUtil.java?rev=1885281&r1=1885280&r2=1885281&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/ss/util/TestWorkbookUtil.java (original) +++ poi/trunk/src/testcases/org/apache/poi/ss/util/TestWorkbookUtil.java Fri Jan 8 23:50:02 2021 @@ -32,7 +32,7 @@ public final class TestWorkbookUtil { * {@link org.apache.poi.hssf.record.TestBoundSheetRecord#testValidNames()} */ @Test - public void testCreateSafeNames() { + void testCreateSafeNames() { String p = "Sheet1"; String actual = WorkbookUtil.createSafeSheetName(p); Modified: poi/trunk/src/testcases/org/apache/poi/ss/util/cellwalk/TestCellWalk.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/util/cellwalk/TestCellWalk.java?rev=1885281&r1=1885280&r2=1885281&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/ss/util/cellwalk/TestCellWalk.java (original) +++ poi/trunk/src/testcases/org/apache/poi/ss/util/cellwalk/TestCellWalk.java Fri Jan 8 23:50:02 2021 @@ -36,7 +36,7 @@ public class TestCellWalk { }; @Test - public void testNotTraverseEmptyCells() { + void testNotTraverseEmptyCells() { Workbook wb = new HSSFWorkbook(); Sheet sheet = new SheetBuilder(wb, testData).build(); CellRangeAddress range = CellRangeAddress.valueOf("A1:C3"); Modified: poi/trunk/src/testcases/org/apache/poi/util/TestArrayUtil.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/util/TestArrayUtil.java?rev=1885281&r1=1885280&r2=1885281&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/util/TestArrayUtil.java (original) +++ poi/trunk/src/testcases/org/apache/poi/util/TestArrayUtil.java Fri Jan 8 23:50:02 2021 @@ -40,7 +40,7 @@ public class TestArrayUtil { * Test to ensure that arrayMoveWithin works as expected */ @Test - public void testArrayMoveWithin() { + void testArrayMoveWithin() { // moveFrom, moveTo, numToMove, values... Integer[][] data = { // Moving to a later point in the array Modified: poi/trunk/src/testcases/org/apache/poi/util/TestBitField.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/util/TestBitField.java?rev=1885281&r1=1885280&r2=1885281&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/util/TestBitField.java (original) +++ poi/trunk/src/testcases/org/apache/poi/util/TestBitField.java Fri Jan 8 23:50:02 2021 @@ -31,7 +31,7 @@ public final class TestBitField { private static BitField bf_single = BitFieldFactory.getInstance(0x4000); @Test - public void testGetValue() { + void testGetValue() { assertEquals(bf_multi.getValue(-1), 127); assertEquals(bf_multi.getValue(0), 0); assertEquals(bf_single.getValue(-1), 1); @@ -39,7 +39,7 @@ public final class TestBitField { } @Test - public void testGetShortValue() { + void testGetShortValue() { assertEquals(bf_multi.getShortValue(( short ) -1), ( short ) 127); assertEquals(bf_multi.getShortValue(( short ) 0), ( short ) 0); assertEquals(bf_single.getShortValue(( short ) -1), ( short ) 1); @@ -47,7 +47,7 @@ public final class TestBitField { } @Test - public void testGetRawValue() { + void testGetRawValue() { assertEquals(bf_multi.getRawValue(-1), 0x3F80); assertEquals(bf_multi.getRawValue(0), 0); assertEquals(bf_single.getRawValue(-1), 0x4000); @@ -55,7 +55,7 @@ public final class TestBitField { } @Test - public void testGetShortRawValue() { + void testGetShortRawValue() { assertEquals(bf_multi.getShortRawValue(( short ) -1), ( short ) 0x3F80); assertEquals(bf_multi.getShortRawValue(( short ) 0), ( short ) 0); @@ -65,7 +65,7 @@ public final class TestBitField { } @Test - public void testIsSet() { + void testIsSet() { assertFalse(bf_multi.isSet(0)); for (int j = 0x80; j <= 0x3F80; j += 0x80) { @@ -76,7 +76,7 @@ public final class TestBitField { } @Test - public void testIsAllSet() { + void testIsAllSet() { for (int j = 0; j < 0x3F80; j += 0x80) { assertFalse(bf_multi.isAllSet(j)); @@ -87,7 +87,7 @@ public final class TestBitField { } @Test - public void testSetValue() { + void testSetValue() { for (int j = 0; j < 128; j++) { assertEquals(bf_multi.getValue(bf_multi.setValue(0, j)), j); @@ -107,7 +107,7 @@ public final class TestBitField { } @Test - public void testSetShortValue() { + void testSetShortValue() { for (int j = 0; j < 128; j++) { assertEquals(bf_multi @@ -135,7 +135,7 @@ public final class TestBitField { } @Test - public void testByte() { + void testByte() { assertEquals(1, BitFieldFactory.getInstance(1).setByteBoolean(( byte ) 0, true)); assertEquals(2, BitFieldFactory.getInstance(2).setByteBoolean(( byte ) 0, true)); assertEquals(4, BitFieldFactory.getInstance(4).setByteBoolean(( byte ) 0, true)); @@ -162,31 +162,31 @@ public final class TestBitField { } @Test - public void testClear() { + void testClear() { assertEquals(bf_multi.clear(-1), 0xFFFFC07F); assertEquals(bf_single.clear(-1), 0xFFFFBFFF); } @Test - public void testClearShort() { + void testClearShort() { assertEquals(bf_multi.clearShort(( short ) -1), ( short ) 0xC07F); assertEquals(bf_single.clearShort(( short ) -1), ( short ) 0xBFFF); } @Test - public void testSet() { + void testSet() { assertEquals(bf_multi.set(0), 0x3F80); assertEquals(bf_single.set(0), 0x4000); } @Test - public void testSetShort() { + void testSetShort() { assertEquals(bf_multi.setShort(( short ) 0), ( short ) 0x3F80); assertEquals(bf_single.setShort(( short ) 0), ( short ) 0x4000); } @Test - public void testSetBoolean() { + void testSetBoolean() { assertEquals(bf_multi.set(0), bf_multi.setBoolean(0, true)); assertEquals(bf_single.set(0), bf_single.setBoolean(0, true)); assertEquals(bf_multi.clear(-1), bf_multi.setBoolean(-1, false)); @@ -194,7 +194,7 @@ public final class TestBitField { } @Test - public void testSetShortBoolean() { + void testSetShortBoolean() { assertEquals(bf_multi.setShort(( short ) 0), bf_multi.setShortBoolean(( short ) 0, true)); assertEquals(bf_single.setShort(( short ) 0), @@ -206,7 +206,7 @@ public final class TestBitField { } @Test - public void testSetLargeValues() { + void testSetLargeValues() { final BitField bf1 = new BitField(0xF), bf2 = new BitField(0xF0000000); int a = 0; a = bf1.setValue(a, 9); Modified: poi/trunk/src/testcases/org/apache/poi/util/TestByteField.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/util/TestByteField.java?rev=1885281&r1=1885280&r2=1885281&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/util/TestByteField.java (original) +++ poi/trunk/src/testcases/org/apache/poi/util/TestByteField.java Fri Jan 8 23:50:02 2021 @@ -36,7 +36,7 @@ public final class TestByteField { }; @Test - public void testConstructors() { + void testConstructors() { try { new ByteField(-1); fail("Should have caught ArrayIndexOutOfBoundsException"); @@ -80,7 +80,7 @@ public final class TestByteField { } @Test - public void testSet() { + void testSet() { ByteField field = new ByteField(0); byte[] array = new byte[ 1 ]; @@ -95,7 +95,7 @@ public final class TestByteField { } @Test - public void testReadFromBytes() { + void testReadFromBytes() { ByteField field = new ByteField(1); byte[] array = new byte[ 1 ]; @@ -114,7 +114,7 @@ public final class TestByteField { } @Test - public void testReadFromStream() throws IOException { + void testReadFromStream() throws IOException { ByteField field = new ByteField(0); ByteArrayInputStream stream = new ByteArrayInputStream(_test_array.clone()); @@ -125,7 +125,7 @@ public final class TestByteField { } @Test - public void testWriteToBytes() { + void testWriteToBytes() { ByteField field = new ByteField(0); byte[] array = new byte[ 1 ]; Modified: poi/trunk/src/testcases/org/apache/poi/util/TestHexDump.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/util/TestHexDump.java?rev=1885281&r1=1885280&r2=1885281&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/util/TestHexDump.java (original) +++ poi/trunk/src/testcases/org/apache/poi/util/TestHexDump.java Fri Jan 8 23:50:02 2021 @@ -48,7 +48,7 @@ public class TestHexDump { } @Test - public void testDump() throws IOException { + void testDump() throws IOException { byte[] testArray = testArray(); ByteArrayOutputStream streamAct = new ByteArrayOutputStream(); HexDump.dump(testArray, 0, streamAct, 0); @@ -133,7 +133,7 @@ public class TestHexDump { } @Test - public void testToHex() { + void testToHex() { assertEquals("000A", HexDump.toHex((short)0xA)); assertEquals("0A", HexDump.toHex((byte)0xA)); @@ -158,7 +158,7 @@ public class TestHexDump { } @Test - public void testDumpToString() { + void testDumpToString() { byte[] testArray = testArray(); String dump = HexDump.dump(testArray, 0, 0); //System.out.println("Hex: \n" + dump); @@ -170,19 +170,19 @@ public class TestHexDump { } @Test - public void testDumpToStringOutOfIndex1() { + void testDumpToStringOutOfIndex1() { assertThrows(ArrayIndexOutOfBoundsException.class, () -> HexDump.dump(new byte[1], 0, -1)); assertThrows(ArrayIndexOutOfBoundsException.class, () -> HexDump.dump(new byte[1], 0, 2)); assertThrows(ArrayIndexOutOfBoundsException.class, () -> HexDump.dump(new byte[1], 0, 1)); } @Test - public void testDumpToStringNoDataEOL1() { + void testDumpToStringNoDataEOL1() { HexDump.dump(new byte[0], 0, 1); } @Test - public void testDumpToStringNoDataEOL2() { + void testDumpToStringNoDataEOL2() { HexDump.dump(new byte[0], 0, 0); } Modified: poi/trunk/src/testcases/org/apache/poi/util/TestIOUtils.java URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/util/TestIOUtils.java?rev=1885281&r1=1885280&r2=1885281&view=diff ============================================================================== --- poi/trunk/src/testcases/org/apache/poi/util/TestIOUtils.java (original) +++ poi/trunk/src/testcases/org/apache/poi/util/TestIOUtils.java Fri Jan 8 23:50:02 2021 @@ -72,61 +72,61 @@ public final class TestIOUtils { } @Test - public void testPeekFirst8Bytes() throws Exception { + void testPeekFirst8Bytes() throws Exception { assertArrayEquals("01234567".getBytes(StandardCharsets.UTF_8), IOUtils.peekFirst8Bytes(new ByteArrayInputStream("0123456789".getBytes(StandardCharsets.UTF_8)))); } @Test - public void testPeekFirst8BytesWithPushbackInputStream() throws Exception { + void testPeekFirst8BytesWithPushbackInputStream() throws Exception { assertArrayEquals("01234567".getBytes(StandardCharsets.UTF_8), IOUtils.peekFirst8Bytes(new PushbackInputStream(new ByteArrayInputStream("0123456789".getBytes(StandardCharsets.UTF_8)), 8))); } @Test - public void testPeekFirst8BytesTooLessAvailable() throws Exception { + void testPeekFirst8BytesTooLessAvailable() throws Exception { assertArrayEquals(new byte[] { 1, 2, 3, 0, 0, 0, 0, 0}, IOUtils.peekFirst8Bytes(data123())); } @Test - public void testPeekFirst8BytesEmpty() { + void testPeekFirst8BytesEmpty() { assertThrows(EmptyFileException.class, () -> IOUtils.peekFirst8Bytes(new ByteArrayInputStream(new byte[0]))); } @Test - public void testToByteArray() throws Exception { + void testToByteArray() throws Exception { assertArrayEquals(new byte[] { 1, 2, 3}, IOUtils.toByteArray(data123())); } @Test - public void testToByteArrayToSmall() { + void testToByteArrayToSmall() { assertThrows(IOException.class, () -> IOUtils.toByteArray(data123(), 10)); } @Test - public void testToByteArrayMaxLengthToSmall() { + void testToByteArrayMaxLengthToSmall() { assertThrows(IOException.class, () -> IOUtils.toByteArray(data123(), 10, 10)); } @Test - public void testToByteArrayNegativeLength() { + void testToByteArrayNegativeLength() { assertThrows(RecordFormatException.class, () -> IOUtils.toByteArray(data123(), -1)); } @Test - public void testToByteArrayNegativeMaxLength() { + void testToByteArrayNegativeMaxLength() { assertThrows(RecordFormatException.class, () -> IOUtils.toByteArray(data123(), 10, -1)); } @Test - public void testToByteArrayByteBuffer() { + void testToByteArrayByteBuffer() { assertArrayEquals(new byte[] { 1, 2, 3}, IOUtils.toByteArray(ByteBuffer.wrap(new byte[]{1, 2, 3}), 10)); } @Test - public void testToByteArrayByteBufferNonArray() { + void testToByteArrayByteBufferNonArray() { ByteBuffer buffer = ByteBuffer.allocate(3); buffer.put(new byte[] { 1, 2, 3}); buffer.position(0); @@ -138,13 +138,13 @@ public final class TestIOUtils { } @Test - public void testToByteArrayByteBufferToSmall() { + void testToByteArrayByteBufferToSmall() { assertArrayEquals(new byte[] { 1, 2, 3, 4, 5, 6, 7}, IOUtils.toByteArray(ByteBuffer.wrap(new byte[]{1, 2, 3, 4, 5, 6, 7}), 3)); } @Test - public void testSkipFully() throws IOException { + void testSkipFully() throws IOException { try (InputStream is = new FileInputStream(TMP)) { long skipped = IOUtils.skipFully(is, 20000L); assertEquals(LENGTH, skipped); @@ -152,7 +152,7 @@ public final class TestIOUtils { } @Test - public void testSkipFullyGtIntMax() throws IOException { + void testSkipFullyGtIntMax() throws IOException { try (InputStream is = new FileInputStream(TMP)) { long skipped = IOUtils.skipFully(is, Integer.MAX_VALUE + 20000L); assertEquals(LENGTH, skipped); @@ -160,7 +160,7 @@ public final class TestIOUtils { } @Test - public void testSkipFullyByteArray() throws IOException { + void testSkipFullyByteArray() throws IOException { ByteArrayOutputStream bos = new ByteArrayOutputStream(); try (InputStream is = new FileInputStream(TMP)) { IOUtils.copy(is, bos); @@ -170,7 +170,7 @@ public final class TestIOUtils { } @Test - public void testSkipFullyByteArrayGtIntMax() throws IOException { + void testSkipFullyByteArrayGtIntMax() throws IOException { ByteArrayOutputStream bos = new ByteArrayOutputStream(); try (InputStream is = new FileInputStream(TMP)) { IOUtils.copy(is, bos); @@ -180,18 +180,18 @@ public final class TestIOUtils { } @Test - public void testSkipFullyBug61294() throws IOException { + void testSkipFullyBug61294() throws IOException { IOUtils.skipFully(new ByteArrayInputStream(new byte[0]), 1); } @Test - public void testZeroByte() throws IOException { + void testZeroByte() throws IOException { long skipped = IOUtils.skipFully((new ByteArrayInputStream(new byte[0])), 100); assertEquals(-1L, skipped); } @Test - public void testSkipZero() throws IOException { + void testSkipZero() throws IOException { try (InputStream is = new FileInputStream(TMP)) { long skipped = IOUtils.skipFully(is, 0); assertEquals(0, skipped); @@ -199,21 +199,21 @@ public final class TestIOUtils { } @Test - public void testSkipNegative() throws IOException { + void testSkipNegative() throws IOException { try (InputStream is = new FileInputStream(TMP)) { assertThrows(IllegalArgumentException.class, () -> IOUtils.skipFully(is, -1)); } } @Test - public void testMaxLengthTooLong() throws IOException { + void testMaxLengthTooLong() throws IOException { try (InputStream is = new FileInputStream(TMP)) { assertThrows(RecordFormatException.class, () -> IOUtils.toByteArray(is, Integer.MAX_VALUE, 100)); } } @Test - public void testMaxLengthIgnored() throws IOException { + void testMaxLengthIgnored() throws IOException { try (InputStream is = new FileInputStream(TMP)) { IOUtils.toByteArray(is, 90, Integer.MAX_VALUE); IOUtils.toByteArray(is, 90, 100); @@ -222,20 +222,20 @@ public final class TestIOUtils { } @Test - public void testMaxLengthInvalid() throws IOException { + void testMaxLengthInvalid() throws IOException { try (InputStream is = new FileInputStream(TMP)) { assertThrows(RecordFormatException.class, () -> IOUtils.toByteArray(is, 90, 80)); } } @Test - public void testWonkyInputStream() throws IOException { + void testWonkyInputStream() throws IOException { long skipped = IOUtils.skipFully(new WonkyInputStream(), 10000); assertEquals(10000, skipped); } @Test - public void testSetMaxOverride() throws IOException { + void testSetMaxOverride() throws IOException { ByteArrayInputStream stream = new ByteArrayInputStream("abc".getBytes(StandardCharsets.UTF_8)); byte[] bytes = IOUtils.toByteArray(stream); assertNotNull(bytes); @@ -243,7 +243,7 @@ public final class TestIOUtils { } @Test - public void testSetMaxOverrideLimit() throws IOException { + void testSetMaxOverrideLimit() throws IOException { IOUtils.setByteArrayMaxOverride(30 * 1024 * 1024); try { ByteArrayInputStream stream = new ByteArrayInputStream("abc".getBytes(StandardCharsets.UTF_8)); @@ -256,7 +256,7 @@ public final class TestIOUtils { } @Test - public void testSetMaxOverrideOverLimit() { + void testSetMaxOverrideOverLimit() { IOUtils.setByteArrayMaxOverride(2); try { ByteArrayInputStream stream = new ByteArrayInputStream("abc".getBytes(StandardCharsets.UTF_8)); @@ -267,7 +267,7 @@ public final class TestIOUtils { } @Test - public void testSetMaxOverrideWithLength() throws IOException { + void testSetMaxOverrideWithLength() throws IOException { ByteArrayInputStream stream = new ByteArrayInputStream("abc".getBytes(StandardCharsets.UTF_8)); byte[] bytes = IOUtils.toByteArray(stream, 3, 100); assertNotNull(bytes); @@ -275,7 +275,7 @@ public final class TestIOUtils { } @Test - public void testSetMaxOverrideLimitWithLength() throws IOException { + void testSetMaxOverrideLimitWithLength() throws IOException { IOUtils.setByteArrayMaxOverride(30 * 1024 * 1024); try { ByteArrayInputStream stream = new ByteArrayInputStream("abc".getBytes(StandardCharsets.UTF_8)); @@ -288,7 +288,7 @@ public final class TestIOUtils { } @Test - public void testSetMaxOverrideOverLimitWithLength() throws IOException { + void testSetMaxOverrideOverLimitWithLength() throws IOException { IOUtils.setByteArrayMaxOverride(2); try { ByteArrayInputStream stream = new ByteArrayInputStream("abc".getBytes(StandardCharsets.UTF_8)); @@ -299,14 +299,14 @@ public final class TestIOUtils { } @Test - public void testSafelyAllocate() { + void testSafelyAllocate() { byte[] bytes = IOUtils.safelyAllocate(30, 200); assertNotNull(bytes); assertEquals(30, bytes.length); } @Test - public void testSafelyAllocateLimit() { + void testSafelyAllocateLimit() { IOUtils.setByteArrayMaxOverride(40); try { byte[] bytes = IOUtils.safelyAllocate(30, 200); @@ -318,28 +318,28 @@ public final class TestIOUtils { } @Test - public void testReadFully() throws IOException { + void testReadFully() throws IOException { byte[] bytes = new byte[2]; IOUtils.readFully(new ByteArrayInputStream(new byte[] {1, 2, 3}), bytes, 0, 2); assertArrayEquals(new byte[] {1,2}, bytes); } @Test - public void testReadFullySimple() throws IOException { + void testReadFullySimple() throws IOException { byte[] bytes = new byte[2]; IOUtils.readFully(new ByteArrayInputStream(new byte[] {1, 2, 3}), bytes); assertArrayEquals(new byte[] {1,2}, bytes); } @Test - public void testReadFullyOffset() throws IOException { + void testReadFullyOffset() throws IOException { byte[] bytes = new byte[3]; IOUtils.readFully(new ByteArrayInputStream(new byte[] {1, 2, 3}), bytes, 1, 2); assertArrayEquals(new byte[] {0, 1,2}, bytes); } @Test - public void testReadFullyAtLength() throws IOException { + void testReadFullyAtLength() throws IOException { byte[] bytes = new byte[3]; IOUtils.readFully(new ByteArrayInputStream(new byte[] {1, 2, 3}), bytes, 0, 3); assertArrayEquals(new byte[] {1,2, 3}, bytes); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org For additional commands, e-mail: commits-h...@poi.apache.org