You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ki...@apache.org on 2021/01/09 18:24:52 UTC
svn commit: r1885308 [2/4] - in /poi/trunk/src:
ooxml/testcases/org/apache/poi/xssf/streaming/
ooxml/testcases/org/apache/poi/xssf/usermodel/ testcases/org/apache/poi/
testcases/org/apache/poi/ddf/ testcases/org/apache/poi/hpsf/
testcases/org/apache/po...
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java Sat Jan 9 18:24:51 2021
@@ -153,7 +153,7 @@ public final class TestBugs extends Base
* open resulting file in Excel to check results!
*/
@Test
- public void bug15375() throws Exception {
+ void bug15375() throws Exception {
try (HSSFWorkbook wb1 = openSampleWorkbook("15375.xls")) {
HSSFSheet sheet = wb1.getSheetAt(0);
@@ -184,12 +184,12 @@ public final class TestBugs extends Base
* Double byte strings
*/
@Test
- public void bug15556() throws Exception {
+ void bug15556() throws Exception {
simpleTest("15556.xls", wb -> assertNotNull(wb.getSheetAt(0).getRow(45)));
}
@Test
- public void bug24215() throws Exception {
+ void bug24215() throws Exception {
try (HSSFWorkbook wb = openSampleWorkbook("24215.xls")) {
for (int sheetIndex = 0; sheetIndex < wb.getNumberOfSheets(); sheetIndex++) {
@@ -216,7 +216,7 @@ public final class TestBugs extends Base
* The file contains THAI unicode characters.
*/
@Test
- public void bugUnicodeStringFormulaRead() throws Exception {
+ void bugUnicodeStringFormulaRead() throws Exception {
try (HSSFWorkbook w = openSampleWorkbook("25695.xls")) {
@@ -281,7 +281,7 @@ public final class TestBugs extends Base
* names and macros
*/
@Test
- public void bug27852() throws Exception {
+ void bug27852() throws Exception {
try (HSSFWorkbook wb = openSampleWorkbook("27852.xls")) {
for (HSSFName name : wb.getAllNames()) {
assertNotNull(name.getNameName());
@@ -296,7 +296,7 @@ public final class TestBugs extends Base
* Bug 29206: NPE on HSSFSheet.getRow for blank rows
*/
@Test
- public void bug29206() throws Exception {
+ void bug29206() throws Exception {
//the first check with blank workbook
try (HSSFWorkbook wb = openSampleWorkbook("Simple.xls")) {
HSSFSheet sheet = wb.createSheet();
@@ -311,7 +311,7 @@ public final class TestBugs extends Base
* Bug 29942: Importing Excel files that have been created by Open Office on Linux
*/
@Test
- public void bug29942() throws Exception {
+ void bug29942() throws Exception {
try (HSSFWorkbook wb = openSampleWorkbook("29942.xls")) {
HSSFSheet sheet = wb.getSheetAt(0);
@@ -336,7 +336,7 @@ public final class TestBugs extends Base
* Bug 30540: HSSFSheet.setRowBreak throws NullPointerException
*/
@Test
- public void bug30540() throws Exception {
+ void bug30540() throws Exception {
try (HSSFWorkbook wb = openSampleWorkbook("30540.xls")) {
HSSFSheet s1 = wb.getSheetAt(0);
@@ -355,7 +355,7 @@ public final class TestBugs extends Base
* when HSSFWorkbook is created from file
*/
@Test
- public void bug35564() throws Exception {
+ void bug35564() throws Exception {
simpleTest("35564.xls", wb -> {
HSSFSheet sheet = wb.getSheetAt(0);
assertFalse(sheet.isGridsPrinted());
@@ -367,7 +367,7 @@ public final class TestBugs extends Base
* Bug 35565: HSSFCell.java: NullPtrExc in getColumnBreaks() when HSSFWorkbook is created from file
*/
@Test
- public void bug35565() throws Exception {
+ void bug35565() throws Exception {
simpleTest("35565.xls", wb -> assertNotNull(wb.getSheetAt(0)));
}
@@ -375,7 +375,7 @@ public final class TestBugs extends Base
* Bug 40285: CellIterator Skips First Column
*/
@Test
- public void bug40285() throws Exception {
+ void bug40285() throws Exception {
try (HSSFWorkbook wb = openSampleWorkbook("40285.xls")) {
HSSFSheet sheet = wb.getSheetAt(0);
@@ -403,7 +403,7 @@ public final class TestBugs extends Base
* 4. Get a NullPointerException
*/
@Test
- public void bug38266() throws Exception {
+ void bug38266() throws Exception {
String[] files = {"Simple.xls", "SimpleMultiCell.xls", "duprich1.xls"};
for (String file : files) {
try (HSSFWorkbook wb = openSampleWorkbook(file)) {
@@ -424,7 +424,7 @@ public final class TestBugs extends Base
* Bug 44200: Sheet not cloneable when Note added to excel cell
*/
@Test
- public void bug44200() throws Exception {
+ void bug44200() throws Exception {
simpleTest("44200.xls", wb -> assertDoesNotThrow(() -> wb.cloneSheet(0)));
}
@@ -433,7 +433,7 @@ public final class TestBugs extends Base
* Unknown Ptg in Formula: 0x1a (26)
*/
@Test
- public void bug41546() throws Exception {
+ void bug41546() throws Exception {
simpleTest("41546.xls", wb -> assertEquals(1, wb.getNumberOfSheets()));
}
@@ -442,7 +442,7 @@ public final class TestBugs extends Base
* =CHOOSE(2,A2,A3,A4)
*/
@Test
- public void bug42618() throws Exception {
+ void bug42618() throws Exception {
try (HSSFWorkbook wb1 = openSampleWorkbook("SimpleWithChoose.xls");
HSSFWorkbook wb2 = writeOutAndReadBack(wb1)){
// Check we detect the string properly too
@@ -473,7 +473,7 @@ public final class TestBugs extends Base
* Something up with the FileSharingRecord
*/
@Test
- public void bug43251() throws Exception {
+ void bug43251() throws Exception {
// Used to blow up with an IllegalArgumentException when creating a FileSharingRecord
simpleTest("43251.xls", wb -> assertEquals(1, wb.getNumberOfSheets()));
}
@@ -483,7 +483,7 @@ public final class TestBugs extends Base
* StyleRecords, which is against the spec
*/
@Test
- public void bug44471() throws Exception {
+ void bug44471() throws Exception {
// Used to blow up with an ArrayIndexOutOfBounds when creating a StyleRecord
simpleTest("OddStyleRecord.xls", wb -> assertEquals(1, wb.getNumberOfSheets()));
}
@@ -493,7 +493,7 @@ public final class TestBugs extends Base
* grief on the FileSharingRecord
*/
@Test
- public void bug44536() throws Exception {
+ void bug44536() throws Exception {
// Used to blow up with an IllegalArgumentException when creating a FileSharingRecord
simpleTest("ReadOnlyRecommended.xls", wb -> {
// Check read only advised
@@ -511,7 +511,7 @@ public final class TestBugs extends Base
* probably due to dropdowns
*/
@Test
- public void bug44593() throws Exception {
+ void bug44593() throws Exception {
// Used to blow up with an IllegalArgumentException when creating a DVRecord
// Now won't, but no idea if this means we have rubbish in the DVRecord or not...
simpleTest("44593.xls", wb -> assertEquals(2, wb.getNumberOfSheets()));
@@ -522,7 +522,7 @@ public final class TestBugs extends Base
* length string, but that's now properly handled
*/
@Test
- public void bug44643() throws Exception {
+ void bug44643() throws Exception {
// Used to blow up with an IllegalArgumentException
simpleTest("44643.xls", wb -> assertEquals(1, wb.getNumberOfSheets()));
}
@@ -532,7 +532,7 @@ public final class TestBugs extends Base
* iterator, but we can't replicate that
*/
@Test
- public void bug44693() throws Exception {
+ void bug44693() throws Exception {
try (HSSFWorkbook wb = openSampleWorkbook("44693.xls")) {
HSSFSheet s = wb.getSheetAt(0);
@@ -557,7 +557,7 @@ public final class TestBugs extends Base
* HSSFObjectData
*/
@Test
- public void bug44840() throws Exception {
+ void bug44840() throws Exception {
try (HSSFWorkbook wb = openSampleWorkbook("WithCheckBoxes.xls")) {
// Take a look at the embedded objects
@@ -592,7 +592,7 @@ public final class TestBugs extends Base
* used for printing stuff.
*/
@Test
- public void bug30978() throws Exception {
+ void bug30978() throws Exception {
try (HSSFWorkbook wb1 = openSampleWorkbook("30978-alt.xls")) {
assertEquals(1, wb1.getNumberOfNames());
assertEquals(3, wb1.getNumberOfSheets());
@@ -637,7 +637,7 @@ public final class TestBugs extends Base
* Test that fonts get added properly
*/
@Test
- public void bug45338() throws IOException {
+ void bug45338() throws IOException {
try (HSSFWorkbook wb = new HSSFWorkbook()) {
assertEquals(4, wb.getNumberOfFonts());
@@ -694,7 +694,7 @@ public final class TestBugs extends Base
* containing a zip code, eg ="70164"
*/
@Test
- public void bugZipCodeFormulas() throws Exception {
+ void bugZipCodeFormulas() throws Exception {
try (HSSFWorkbook wb1 = new HSSFWorkbook()) {
HSSFSheet s = wb1.createSheet();
s.createRow(0);
@@ -832,7 +832,7 @@ public final class TestBugs extends Base
* row and cell number
*/
@Test
- public void bug30635() throws IOException {
+ void bug30635() throws IOException {
try (HSSFWorkbook wb = new HSSFWorkbook()) {
HSSFSheet s = wb.createSheet();
@@ -883,7 +883,7 @@ public final class TestBugs extends Base
* Data Tables - ptg 0x2
*/
@Test
- public void bug44958() throws Exception {
+ void bug44958() throws Exception {
try (HSSFWorkbook wb = openSampleWorkbook("44958.xls")) {
HSSFSheet s;
HSSFRow r;
@@ -916,7 +916,7 @@ public final class TestBugs extends Base
* 45322: HSSFSheet.autoSizeColumn fails when style.getDataFormat() returns -1
*/
@Test
- public void bug45322() throws Exception {
+ void bug45322() throws Exception {
try (HSSFWorkbook wb = openSampleWorkbook("44958.xls")) {
HSSFSheet sh = wb.getSheetAt(0);
for (short i = 0; i < 30; i++) {
@@ -931,7 +931,7 @@ public final class TestBugs extends Base
* with diagrams on. Don't any more
*/
@Test
- public void bug45414() throws Exception {
+ void bug45414() throws Exception {
try (HSSFWorkbook wb1 = openSampleWorkbook("WithThreeCharts.xls")) {
wb1.getSheetAt(0).setForceFormulaRecalculation(true);
wb1.getSheetAt(1).setForceFormulaRecalculation(false);
@@ -953,7 +953,7 @@ public final class TestBugs extends Base
* Very hidden sheets not displaying as such
*/
@Test
- public void bug45761() throws Exception {
+ void bug45761() throws Exception {
try (HSSFWorkbook wb1 = openSampleWorkbook("45761.xls")) {
assertEquals(3, wb1.getNumberOfSheets());
@@ -984,7 +984,7 @@ public final class TestBugs extends Base
* POI now supports header / footer text lengths beyond 256 bytes.
*/
@Test
- public void bug45777() throws Exception {
+ void bug45777() throws Exception {
try (HSSFWorkbook wb = new HSSFWorkbook()) {
HSSFSheet s = wb.createSheet();
@@ -1034,7 +1034,7 @@ public final class TestBugs extends Base
* Charts with long titles
*/
@Test
- public void bug45784() throws Exception {
+ void bug45784() throws Exception {
simpleTest("45784.xls", wb -> assertEquals(1, wb.getNumberOfSheets()));
}
@@ -1042,7 +1042,7 @@ public final class TestBugs extends Base
* Cell background colours
*/
@Test
- public void bug45492() throws Exception {
+ void bug45492() throws Exception {
try (HSSFWorkbook wb = openSampleWorkbook("45492.xls")) {
HSSFSheet s = wb.getSheetAt(0);
HSSFRow r = s.getRow(0);
@@ -1080,7 +1080,7 @@ public final class TestBugs extends Base
* ContinueRecord after EOF
*/
@Test
- public void bug46137() throws Exception {
+ void bug46137() throws Exception {
simpleTest("46137.xls", wb -> assertEquals(7, wb.getNumberOfSheets()));
}
@@ -1089,7 +1089,7 @@ public final class TestBugs extends Base
* block[ 44 ] already removed from org.apache.poi.poifs.storage.BlockListImpl.remove
*/
@Test
- public void bug45290() throws Exception {
+ void bug45290() throws Exception {
simpleTest("45290.xls", wb -> assertEquals(1, wb.getNumberOfSheets()));
}
@@ -1098,7 +1098,7 @@ public final class TestBugs extends Base
* =MY_VBA_FUNCTION("lskdjflsk")
*/
@Test
- public void bug30070() throws Exception {
+ void bug30070() throws Exception {
//contains custom VBA function 'Commission'
try (HSSFWorkbook wb = openSampleWorkbook("30070.xls")) {
HSSFSheet sh = wb.getSheetAt(0);
@@ -1131,7 +1131,7 @@ public final class TestBugs extends Base
* Sheet1!$A$3
*/
@Test
- public void bug27364() throws Exception {
+ void bug27364() throws Exception {
try (HSSFWorkbook wb = openSampleWorkbook("27364.xls")) {
HSSFSheet sheet = wb.getSheetAt(0);
@@ -1146,7 +1146,7 @@ public final class TestBugs extends Base
* HSSFCell.getCellFormula() fails with references to external workbooks
*/
@Test
- public void bug31661() throws Exception {
+ void bug31661() throws Exception {
try (HSSFWorkbook wb = openSampleWorkbook("31661.xls")) {
HSSFSheet sheet = wb.getSheetAt(0);
HSSFCell cell = sheet.getRow(11).getCell(10); //K11
@@ -1158,7 +1158,7 @@ public final class TestBugs extends Base
* Incorrect handling of non-ISO 8859-1 characters in Windows ANSII Code Page 1252
*/
@Test
- public void bug27394() throws Exception {
+ void bug27394() throws Exception {
try (HSSFWorkbook wb = openSampleWorkbook("27394.xls")) {
assertEquals("\u0161\u017E", wb.getSheetName(0));
assertEquals("\u0161\u017E\u010D\u0148\u0159", wb.getSheetName(1));
@@ -1173,7 +1173,7 @@ public final class TestBugs extends Base
* Multiple calls of HSSFWorkbook.write result in corrupted xls
*/
@Test
- public void bug32191() throws IOException {
+ void bug32191() throws IOException {
try (HSSFWorkbook wb = openSampleWorkbook("27394.xls");
ByteArrayOutputStream out1 = new ByteArrayOutputStream();
ByteArrayOutputStream out2 = new ByteArrayOutputStream();
@@ -1191,7 +1191,7 @@ public final class TestBugs extends Base
* non-unicode data for a name record
*/
@Test
- public void bug47034() throws Exception {
+ void bug47034() throws Exception {
simpleTest("47034.xls", wb -> {
assertEquals(893, wb.getNumberOfNames());
assertEquals("Matthew\\Matthew11_1\\Matthew2331_1\\Matthew2351_1\\Matthew2361_1___lab", wb.getNameName(300));
@@ -1203,7 +1203,7 @@ public final class TestBugs extends Base
* The test file was created in OpenOffice 3.0 as Excel does not allow cell text longer than 32,767 characters
*/
@Test
- public void bug46368() throws Exception {
+ void bug46368() throws Exception {
try (HSSFWorkbook wb = openSampleWorkbook("46368.xls")) {
HSSFSheet s = wb.getSheetAt(0);
HSSFCell cell1 = s.getRow(0).getCell(0);
@@ -1218,7 +1218,7 @@ public final class TestBugs extends Base
* Short records on certain sheets with charts in them
*/
@Test
- public void bug48180() throws Exception {
+ void bug48180() throws Exception {
try (HSSFWorkbook wb = openSampleWorkbook("48180.xls")) {
HSSFSheet s = wb.getSheetAt(0);
@@ -1234,7 +1234,7 @@ public final class TestBugs extends Base
* Round trip a file with an unusual UnicodeString/ExtRst record parts
*/
@Test
- public void bug47847() throws Exception {
+ void bug47847() throws Exception {
try (HSSFWorkbook wb1 = openSampleWorkbook("47847.xls")) {
assertEquals(3, wb1.getNumberOfSheets());
@@ -1273,7 +1273,7 @@ public final class TestBugs extends Base
* contained in it.
*/
@Test
- public void bug49096() throws Exception {
+ void bug49096() throws Exception {
try (HSSFWorkbook wb1 = openSampleWorkbook("49096.xls")) {
assertEquals(1, wb1.getNumberOfSheets());
@@ -1295,7 +1295,7 @@ public final class TestBugs extends Base
* by reference not value
*/
@Test
- public void bug46664() throws Exception {
+ void bug46664() throws Exception {
try (HSSFWorkbook wb1 = new HSSFWorkbook()) {
HSSFSheet sheet = wb1.createSheet("new_sheet");
HSSFRow row = sheet.createRow((short) 0);
@@ -1353,7 +1353,7 @@ public final class TestBugs extends Base
* sheets via URLs
*/
@Test
- public void bug45970() throws Exception {
+ void bug45970() throws Exception {
try (HSSFWorkbook wb1 = openSampleWorkbook("FormulaRefs.xls")) {
assertEquals(3, wb1.getNumberOfSheets());
@@ -1445,7 +1445,7 @@ public final class TestBugs extends Base
* Test for a file with NameRecord with NameCommentRecord comments
*/
@Test
- public void bug49185() throws Exception {
+ void bug49185() throws Exception {
try (HSSFWorkbook wb1 = openSampleWorkbook("49185.xls")) {
Name name = wb1.getName("foobarName");
assertNotNull(name);
@@ -1477,7 +1477,7 @@ public final class TestBugs extends Base
/** Vertically aligned text */
@Test
- public void bug49524() throws Exception {
+ void bug49524() throws Exception {
try (HSSFWorkbook wb1 = openSampleWorkbook("49524.xls")) {
Sheet s = wb1.getSheetAt(0);
Row r = s.getRow(0);
@@ -1516,7 +1516,7 @@ public final class TestBugs extends Base
* Setting the user style name on custom styles
*/
@Test
- public void bug49689() throws Exception {
+ void bug49689() throws Exception {
try (HSSFWorkbook wb1 = new HSSFWorkbook()) {
HSSFSheet s = wb1.createSheet("Test");
HSSFRow r = s.createRow(0);
@@ -1549,7 +1549,7 @@ public final class TestBugs extends Base
}
@Test
- public void bug49751() throws Exception {
+ void bug49751() throws Exception {
Set<String> exp = new HashSet<>(Arrays.asList(
"20% - Accent1", "20% - Accent2", "20% - Accent3", "20% - Accent4", "20% - Accent5",
"20% - Accent6", "40% - Accent1", "40% - Accent2", "40% - Accent3", "40% - Accent4",
@@ -1574,7 +1574,7 @@ public final class TestBugs extends Base
* Regression with the PageSettingsBlock
*/
@Test
- public void bug49931() throws Exception {
+ void bug49931() throws Exception {
simpleTest("49931.xls", wb -> {
assertEquals(1, wb.getNumberOfSheets());
assertEquals("Foo", wb.getSheetAt(0).getRow(0).getCell(0).getRichStringCellValue().toString());
@@ -1585,7 +1585,7 @@ public final class TestBugs extends Base
* Missing left/right/centre options on a footer
*/
@Test
- public void bug48325() throws Exception {
+ void bug48325() throws Exception {
try (HSSFWorkbook wb = openSampleWorkbook("48325.xls")) {
HSSFSheet sh = wb.getSheetAt(0);
HSSFFooter f = sh.getFooter();
@@ -1603,7 +1603,7 @@ public final class TestBugs extends Base
* Last row number when shifting rows
*/
@Test
- public void bug50416LastRowNumber() throws IOException {
+ void bug50416LastRowNumber() throws IOException {
// Create the workbook with 1 sheet which contains 3 rows
try (HSSFWorkbook wb = new HSSFWorkbook()) {
Sheet sheet = wb.createSheet("Bug50416");
@@ -1661,7 +1661,7 @@ public final class TestBugs extends Base
* will turn the "General" format into "GENERAL"
*/
@Test
- public void bug50756() throws Exception {
+ void bug50756() throws Exception {
try (HSSFWorkbook wb = openSampleWorkbook("50756.xls")) {
HSSFSheet s = wb.getSheetAt(0);
HSSFRow r17 = s.getRow(16);
@@ -1697,7 +1697,7 @@ public final class TestBugs extends Base
* the bit excel cares about
*/
@Test
- public void bug50833() throws Exception {
+ void bug50833() throws Exception {
HSSFWorkbook wb1 = openSampleWorkbook("50833.xls");
HSSFSheet s = wb1.getSheetAt(0);
assertEquals("Sheet1", s.getSheetName());
@@ -1732,12 +1732,12 @@ public final class TestBugs extends Base
* bytes on the end, but we sometimes find files without...
*/
@Test
- public void bug50939() throws Exception {
+ void bug50939() throws Exception {
simpleTest("50939.xls", wb -> assertEquals(2, wb.getNumberOfSheets()));
}
@Test
- public void bug49219() throws Exception {
+ void bug49219() throws Exception {
simpleTest("49219.xls", wb -> {
assertEquals(1, wb.getNumberOfSheets());
assertEquals("DGATE", wb.getSheetAt(0).getRow(1).getCell(0).getStringCellValue());
@@ -1745,7 +1745,7 @@ public final class TestBugs extends Base
}
@Test
- public void bug48968() throws Exception {
+ void bug48968() throws Exception {
TimeZone userTimeZone = LocaleUtil.getUserTimeZone();
LocaleUtil.setUserTimeZone(TimeZone.getTimeZone("CET"));
try {
@@ -1806,7 +1806,7 @@ public final class TestBugs extends Base
* NameComment record
*/
@Test
- public void bug51143() throws Exception {
+ void bug51143() throws Exception {
simpleTest("51143.xls", wb -> assertEquals(1, wb.getNumberOfSheets()));
}
@@ -1815,7 +1815,7 @@ public final class TestBugs extends Base
* shouldn't break on POIFS loading
*/
@Test
- public void bug51461() throws Exception {
+ void bug51461() throws Exception {
byte[] data = HSSFITestDataProvider.instance.getTestDataFileContent("51461.xls");
HSSFWorkbook wbPOIFS = new HSSFWorkbook(new POIFSFileSystem(
@@ -1828,7 +1828,7 @@ public final class TestBugs extends Base
}
@Test
- public void bug51535() throws Exception {
+ void bug51535() throws Exception {
try (HSSFWorkbook wb = openSampleWorkbook("51535.xls")) {
assertEquals(3, wb.getNumberOfSheets());
@@ -1875,14 +1875,14 @@ public final class TestBugs extends Base
}
@Test
- public void bug49896() throws Exception {
+ void bug49896() throws Exception {
String exp = "VLOOKUP(A2,'[C:Documents and Settings/Yegor/My Documents/csco.xls]Sheet1'!$A$2:$B$3,2,FALSE)"
.replace("/", File.separator);
simpleTest("49896.xls", wb -> assertEquals(exp, wb.getSheetAt(0).getRow(1).getCell(1).getCellFormula()));
}
@Test
- public void bug49529() throws Exception {
+ void bug49529() throws Exception {
// user code reported in Bugzilla #49529
simpleTest("49529.xls", wb -> {
wb.getSheetAt(0).createDrawingPatriarch();
@@ -1893,7 +1893,7 @@ public final class TestBugs extends Base
}
@Test
- public void bug49612_part() throws IOException {
+ void bug49612_part() throws IOException {
try (HSSFWorkbook wb = openSampleWorkbook("49612.xls")) {
HSSFSheet sh = wb.getSheetAt(0);
HSSFRow row = sh.getRow(0);
@@ -1915,7 +1915,7 @@ public final class TestBugs extends Base
}
@Test
- public void bug51675() throws Exception {
+ void bug51675() throws Exception {
try (HSSFWorkbook wb = openSampleWorkbook("51675.xls")) {
HSSFSheet sh = wb.getSheetAt(0);
InternalSheet ish = HSSFTestHelper.getSheetForTest(sh);
@@ -1928,7 +1928,7 @@ public final class TestBugs extends Base
}
@Test
- public void bug52272() throws IOException {
+ void bug52272() throws IOException {
try (HSSFWorkbook wb = new HSSFWorkbook()) {
HSSFSheet sh = wb.createSheet();
HSSFPatriarch p = sh.createDrawingPatriarch();
@@ -1942,7 +1942,7 @@ public final class TestBugs extends Base
}
@Test
- public void bug53432() throws IOException {
+ void bug53432() throws IOException {
try (HSSFWorkbook wb1 = new HSSFWorkbook()) {
wb1.addPicture(new byte[]{123, 22}, Workbook.PICTURE_TYPE_JPEG);
assertEquals(wb1.getAllPictures().size(), 1);
@@ -1961,7 +1961,7 @@ public final class TestBugs extends Base
}
@Test
- public void bug46250() throws Exception {
+ void bug46250() throws Exception {
try (HSSFWorkbook wb = openSampleWorkbook("46250.xls")) {
Sheet sh = wb.getSheet("Template");
Sheet cSh = wb.cloneSheet(wb.getSheetIndex(sh));
@@ -1982,7 +1982,7 @@ public final class TestBugs extends Base
}
@Test
- public void bug53404() throws Exception {
+ void bug53404() throws Exception {
try (HSSFWorkbook wb = openSampleWorkbook("53404.xls")) {
Sheet sheet = wb.getSheet("test-sheet");
int rowCount = sheet.getLastRowNum() + 1;
@@ -2012,7 +2012,7 @@ public final class TestBugs extends Base
* Row style information is 12 not 16 bits
*/
@Test
- public void bug49237() throws Exception {
+ void bug49237() throws Exception {
try (Workbook wb = openSampleWorkbook("49237.xls")) {
Sheet sheet = wb.getSheetAt(0);
Row row = sheet.getRow(0);
@@ -2030,7 +2030,7 @@ public final class TestBugs extends Base
"xor-encryption-abc.xls, abc",
"35897-type4.xls, freedom"
})
- public void bug35897(String file, String pass) throws Exception {
+ void bug35897(String file, String pass) throws Exception {
Biff8EncryptionKey.setCurrentUserPassword(pass);
try {
simpleTest(file, null);
@@ -2040,7 +2040,7 @@ public final class TestBugs extends Base
}
@Test
- public void bug56450() throws Exception {
+ void bug56450() throws Exception {
try (HSSFWorkbook wb = openSampleWorkbook("56450.xls")) {
HSSFSheet sheet = wb.getSheetAt(0);
int comments = 0;
@@ -2060,7 +2060,7 @@ public final class TestBugs extends Base
* Files initially created with Excel 2010 can have >3 CF rules
*/
@Test
- public void bug56482() throws Exception {
+ void bug56482() throws Exception {
try (HSSFWorkbook wb = openSampleWorkbook("56482.xls")) {
assertEquals(1, wb.getNumberOfSheets());
@@ -2072,7 +2072,7 @@ public final class TestBugs extends Base
}
@Test
- public void bug56325() throws IOException {
+ void bug56325() throws IOException {
try (HSSFWorkbook wb1 = openSampleWorkbook("56325.xls")) {
assertEquals(3, wb1.getNumberOfSheets());
wb1.removeSheetAt(0);
@@ -2093,7 +2093,7 @@ public final class TestBugs extends Base
}
@Test
- public void bug56325a() throws IOException {
+ void bug56325a() throws IOException {
try (HSSFWorkbook wb1 = openSampleWorkbook("56325a.xls")) {
HSSFSheet sheet = wb1.cloneSheet(2);
@@ -2121,7 +2121,7 @@ public final class TestBugs extends Base
* java.lang.RuntimeException: Unexpected eval class (org.apache.poi.ss.formula.eval.NameXEval)
*/
@Test
- public void bug56737() throws IOException {
+ void bug56737() throws IOException {
try (Workbook wb = openSampleWorkbook("56737.xls")) {
// Check the named range definitions
@@ -2162,7 +2162,7 @@ public final class TestBugs extends Base
* ExtendedFormatRecord when removing un-used styles
*/
@Test
- public void bug54443() throws Exception {
+ void bug54443() throws Exception {
try (HSSFWorkbook workbook = new HSSFWorkbook()) {
HSSFCellStyle style = workbook.createCellStyle();
HSSFCellStyle newStyle = workbook.createCellStyle();
@@ -2187,7 +2187,7 @@ public final class TestBugs extends Base
* Intersection formula ranges, eg =(C2:D3 D3:E4)
*/
@Test
- public void bug52111() throws Exception {
+ void bug52111() throws Exception {
try (Workbook wb = openSampleWorkbook("Intersection-52111.xls")) {
Sheet s = wb.getSheetAt(0);
assertFormula(wb, s.getRow(2).getCell(0), "(C2:D3 D3:E4)", "4.0");
@@ -2197,7 +2197,7 @@ public final class TestBugs extends Base
}
@Test
- public void bug42016() throws Exception {
+ void bug42016() throws Exception {
try (Workbook wb = openSampleWorkbook("42016.xls")) {
Sheet s = wb.getSheetAt(0);
for (int row = 0; row < 7; row++) {
@@ -2210,7 +2210,7 @@ public final class TestBugs extends Base
* Unexpected record type (org.apache.poi.hssf.record.ColumnInfoRecord)
*/
@Test
- public void bug53984() throws Exception {
+ void bug53984() throws Exception {
try (Workbook wb = openSampleWorkbook("53984.xls")) {
Sheet s = wb.getSheetAt(0);
assertEquals("International Communication Services SA", s.getRow(2).getCell(0).getStringCellValue());
@@ -2226,7 +2226,7 @@ public final class TestBugs extends Base
* See base-test-class for some related tests that still fail
*/
@Test
- public void bug46670_existing() throws Exception {
+ void bug46670_existing() throws Exception {
// Expected values
String refLocal = "'[refs" + File.separator + "airport.xls]Sheet1'!$A$2";
String refHttp = "'[9http://www.principlesofeconometrics.com/excel/airline.xls]Sheet1'!$A$2";
@@ -2542,7 +2542,7 @@ public final class TestBugs extends Base
"50779_2.xls", "51670.xls", "54016.xls", "57456.xls", "53109.xls", "com.aida-tour.www_SPO_files_maldives%20august%20october.xls",
"named-cell-in-formula-test.xls", "named-cell-test.xls", "bug55505.xls", "SUBSTITUTE.xls", "64261.xls"
})
- public void simpleTest(String fileName) throws IOException {
+ void simpleTest(String fileName) throws IOException {
simpleTest(fileName, null);
}
@@ -2552,7 +2552,7 @@ public final class TestBugs extends Base
"46904.xls, org.apache.poi.hssf.OldExcelFormatException, The supplied spreadsheet seems to be Excel",
"51832.xls, org.apache.poi.EncryptedDocumentException, Default password is invalid for salt/verifier/verifierHash"
})
- public void simpleTest(String fileName, String exClazz, String exMessage) throws IOException, ClassNotFoundException {
+ void simpleTest(String fileName, String exClazz, String exMessage) throws IOException, ClassNotFoundException {
Class<? extends Exception> ex = (Class<? extends Exception>)Class.forName(exClazz);
Exception e = assertThrows(ex, () -> simpleTest(fileName, null));
assertTrue(e.getMessage().startsWith(exMessage));
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestCryptoAPI.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestCryptoAPI.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestCryptoAPI.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestCryptoAPI.java Sat Jan 9 18:24:51 2021
@@ -30,7 +30,7 @@ public class TestCryptoAPI {
final HSSFITestDataProvider ssTests = HSSFITestDataProvider.instance;
@Test
- public void bug59857() throws IOException {
+ void bug59857() throws IOException {
// XOR-Obfuscation
// TODO: XOR-Obfuscation is currently flawed - although the de-/obfuscation initially works,
// it suddenly differs from the result of encrypted files via Office ...
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestDataValidation.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestDataValidation.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestDataValidation.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestDataValidation.java Sat Jan 9 18:24:51 2021
@@ -60,7 +60,7 @@ public final class TestDataValidation ex
}
- public void assertDataValidation(Workbook wb) {
+ void assertDataValidation(Workbook wb) {
byte[] generatedContent;
try (ByteArrayOutputStream baos = new ByteArrayOutputStream(22000)) {
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestEscherGraphics.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestEscherGraphics.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestEscherGraphics.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestEscherGraphics.java Sat Jan 9 18:24:51 2021
@@ -46,7 +46,7 @@ public final class TestEscherGraphics {
private EscherGraphics graphics;
@BeforeEach
- public void setUp() throws IOException {
+ void setUp() throws IOException {
workbook = new HSSFWorkbook();
HSSFSheet sheet = workbook.createSheet("test");
@@ -57,7 +57,7 @@ public final class TestEscherGraphics {
}
@AfterEach
- public void closeResources() throws IOException {
+ void closeResources() throws IOException {
workbook.close();
}
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestEscherGraphics2d.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestEscherGraphics2d.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestEscherGraphics2d.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestEscherGraphics2d.java Sat Jan 9 18:24:51 2021
@@ -39,7 +39,7 @@ public final class TestEscherGraphics2d
private EscherGraphics2d graphics;
@BeforeEach
- public void setUp() {
+ void setUp() {
workbook = new HSSFWorkbook();
HSSFSheet sheet = workbook.createSheet("test");
escherGroup = sheet.createDrawingPatriarch().createGroup(new HSSFClientAnchor(0,0,1023,255,(short)0,0,(short) 0,0));
@@ -49,7 +49,7 @@ public final class TestEscherGraphics2d
}
@AfterEach
- public void closeResources() throws IOException {
+ void closeResources() throws IOException {
workbook.close();
}
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestFontDetails.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestFontDetails.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestFontDetails.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestFontDetails.java Sat Jan 9 18:24:51 2021
@@ -31,7 +31,7 @@ public final class TestFontDetails {
private FontDetails fontDetails;
@BeforeEach
- public void setUp() {
+ void setUp() {
Properties properties = new Properties();
properties.setProperty("font.Arial.height", "13");
properties.setProperty("font.Arial.characters", "a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ");
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestFormulas.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestFormulas.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestFormulas.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestFormulas.java Sat Jan 9 18:24:51 2021
@@ -431,7 +431,7 @@ public final class TestFormulas {
/**
* Writes a function then tests to see if its correct
*/
- public void refArrayFunctionTest(String function) throws IOException {
+ void refArrayFunctionTest(String function) throws IOException {
try (HSSFWorkbook wb1 = new HSSFWorkbook()) {
HSSFSheet s = wb1.createSheet();
HSSFRow r = s.createRow(0);
@@ -454,7 +454,7 @@ public final class TestFormulas {
* Writes a function then tests to see if its correct
*
*/
- public void refAreaArrayFunctionTest(String function) throws IOException {
+ void refAreaArrayFunctionTest(String function) throws IOException {
try (HSSFWorkbook wb1 = new HSSFWorkbook()) {
HSSFSheet s = wb1.createSheet();
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFCell.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFCell.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFCell.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFCell.java Sat Jan 9 18:24:51 2021
@@ -409,7 +409,7 @@ public final class TestHSSFCell extends
}
@Test
- public void getErrorCellValue_throwsISE_onABlankCell() throws IOException {
+ void getErrorCellValue_throwsISE_onABlankCell() throws IOException {
try (HSSFWorkbook wb = new HSSFWorkbook()) {
Cell cell = wb.createSheet().createRow(0).createCell(0);
assertThrows(IllegalStateException.class, cell::getErrorCellValue);
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java Sat Jan 9 18:24:51 2021
@@ -58,7 +58,7 @@ public final class TestHSSFComment exten
}
@Test
- public void defaultShapeType() {
+ void defaultShapeType() {
HSSFComment comment = new HSSFComment(null, new HSSFClientAnchor());
assertEquals(HSSFSimpleShape.OBJECT_TYPE_COMMENT, comment.getShapeType());
}
@@ -68,7 +68,7 @@ public final class TestHSSFComment exten
* when matching cells and their cell comments. The correct algorithm is to map
*/
@Test
- public void bug47924() throws IOException {
+ void bug47924() throws IOException {
HSSFWorkbook wb = HSSFTestDataSamples.openSampleWorkbook("47924.xls");
HSSFSheet sheet = wb.getSheetAt(0);
HSSFCell cell;
@@ -203,7 +203,7 @@ public final class TestHSSFComment exten
}
@Test
- public void resultEqualsToNonExistingAbstractShape() throws IOException {
+ void resultEqualsToNonExistingAbstractShape() throws IOException {
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sh = wb.createSheet();
HSSFPatriarch patriarch = sh.createDrawingPatriarch();
@@ -268,7 +268,7 @@ public final class TestHSSFComment exten
}
@Test
- public void addToExistingFile() throws IOException {
+ void addToExistingFile() throws IOException {
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sh = wb.createSheet();
HSSFPatriarch patriarch = sh.createDrawingPatriarch();
@@ -315,7 +315,7 @@ public final class TestHSSFComment exten
}
@Test
- public void setGetProperties() throws IOException {
+ void setGetProperties() throws IOException {
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sh = wb.createSheet();
HSSFPatriarch patriarch = sh.createDrawingPatriarch();
@@ -371,7 +371,7 @@ public final class TestHSSFComment exten
}
@Test
- public void existingFileWithComment() throws IOException {
+ void existingFileWithComment() throws IOException {
HSSFWorkbook wb = HSSFTestDataSamples.openSampleWorkbook("drawings.xls");
HSSFSheet sheet = wb.getSheet("comments");
HSSFPatriarch drawing = sheet.getDrawingPatriarch();
@@ -385,7 +385,7 @@ public final class TestHSSFComment exten
}
@Test
- public void findComments() throws IOException{
+ void findComments() throws IOException{
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sh = wb.createSheet();
HSSFPatriarch patriarch = sh.createDrawingPatriarch();
@@ -409,7 +409,7 @@ public final class TestHSSFComment exten
}
@Test
- public void initState() throws IOException{
+ void initState() throws IOException{
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sh = wb.createSheet();
HSSFPatriarch patriarch = sh.createDrawingPatriarch();
@@ -429,7 +429,7 @@ public final class TestHSSFComment exten
}
@Test
- public void shapeId() throws IOException{
+ void shapeId() throws IOException{
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sh = wb.createSheet();
HSSFPatriarch patriarch = sh.createDrawingPatriarch();
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDateUtil.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDateUtil.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDateUtil.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDateUtil.java Sat Jan 9 18:24:51 2021
@@ -54,10 +54,9 @@ public class TestHSSFDateUtil {
/**
* Test that against a real, test file, we still do everything
* correctly
- * @throws IOException
*/
@Test
- public void onARealFile() throws IOException {
+ void onARealFile() throws IOException {
HSSFWorkbook workbook = HSSFTestDataSamples.openSampleWorkbook("DateFormats.xls");
HSSFSheet sheet = workbook.getSheetAt(0);
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPalette.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPalette.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPalette.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPalette.java Sat Jan 9 18:24:51 2021
@@ -41,7 +41,7 @@ public final class TestHSSFPalette {
@BeforeEach
- public void setUp() {
+ void setUp() {
PaletteRecord _palette = new PaletteRecord();
_hssfPalette = new HSSFPalette(_palette);
}
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPicture.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPicture.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPicture.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPicture.java Sat Jan 9 18:24:51 2021
@@ -53,7 +53,7 @@ public final class TestHSSFPicture exten
* Bug # 45829 reported ArithmeticException (/ by zero) when resizing png with zero DPI.
*/
@Test
- public void bug45829() throws IOException {
+ void bug45829() throws IOException {
try (HSSFWorkbook wb = new HSSFWorkbook()) {
HSSFSheet sh1 = wb.createSheet();
HSSFPatriarch p1 = sh1.createDrawingPatriarch();
@@ -67,7 +67,7 @@ public final class TestHSSFPicture exten
@Test
- public void addPictures() throws IOException {
+ void addPictures() throws IOException {
try (HSSFWorkbook wb1 = new HSSFWorkbook()) {
HSSFSheet sh = wb1.createSheet("Pictures");
@@ -166,7 +166,7 @@ public final class TestHSSFPicture exten
@SuppressWarnings("unused")
@Test
- public void bsePictureRef() throws IOException {
+ void bsePictureRef() throws IOException {
try (HSSFWorkbook wb = new HSSFWorkbook()) {
HSSFSheet sh = wb.createSheet("Pictures");
HSSFPatriarch dr = sh.createDrawingPatriarch();
@@ -193,7 +193,7 @@ public final class TestHSSFPicture exten
}
@Test
- public void readExistingImage() throws IOException {
+ void readExistingImage() throws IOException {
try (HSSFWorkbook wb = openSampleWorkbook("drawings.xls")) {
HSSFSheet sheet = wb.getSheet("picture");
HSSFPatriarch drawing = sheet.getDrawingPatriarch();
@@ -206,7 +206,7 @@ public final class TestHSSFPicture exten
@SuppressWarnings("resource")
@Test
- public void setGetProperties() throws IOException {
+ void setGetProperties() throws IOException {
try (HSSFWorkbook wb1 = new HSSFWorkbook()) {
HSSFSheet sh = wb1.createSheet("Pictures");
@@ -234,7 +234,7 @@ public final class TestHSSFPicture exten
@SuppressWarnings("resource")
@Test
- public void bug49658() throws IOException {
+ void bug49658() throws IOException {
// test if inserted EscherMetafileBlip will be read again
try (HSSFWorkbook wb1 = new HSSFWorkbook()) {
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFRangeCopier.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFRangeCopier.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFRangeCopier.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFRangeCopier.java Sat Jan 9 18:24:51 2021
@@ -33,7 +33,7 @@ public class TestHSSFRangeCopier extends
}
@BeforeEach
- public void init() {
+ void init() {
workbook = HSSFTestDataSamples.openSampleWorkbook("tile-range-test.xls");
initSheets();
rangeCopier = new HSSFRangeCopier(sheet1, sheet1);
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java Sat Jan 9 18:24:51 2021
@@ -67,7 +67,7 @@ public final class TestHSSFSheet extends
* Moved from TestHSSFWorkbook#testSetRepeatingRowsAndColumns().
*/
@Test
- public void setRepeatingRowsAndColumnsBug29747() throws IOException {
+ void setRepeatingRowsAndColumnsBug29747() throws IOException {
try (HSSFWorkbook wb = new HSSFWorkbook()) {
wb.createSheet();
wb.createSheet();
@@ -82,7 +82,7 @@ public final class TestHSSFSheet extends
* Test the gridset field gets set as expected.
*/
@Test
- public void backupRecord() throws IOException {
+ void backupRecord() throws IOException {
try (HSSFWorkbook wb = new HSSFWorkbook()) {
HSSFSheet s = wb.createSheet();
GridsetRecord gridsetRec = s.getSheet().getGridsetRecord();
@@ -96,7 +96,7 @@ public final class TestHSSFSheet extends
* Test vertically centered output.
*/
@Test
- public void verticallyCenter() throws IOException {
+ void verticallyCenter() throws IOException {
try (HSSFWorkbook wb = new HSSFWorkbook()) {
HSSFSheet s = wb.createSheet();
VCenterRecord record = s.getSheet().getPageSettings().getVCenter();
@@ -113,7 +113,7 @@ public final class TestHSSFSheet extends
* Test horizontally centered output.
*/
@Test
- public void horizontallyCenter() throws IOException {
+ void horizontallyCenter() throws IOException {
try (HSSFWorkbook wb = new HSSFWorkbook()) {
HSSFSheet s = wb.createSheet();
HCenterRecord record = s.getSheet().getPageSettings().getHCenter();
@@ -131,7 +131,7 @@ public final class TestHSSFSheet extends
* Test WSBoolRecord fields get set in the user model.
*/
@Test
- public void wsBool() throws IOException {
+ void wsBool() throws IOException {
try (HSSFWorkbook wb = new HSSFWorkbook()) {
HSSFSheet s = wb.createSheet();
WSBoolRecord record = (WSBoolRecord) s.getSheet().findFirstRecordBySid(WSBoolRecord.sid);
@@ -181,7 +181,7 @@ public final class TestHSSFSheet extends
* Setting landscape and portrait stuff on existing sheets
*/
@Test
- public void printSetupLandscapeExisting() throws IOException {
+ void printSetupLandscapeExisting() throws IOException {
try (HSSFWorkbook wb1 = HSSFTestDataSamples.openSampleWorkbook("SimpleWithPageBreaks.xls")) {
assertEquals(3, wb1.getNumberOfSheets());
@@ -228,7 +228,7 @@ public final class TestHSSFSheet extends
}
@Test
- public void groupRows() throws IOException {
+ void groupRows() throws IOException {
try (HSSFWorkbook wb1 = new HSSFWorkbook()) {
HSSFSheet s = wb1.createSheet();
HSSFRow r1 = s.createRow(0);
@@ -270,7 +270,7 @@ public final class TestHSSFSheet extends
}
@Test
- public void groupRowsExisting() throws IOException {
+ void groupRowsExisting() throws IOException {
try (HSSFWorkbook wb1 = HSSFTestDataSamples.openSampleWorkbook("NoGutsRecords.xls")) {
HSSFSheet s = wb1.getSheetAt(0);
@@ -320,7 +320,7 @@ public final class TestHSSFSheet extends
}
@Test
- public void createDrawings() throws IOException {
+ void createDrawings() throws IOException {
try (HSSFWorkbook workbook = new HSSFWorkbook()) {
HSSFSheet sheet = workbook.createSheet();
HSSFPatriarch p1 = sheet.createDrawingPatriarch();
@@ -330,7 +330,7 @@ public final class TestHSSFSheet extends
}
@Test
- public void getDrawings() throws IOException {
+ void getDrawings() throws IOException {
try (HSSFWorkbook wb1c = HSSFTestDataSamples.openSampleWorkbook("WithChart.xls");
HSSFWorkbook wb2c = HSSFTestDataSamples.openSampleWorkbook("WithTwoCharts.xls")) {
@@ -356,7 +356,7 @@ public final class TestHSSFSheet extends
* Test that the ProtectRecord is included when creating or cloning a sheet
*/
@Test
- public void cloneWithProtect() throws IOException {
+ void cloneWithProtect() throws IOException {
String passwordA = "secrect";
int expectedHashA = -6810;
String passwordB = "admin";
@@ -387,7 +387,7 @@ public final class TestHSSFSheet extends
}
@Test
- public void protectSheetA() throws IOException {
+ void protectSheetA() throws IOException {
int expectedHash = (short)0xfef1;
try (HSSFWorkbook wb = new HSSFWorkbook()) {
HSSFSheet s = wb.createSheet();
@@ -405,7 +405,7 @@ public final class TestHSSFSheet extends
* (which should be before {@link DimensionsRecord}).
*/
@Test
- public void protectSheetRecordOrder_bug47363a() throws IOException {
+ void protectSheetRecordOrder_bug47363a() throws IOException {
try (HSSFWorkbook wb = new HSSFWorkbook()) {
HSSFSheet s = wb.createSheet();
s.protectSheet("secret");
@@ -427,7 +427,7 @@ public final class TestHSSFSheet extends
* There should be no problem with adding data validations after sheet protection
*/
@Test
- public void dvProtectionOrder_bug47363b() throws IOException {
+ void dvProtectionOrder_bug47363b() throws IOException {
try (HSSFWorkbook workbook = new HSSFWorkbook()) {
HSSFSheet sheet = workbook.createSheet("Sheet1");
sheet.protectSheet("secret");
@@ -452,7 +452,7 @@ public final class TestHSSFSheet extends
}
@Test
- public void zoom() throws IOException {
+ void zoom() throws IOException {
try (HSSFWorkbook wb = new HSSFWorkbook()) {
HSSFSheet sheet = wb.createSheet();
assertEquals(-1, sheet.getSheet().findFirstRecordLocBySid(SCLRecord.sid));
@@ -489,7 +489,7 @@ public final class TestHSSFSheet extends
* Make sure the excel file loads work
*/
@Test
- public void pageBreakFiles() throws IOException {
+ void pageBreakFiles() throws IOException {
try (HSSFWorkbook wb1 = HSSFTestDataSamples.openSampleWorkbook("SimpleWithPageBreaks.xls")) {
HSSFSheet sheet = wb1.getSheetAt(0);
@@ -520,7 +520,7 @@ public final class TestHSSFSheet extends
}
@Test
- public void dbcsName () throws IOException {
+ void dbcsName () throws IOException {
try (HSSFWorkbook wb = HSSFTestDataSamples.openSampleWorkbook("DBCSSheetName.xls")) {
wb.getSheetAt(1);
assertEquals(wb.getSheetName(1), "\u090f\u0915", "DBCS Sheet Name 2");
@@ -534,7 +534,7 @@ public final class TestHSSFSheet extends
* of the sheet when it is first opened.
*/
@Test
- public void topRow() throws IOException {
+ void topRow() throws IOException {
try (HSSFWorkbook wb = HSSFTestDataSamples.openSampleWorkbook("SimpleWithPageBreaks.xls")) {
HSSFSheet sheet = wb.getSheetAt(0);
assertNotNull(sheet);
@@ -548,7 +548,7 @@ public final class TestHSSFSheet extends
}
@Test
- public void addEmptyRow() throws IOException {
+ void addEmptyRow() throws IOException {
//try to add 5 empty rows to a new sheet
try (HSSFWorkbook wb1 = new HSSFWorkbook()) {
HSSFSheet sheet = wb1.createSheet();
@@ -577,7 +577,7 @@ public final class TestHSSFSheet extends
}
@Test
- public void autoSizeColumn() throws IOException {
+ void autoSizeColumn() throws IOException {
try (HSSFWorkbook wb1 = HSSFTestDataSamples.openSampleWorkbook("43902.xls")) {
String sheetName = "my sheet";
HSSFSheet sheet = wb1.getSheet(sheetName);
@@ -626,7 +626,7 @@ public final class TestHSSFSheet extends
* Setting ForceFormulaRecalculation on sheets
*/
@Test
- public void forceRecalculation() throws IOException {
+ void forceRecalculation() throws IOException {
try (HSSFWorkbook wb1 = HSSFTestDataSamples.openSampleWorkbook("UncalcedRecord.xls")) {
HSSFSheet sheet = wb1.getSheetAt(0);
@@ -680,7 +680,7 @@ public final class TestHSSFSheet extends
}
@Test
- public void columnWidthA() throws IOException {
+ void columnWidthA() throws IOException {
// check we can correctly read column widths from a reference workbook
try (HSSFWorkbook wb = HSSFTestDataSamples.openSampleWorkbook("colwidth.xls")) {
@@ -743,7 +743,7 @@ public final class TestHSSFSheet extends
@Test
- public void defaultColumnWidth() throws IOException {
+ void defaultColumnWidth() throws IOException {
try (HSSFWorkbook wb1 = HSSFTestDataSamples.openSampleWorkbook( "12843-1.xls" )) {
HSSFSheet sheet = wb1.getSheetAt(7);
// shall not be NPE
@@ -773,7 +773,7 @@ public final class TestHSSFSheet extends
* Now POI is too.
*/
@Test
- public void missingRowRecords_bug41187() throws IOException {
+ void missingRowRecords_bug41187() throws IOException {
try (HSSFWorkbook wb = HSSFTestDataSamples.openSampleWorkbook("ex41187-19267.xls")) {
HSSFSheet sheet = wb.getSheetAt(0);
HSSFRow row = sheet.getRow(0);
@@ -796,7 +796,7 @@ public final class TestHSSFSheet extends
* See bug #45720.
*/
@Test
- public void cloneSheetWithDrawings() throws IOException {
+ void cloneSheetWithDrawings() throws IOException {
try (HSSFWorkbook wb1 = HSSFTestDataSamples.openSampleWorkbook("45720.xls")) {
HSSFSheet sheet1 = wb1.getSheetAt(0);
@@ -831,7 +831,7 @@ public final class TestHSSFSheet extends
* 31 chars.
*/
@Test
- public void longSheetNames() throws IOException {
+ void longSheetNames() throws IOException {
try (HSSFWorkbook wb = new HSSFWorkbook()) {
final String SAME_PREFIX = "A123456789B123456789C123456789"; // 30 chars
@@ -848,7 +848,7 @@ public final class TestHSSFSheet extends
* Tests that we can read existing column styles
*/
@Test
- public void readColumnStyles() throws IOException {
+ void readColumnStyles() throws IOException {
try (HSSFWorkbook wbNone = HSSFTestDataSamples.openSampleWorkbook("ColumnStyleNone.xls");
HSSFWorkbook wbSimple = HSSFTestDataSamples.openSampleWorkbook("ColumnStyle1dp.xls");
HSSFWorkbook wbComplex = HSSFTestDataSamples.openSampleWorkbook("ColumnStyle1dpColoured.xls")) {
@@ -891,7 +891,7 @@ public final class TestHSSFSheet extends
* Tests the arabic setting
*/
@Test
- public void arabic() throws IOException {
+ void arabic() throws IOException {
try (HSSFWorkbook wb = new HSSFWorkbook()) {
HSSFSheet s = wb.createSheet();
@@ -902,7 +902,7 @@ public final class TestHSSFSheet extends
}
@Test
- public void autoFilter() throws IOException {
+ void autoFilter() throws IOException {
try (HSSFWorkbook wb1 = new HSSFWorkbook()) {
HSSFSheet sh = wb1.createSheet();
InternalWorkbook iwb = wb1.getWorkbook();
@@ -955,7 +955,7 @@ public final class TestHSSFSheet extends
}
@Test
- public void getSetColumnHiddenShort() throws IOException {
+ void getSetColumnHiddenShort() throws IOException {
try (Workbook workbook = new HSSFWorkbook()) {
Sheet sheet = workbook.createSheet("Sheet 1");
sheet.setColumnHidden((short) 2, true);
@@ -964,7 +964,7 @@ public final class TestHSSFSheet extends
}
@Test
- public void columnWidthShort() throws IOException {
+ void columnWidthShort() throws IOException {
try (HSSFWorkbook wb1 = new HSSFWorkbook()) {
Sheet sheet = wb1.createSheet();
@@ -1023,7 +1023,7 @@ public final class TestHSSFSheet extends
}
@Test
- public void showInPane() throws IOException {
+ void showInPane() throws IOException {
try (Workbook wb = new HSSFWorkbook()) {
Sheet sheet = wb.createSheet();
sheet.showInPane(2, 3);
@@ -1037,7 +1037,7 @@ public final class TestHSSFSheet extends
}
@Test
- public void drawingRecords() throws IOException {
+ void drawingRecords() throws IOException {
try (HSSFWorkbook wb = new HSSFWorkbook()) {
HSSFSheet sheet = wb.createSheet();
@@ -1049,7 +1049,7 @@ public final class TestHSSFSheet extends
}
@Test
- public void bug55723b() throws IOException {
+ void bug55723b() throws IOException {
try (HSSFWorkbook wb = new HSSFWorkbook()) {
Sheet sheet = wb.createSheet();
@@ -1095,7 +1095,7 @@ public final class TestHSSFSheet extends
}
@Test
- public void bug59135() throws IOException {
+ void bug59135() throws IOException {
try (HSSFWorkbook wb1 = new HSSFWorkbook()) {
wb1.createSheet().protectSheet("1111.2222.3333.1234");
try (HSSFWorkbook wb2 = writeOutAndReadBack(wb1)) {
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheetShiftColumns.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheetShiftColumns.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheetShiftColumns.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheetShiftColumns.java Sat Jan 9 18:24:51 2021
@@ -34,53 +34,51 @@ public class TestHSSFSheetShiftColumns e
_testDataProvider = HSSFITestDataProvider.instance;
}
- protected Workbook openWorkbook(String spreadsheetFileName)
- throws IOException {
+ protected Workbook openWorkbook(String spreadsheetFileName) {
return HSSFTestDataSamples.openSampleWorkbook(spreadsheetFileName);
}
- protected Workbook getReadBackWorkbook(Workbook wb) throws IOException {
+ protected Workbook getReadBackWorkbook(Workbook wb) {
return HSSFTestDataSamples.writeOutAndReadBack((HSSFWorkbook)wb);
}
@Override
@Disabled("see <https://bz.apache.org/bugzilla/show_bug.cgi?id=62030>")
- @Test
- public void shiftMergedColumnsToMergedColumnsLeft() throws IOException {
+ protected void shiftMergedColumnsToMergedColumnsLeft() {
// This override is used only in order to test failing for HSSF. Please remove method after code is fixed on hssf,
// so that original method from BaseTestSheetShiftColumns can be executed.
}
+
@Override
@Disabled("see <https://bz.apache.org/bugzilla/show_bug.cgi?id=62030>")
- @Test
- public void shiftMergedColumnsToMergedColumnsRight() throws IOException {
+ protected void shiftMergedColumnsToMergedColumnsRight() {
// This override is used only in order to test failing for HSSF. Please remove method after code is fixed on hssf,
// so that original method from BaseTestSheetShiftColumns can be executed.
}
+
@Override
@Disabled("see <https://bz.apache.org/bugzilla/show_bug.cgi?id=62030>")
- @Test
- protected void testBug54524() throws IOException {
+ protected void testBug54524() {
// This override is used only in order to test failing for HSSF. Please remove method after code is fixed on hssf,
// so that original method from BaseTestSheetShiftColumns can be executed.
}
+
@Override
@Disabled("see <https://bz.apache.org/bugzilla/show_bug.cgi?id=62030>")
- @Test
- protected void testCommentsShifting() throws IOException {
+ protected void testCommentsShifting() {
// This override is used only in order to test failing for HSSF. Please remove method after code is fixed on hssf,
// so that original method from BaseTestSheetShiftColumns can be executed.
}
+
@Override
@Disabled("see <https://bz.apache.org/bugzilla/show_bug.cgi?id=62030>")
- @Test
- protected void testShiftWithMergedRegions() throws IOException {
+ protected void testShiftWithMergedRegions() {
// This override is used only in order to test failing for HSSF. Please remove method after code is fixed on hssf,
// so that original method from BaseTestSheetShiftColumns can be executed.
// After removing, you can re-add 'final' keyword to specification of original method.
}
+
@Override
@Disabled("see <https://bz.apache.org/bugzilla/show_bug.cgi?id=62030>")
- @Test
- protected void testShiftHyperlinks() throws IOException {}
+ protected void testShiftHyperlinks() {}
}
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFWorkbook.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFWorkbook.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFWorkbook.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFWorkbook.java Sat Jan 9 18:24:51 2021
@@ -98,7 +98,7 @@ public final class TestHSSFWorkbook exte
* Tests for {@link HSSFWorkbook#isHidden()} etc
*/
@Test
- public void hidden() throws IOException {
+ void hidden() throws IOException {
HSSFWorkbook wb = new HSSFWorkbook();
WindowOneRecord w1 = wb.getWorkbook().getWindowOne();
@@ -126,7 +126,7 @@ public final class TestHSSFWorkbook exte
}
@Test
- public void readWriteWithCharts() throws IOException {
+ void readWriteWithCharts() throws IOException {
Sheet s;
// Single chart, two sheets
@@ -196,7 +196,7 @@ public final class TestHSSFWorkbook exte
}
@Test
- public void selectedSheet_bug44523() throws IOException {
+ void selectedSheet_bug44523() throws IOException {
HSSFWorkbook wb=new HSSFWorkbook();
HSSFSheet sheet1 = wb.createSheet("Sheet1");
HSSFSheet sheet2 = wb.createSheet("Sheet2");
@@ -243,7 +243,7 @@ public final class TestHSSFWorkbook exte
}
@Test
- public void selectMultiple() throws IOException {
+ void selectMultiple() throws IOException {
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sheet0 = wb.createSheet("Sheet0");
HSSFSheet sheet1 = wb.createSheet("Sheet1");
@@ -287,7 +287,7 @@ public final class TestHSSFWorkbook exte
@Test
- public void activeSheetAfterDelete_bug40414() throws IOException {
+ void activeSheetAfterDelete_bug40414() throws IOException {
HSSFWorkbook wb=new HSSFWorkbook();
HSSFSheet sheet0 = wb.createSheet("Sheet0");
HSSFSheet sheet1 = wb.createSheet("Sheet1");
@@ -369,7 +369,7 @@ public final class TestHSSFWorkbook exte
* a specific exception as soon as the situation is detected. See bugzilla 45066
*/
@Test
- public void sheetSerializeSizeMismatch_bug45066() throws IOException {
+ void sheetSerializeSizeMismatch_bug45066() throws IOException {
try (HSSFWorkbook wb = new HSSFWorkbook()) {
InternalSheet sheet = wb.createSheet("Sheet1").getSheet();
List<RecordBase> sheetRecords = sheet.getRecords();
@@ -386,7 +386,7 @@ public final class TestHSSFWorkbook exte
* that point to deleted sheets
*/
@Test
- public void namesToDeleteSheets() throws IOException {
+ void namesToDeleteSheets() throws IOException {
HSSFWorkbook b = openSampleWorkbook("30978-deleted.xls");
assertEquals(3, b.getNumberOfNames());
@@ -508,7 +508,7 @@ public final class TestHSSFWorkbook exte
* The sample file provided with bug 45582 seems to have one extra byte after the EOFRecord
*/
@Test
- public void extraDataAfterEOFRecord() throws IOException {
+ void extraDataAfterEOFRecord() throws IOException {
// bug 45582 - RecordFormatException - getCause() instanceof LittleEndian.BufferUnderrunException
try (HSSFWorkbook wb = openSampleWorkbook("ex45582-22397.xls")) {
assertNotNull(wb);
@@ -520,7 +520,7 @@ public final class TestHSSFWorkbook exte
* 1-based sheet tab index (not a 1-based extern sheet index)
*/
@Test
- public void findBuiltInNameRecord() throws IOException {
+ void findBuiltInNameRecord() throws IOException {
// testRRaC has multiple (3) built-in name records
// The second print titles name record has getSheetNumber()==4
HSSFWorkbook wb1 = openSampleWorkbook("testRRaC.xls");
@@ -553,7 +553,7 @@ public final class TestHSSFWorkbook exte
* Test that the storage clsid property is preserved
*/
@Test
- public void bug47920() throws IOException {
+ void bug47920() throws IOException {
POIFSFileSystem fs1 = new POIFSFileSystem(samples.openResourceAsStream("47920.xls"));
HSSFWorkbook wb = new HSSFWorkbook(fs1);
ClassID clsid1 = fs1.getRoot().getStorageClsid();
@@ -581,7 +581,7 @@ public final class TestHSSFWorkbook exte
"testEXCEL_5.xls,BIFF5",
"testEXCEL_95.xls,BIFF5"
})
- public void helpfulExceptionOnOldFiles(String file, String format) throws Exception {
+ void helpfulExceptionOnOldFiles(String file, String format) throws Exception {
POIDataSamples xlsData = samples;
try (InputStream is = xlsData.openResourceAsStream(file)) {
OldExcelFormatException e = assertThrows(OldExcelFormatException.class, () -> new HSSFWorkbook(is),
@@ -595,7 +595,7 @@ public final class TestHSSFWorkbook exte
* and {@link POIFSFileSystem}
*/
@Test
- public void differentPOIFS() throws Exception {
+ void differentPOIFS() throws Exception {
// Open the two filesystems
DirectoryNode[] files = new DirectoryNode[2];
try (POIFSFileSystem poifsFileSystem = new POIFSFileSystem(HSSFTestDataSamples.openSampleFileStream("Simple.xls"))) {
@@ -627,7 +627,7 @@ public final class TestHSSFWorkbook exte
}
@Test
- public void wordDocEmbeddedInXls() throws IOException {
+ void wordDocEmbeddedInXls() throws IOException {
// Open the two filesystems
DirectoryNode[] files = new DirectoryNode[2];
try (POIFSFileSystem poifsFileSystem = new POIFSFileSystem(HSSFTestDataSamples.openSampleFileStream("WithEmbeddedObjects.xls"))) {
@@ -665,7 +665,7 @@ public final class TestHSSFWorkbook exte
* again (via POIFS) and have it be valid
*/
@Test
- public void writeWorkbookFromPOIFS() throws IOException {
+ void writeWorkbookFromPOIFS() throws IOException {
try (InputStream is = HSSFTestDataSamples.openSampleFileStream("WithEmbeddedObjects.xls");
POIFSFileSystem fs = new POIFSFileSystem(is)) {
@@ -683,7 +683,7 @@ public final class TestHSSFWorkbook exte
}
@Test
- public void cellStylesLimit() throws IOException {
+ void cellStylesLimit() throws IOException {
try (Workbook wb = new HSSFWorkbook()) {
int numBuiltInStyles = wb.getNumCellStyles();
int MAX_STYLES = 4030;
@@ -701,7 +701,7 @@ public final class TestHSSFWorkbook exte
}
@Test
- public void setSheetOrderHSSF() throws IOException{
+ void setSheetOrderHSSF() throws IOException{
Workbook wb = new HSSFWorkbook();
Sheet s1 = wb.createSheet("first sheet");
Sheet s2 = wb.createSheet("other sheet");
@@ -762,7 +762,7 @@ public final class TestHSSFWorkbook exte
}
@Test
- public void clonePictures() throws IOException {
+ void clonePictures() throws IOException {
HSSFWorkbook wb = openSampleWorkbook("SimpleWithImages.xls");
InternalWorkbook iwb = wb.getWorkbook();
iwb.findDrawingGroup();
@@ -789,14 +789,14 @@ public final class TestHSSFWorkbook exte
// Should throw exception about invalid POIFSFileSystem
@Test
- public void emptyDirectoryNode() throws IOException {
+ void emptyDirectoryNode() throws IOException {
try (POIFSFileSystem fs = new POIFSFileSystem()) {
assertThrows(IllegalArgumentException.class, () -> new HSSFWorkbook(fs).close());
}
}
@Test
- public void selectedSheetShort() throws IOException {
+ void selectedSheetShort() throws IOException {
HSSFWorkbook wb=new HSSFWorkbook();
HSSFSheet sheet1 = wb.createSheet("Sheet1");
@@ -830,7 +830,7 @@ public final class TestHSSFWorkbook exte
}
@Test
- public void names() throws IOException {
+ void names() throws IOException {
HSSFWorkbook wb=new HSSFWorkbook();
IllegalStateException ex1 = assertThrows(IllegalStateException.class, () -> wb.getNameAt(0));
@@ -866,7 +866,7 @@ public final class TestHSSFWorkbook exte
}
@Test
- public void writeProtection() throws IOException {
+ void writeProtection() throws IOException {
HSSFWorkbook wb=new HSSFWorkbook();
assertFalse(wb.isWriteProtected());
@@ -881,7 +881,7 @@ public final class TestHSSFWorkbook exte
}
@Test
- public void bug50298() throws Exception {
+ void bug50298() throws Exception {
HSSFWorkbook wb = openSampleWorkbook("50298.xls");
assertSheetOrder(wb, "Invoice", "Invoice1", "Digest", "Deferred", "Received");
@@ -915,7 +915,7 @@ public final class TestHSSFWorkbook exte
}
@Test
- public void bug50298a() throws Exception {
+ void bug50298a() throws Exception {
HSSFWorkbook wb = openSampleWorkbook("50298.xls");
assertSheetOrder(wb, "Invoice", "Invoice1", "Digest", "Deferred", "Received");
@@ -957,7 +957,7 @@ public final class TestHSSFWorkbook exte
}
@Test
- public void bug54500() throws Exception {
+ void bug54500() throws Exception {
String nameName = "AName";
String sheetName = "ASheet";
HSSFWorkbook wb = openSampleWorkbook("54500.xls");
@@ -1092,7 +1092,7 @@ public final class TestHSSFWorkbook exte
}
@Test
- public void closeDoesNotModifyWorkbook() throws IOException {
+ void closeDoesNotModifyWorkbook() throws IOException {
final String filename = "SampleSS.xls";
final File file = samples.getFile(filename);
Workbook wb;
@@ -1107,7 +1107,7 @@ public final class TestHSSFWorkbook exte
}
@Test
- public void setSheetOrderToEnd() throws Exception {
+ void setSheetOrderToEnd() throws Exception {
try (HSSFWorkbook workbook = new HSSFWorkbook()) {
workbook.createSheet("A");
workbook.createSheet("B");
@@ -1118,7 +1118,7 @@ public final class TestHSSFWorkbook exte
}
@Test
- public void invalidInPlaceWrite() throws Exception {
+ void invalidInPlaceWrite() throws Exception {
// Can't work for new files
try (HSSFWorkbook wb = new HSSFWorkbook()) {
assertThrows(IllegalStateException.class, wb::write, "Shouldn't work for new files");
@@ -1138,7 +1138,7 @@ public final class TestHSSFWorkbook exte
}
@Test
- public void inPlaceWrite() throws Exception {
+ void inPlaceWrite() throws Exception {
// Setup as a copy of a known-good file
final File file = TempFile.createTempFile("TestHSSFWorkbook", ".xls");
try (InputStream inputStream = samples.openResourceAsStream("SampleSS.xls");
@@ -1183,7 +1183,7 @@ public final class TestHSSFWorkbook exte
}
}
- public void createDrawing() throws Exception {
+ void createDrawing() throws Exception {
// the dimensions for this image are different than for XSSF and SXSSF
}
}
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestMatrixFormulasFromBinarySpreadsheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestMatrixFormulasFromBinarySpreadsheet.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestMatrixFormulasFromBinarySpreadsheet.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestMatrixFormulasFromBinarySpreadsheet.java Sat Jan 9 18:24:51 2021
@@ -140,7 +140,7 @@ public final class TestMatrixFormulasFro
@ParameterizedTest
@MethodSource("data")
- public void processFunctionRow(String targetFunctionName, int formulasRowIdx) {
+ void processFunctionRow(String targetFunctionName, int formulasRowIdx) {
int endColNum = Navigator.START_RESULT_COL_INDEX + Navigator.COL_OFF_EXPECTED_RESULT;
Modified: poi/trunk/src/testcases/org/apache/poi/hssf/util/TestCellReference.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/util/TestCellReference.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/util/TestCellReference.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/util/TestCellReference.java Sat Jan 9 18:24:51 2021
@@ -67,43 +67,43 @@ public final class TestCellReference {
}
@Test
- public void testAbsRef2(){
+ void testAbsRef2(){
CellReference cf = new CellReference(4,1,true,true);
confirmCell(cf, null, 4, 1, true, true, "$B$5");
}
@Test
- public void testAbsRef3(){
+ void testAbsRef3(){
CellReference cf = new CellReference("B$5");
confirmCell(cf, null, 4, 1, true, false, "B$5");
}
@Test
- public void testAbsRef4(){
+ void testAbsRef4(){
CellReference cf = new CellReference(4,1,true,false);
confirmCell(cf, null, 4, 1, true, false, "B$5");
}
@Test
- public void testAbsRef5(){
+ void testAbsRef5(){
CellReference cf = new CellReference("$B5");
confirmCell(cf, null, 4, 1, false, true, "$B5");
}
@Test
- public void testAbsRef6(){
+ void testAbsRef6(){
CellReference cf = new CellReference(4,1,false,true);
confirmCell(cf, null, 4, 1, false, true, "$B5");
}
@Test
- public void testAbsRef7(){
+ void testAbsRef7(){
CellReference cf = new CellReference("B5");
confirmCell(cf, null, 4, 1, false, false, "B5");
}
@Test
- public void testAbsRef8(){
+ void testAbsRef8(){
CellReference cf = new CellReference(4,1,false,false);
confirmCell(cf, null, 4, 1, false, false, "B5");
}
Modified: poi/trunk/src/testcases/org/apache/poi/poifs/crypt/TestBiff8DecryptingStream.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/poifs/crypt/TestBiff8DecryptingStream.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/poifs/crypt/TestBiff8DecryptingStream.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/poifs/crypt/TestBiff8DecryptingStream.java Sat Jan 9 18:24:51 2021
@@ -77,7 +77,7 @@ public final class TestBiff8DecryptingSt
* Used to 'skip over' the uninteresting middle bits of the key blocks.
* Also confirms that read position of the underlying stream is aligned.
*/
- public void rollForward(int fromPosition, int toPosition) {
+ void rollForward(int fromPosition, int toPosition) {
assertEquals(fromPosition, _bds.getPosition());
for (int i = fromPosition; i < toPosition; i++) {
_bds.readByte();
@@ -85,15 +85,15 @@ public final class TestBiff8DecryptingSt
assertEquals(toPosition, _bds.getPosition());
}
- public void confirmByte(int expVal) {
+ void confirmByte(int expVal) {
assertEquals(expVal, _bds.readUByte());
}
- public void confirmShort(int expVal) {
+ void confirmShort(int expVal) {
assertEquals((short)expVal, _bds.readShort());
}
- public void confirmUShort(int expVal) {
+ void confirmUShort(int expVal) {
assertEquals(expVal, _bds.readUShort());
}
@@ -105,15 +105,15 @@ public final class TestBiff8DecryptingSt
return _bds.readUShort();
}
- public void confirmInt(int expVal) {
+ void confirmInt(int expVal) {
assertEquals(expVal, _bds.readInt());
}
- public void confirmLong(long expVal) {
+ void confirmLong(long expVal) {
assertEquals(expVal, _bds.readLong());
}
- public void confirmData(String expHexData) {
+ void confirmData(String expHexData) {
byte[] expData = HexRead.readFromString(expHexData);
byte[] actData = new byte[expData.length];
@@ -126,7 +126,7 @@ public final class TestBiff8DecryptingSt
* Tests reading of 64,32,16 and 8 bit integers aligned with key changing boundaries
*/
@Test
- public void readsAlignedWithBoundary() {
+ void readsAlignedWithBoundary() {
StreamTester st = createStreamTester();
st.rollForward(0x0004, 0x03FF);
@@ -156,7 +156,7 @@ public final class TestBiff8DecryptingSt
* Tests reading of 64,32 and 16 bit integers <i>across</i> key changing boundaries
*/
@Test
- public void readsSpanningBoundary() {
+ void readsSpanningBoundary() {
StreamTester st = createStreamTester();
st.rollForward(0x0004, 0x03FC);
@@ -172,7 +172,7 @@ public final class TestBiff8DecryptingSt
* and that the RC4 stream stays aligned during these calls
*/
@Test
- public void readHeaderUShort() {
+ void readHeaderUShort() {
StreamTester st = createStreamTester();
st.rollForward(0x0004, 0x03FF);
@@ -195,7 +195,7 @@ public final class TestBiff8DecryptingSt
* Tests reading of byte sequences <i>across</i> and <i>aligned with</i> key changing boundaries
*/
@Test
- public void readByteArrays() {
+ void readByteArrays() {
StreamTester st = createStreamTester();
st.rollForward(0x0004, 0x2FFC);
Modified: poi/trunk/src/testcases/org/apache/poi/poifs/crypt/TestCipherAlgorithm.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/poifs/crypt/TestCipherAlgorithm.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/poifs/crypt/TestCipherAlgorithm.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/poifs/crypt/TestCipherAlgorithm.java Sat Jan 9 18:24:51 2021
@@ -25,7 +25,7 @@ import org.junit.jupiter.api.Test;
public class TestCipherAlgorithm {
@Test
- public void validInputs() {
+ void validInputs() {
assertEquals(128, CipherAlgorithm.aes128.defaultKeySize);
for(CipherAlgorithm alg : CipherAlgorithm.values()) {
@@ -37,7 +37,7 @@ public class TestCipherAlgorithm {
}
@Test
- public void invalidInputs() {
+ void invalidInputs() {
assertThrows(EncryptedDocumentException.class, () -> CipherAlgorithm.fromEcmaId(0));
assertThrows(EncryptedDocumentException.class, () -> CipherAlgorithm.fromXmlId("AES", 1));
assertThrows(EncryptedDocumentException.class, () -> CipherAlgorithm.fromXmlId("RC1", 0x40));
Modified: poi/trunk/src/testcases/org/apache/poi/poifs/crypt/TestXorEncryption.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/poifs/crypt/TestXorEncryption.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/poifs/crypt/TestXorEncryption.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/poifs/crypt/TestXorEncryption.java Sat Jan 9 18:24:51 2021
@@ -74,7 +74,7 @@ public class TestXorEncryption {
@Test
@Disabled("currently not supported")
- public void encrypt() throws IOException {
+ void encrypt() throws IOException {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
try {
try (HSSFWorkbook hwb = HSSFTestDataSamples.openSampleWorkbook("SampleSS.xls")) {
Modified: poi/trunk/src/testcases/org/apache/poi/poifs/crypt/binaryrc4/TestBinaryRC4.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/poifs/crypt/binaryrc4/TestBinaryRC4.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/poifs/crypt/binaryrc4/TestBinaryRC4.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/poifs/crypt/binaryrc4/TestBinaryRC4.java Sat Jan 9 18:24:51 2021
@@ -32,7 +32,7 @@ import org.junit.jupiter.api.Test;
public class TestBinaryRC4 {
@Test
- public void createKeyDigest() {
+ void createKeyDigest() {
byte[] docIdData = readFromString("17 F6 D1 6B 09 B1 5F 7B 4C 9D 03 B4 81 B5 B4 4A");
byte[] expResult = readFromString("C2 D9 56 B2 6B");
Modified: poi/trunk/src/testcases/org/apache/poi/poifs/dev/TestPOIFSDump.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/poifs/dev/TestPOIFSDump.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/poifs/dev/TestPOIFSDump.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/poifs/dev/TestPOIFSDump.java Sat Jan 9 18:24:51 2021
@@ -75,7 +75,7 @@ public class TestPOIFSDump {
};
@AfterEach
- public void tearDown() throws IOException {
+ void tearDown() throws IOException {
// clean up the directory that POIFSDump writes to
deleteDirectory(new File(new File(TEST_FILE+"_dump").getName()));
}
Modified: poi/trunk/src/testcases/org/apache/poi/poifs/filesystem/TestDocumentInputStream.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/poifs/filesystem/TestDocumentInputStream.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/poifs/filesystem/TestDocumentInputStream.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/poifs/filesystem/TestDocumentInputStream.java Sat Jan 9 18:24:51 2021
@@ -46,7 +46,7 @@ public final class TestDocumentInputStre
private static final int _buffer_size = 6;
@BeforeEach
- public void setUp() throws Exception {
+ void setUp() throws Exception {
int blocks = (_workbook_size + 511) / 512;
_workbook_data = new byte[512 * blocks];
Modified: poi/trunk/src/testcases/org/apache/poi/poifs/filesystem/TestFileSystemBugs.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/poifs/filesystem/TestFileSystemBugs.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/poifs/filesystem/TestFileSystemBugs.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/poifs/filesystem/TestFileSystemBugs.java Sat Jan 9 18:24:51 2021
@@ -43,7 +43,7 @@ public final class TestFileSystemBugs {
private List<POIFSFileSystem> openedFSs;
@AfterEach
- public void tearDown() {
+ void tearDown() {
if (openedFSs != null && !openedFSs.isEmpty()) {
for (POIFSFileSystem fs : openedFSs) {
try {
Modified: poi/trunk/src/testcases/org/apache/poi/poifs/filesystem/TestFilteringDirectoryNode.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/poifs/filesystem/TestFilteringDirectoryNode.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/poifs/filesystem/TestFilteringDirectoryNode.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/poifs/filesystem/TestFilteringDirectoryNode.java Sat Jan 9 18:24:51 2021
@@ -47,7 +47,7 @@ public final class TestFilteringDirector
private DocumentEntry eAA;
@BeforeEach
- public void setUp() throws Exception {
+ void setUp() throws Exception {
fs = new POIFSFileSystem();
dirA = fs.createDirectory("DirA");
dirB = fs.createDirectory("DirB");
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org