diff options
Diffstat (limited to 'src/ooxml/testcases/org/apache/poi/xssf/usermodel')
6 files changed, 10 insertions, 11 deletions
diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestFormulaEvaluatorOnXSSF.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestFormulaEvaluatorOnXSSF.java index ad8b49028d..c6f3e3cf53 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestFormulaEvaluatorOnXSSF.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestFormulaEvaluatorOnXSSF.java @@ -132,7 +132,7 @@ public final class TestFormulaEvaluatorOnXSSF { sheet = workbook.getSheetAt( 0 ); evaluator = new XSSFFormulaEvaluator(workbook); - List<Object[]> data = new ArrayList<Object[]>(); + List<Object[]> data = new ArrayList<>(); processFunctionGroup(data, SS.START_OPERATORS_ROW_INDEX, null); processFunctionGroup(data, SS.START_FUNCTIONS_ROW_INDEX, null); diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestMultiSheetFormulaEvaluatorOnXSSF.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestMultiSheetFormulaEvaluatorOnXSSF.java index b8926a3cf5..bdd85130c8 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestMultiSheetFormulaEvaluatorOnXSSF.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestMultiSheetFormulaEvaluatorOnXSSF.java @@ -117,7 +117,7 @@ public final class TestMultiSheetFormulaEvaluatorOnXSSF { sheet = workbook.getSheet( SS.TEST_SHEET_NAME ); evaluator = new XSSFFormulaEvaluator(workbook); - List<Object[]> data = new ArrayList<Object[]>(); + List<Object[]> data = new ArrayList<>(); processFunctionGroup(data, SS.START_FUNCTIONS_ROW_INDEX, null); diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java index 01e3b92807..2fef668932 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java @@ -2463,7 +2463,6 @@ public final class TestXSSFBugs extends BaseTestBugzillaIssues { * .xlsx supports 64000 cell styles, the style indexes after * 32,767 must not be -32,768, then -32,767, -32,766 */ - @SuppressWarnings("resource") @Test public void bug57880() throws IOException { int numStyles = 33000; @@ -2475,7 +2474,7 @@ public final class TestXSSFBugs extends BaseTestBugzillaIssues { } assertEquals(numStyles, wb.getNumCellStyles()); - // avoid OOM in gump run + // avoid OOM in Gump run File file = XSSFTestDataSamples.writeOutAndClose(wb, "bug57880"); //noinspection UnusedAssignment wb = null; @@ -2513,7 +2512,7 @@ public final class TestXSSFBugs extends BaseTestBugzillaIssues { assertNotNull(sheet); Map<String, Object[]> data; - data = new TreeMap<String, Object[]>(); + data = new TreeMap<>(); data.put("1", new Object[]{"ID", "NAME", "LASTNAME"}); data.put("2", new Object[]{2, "Amit", "Shukla"}); data.put("3", new Object[]{1, "Lokesh", "Gupta"}); @@ -2773,7 +2772,7 @@ public final class TestXSSFBugs extends BaseTestBugzillaIssues { public void test51998() throws IOException { Workbook wb = XSSFTestDataSamples.openSampleWorkbook("51998.xlsx"); - Set<String> sheetNames = new HashSet<String>(); + Set<String> sheetNames = new HashSet<>(); for (int sheetNum = 0; sheetNum < wb.getNumberOfSheets(); sheetNum++) { sheetNames.add(wb.getSheetName(sheetNum)); @@ -2983,7 +2982,7 @@ public final class TestXSSFBugs extends BaseTestBugzillaIssues { // Everything is fine at this point, cell is red - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(CellUtil.BORDER_BOTTOM, BorderStyle.THIN); CellUtil.setCellStyleProperties(cell, properties); diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFormulaEvaluation.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFormulaEvaluation.java index 5afad20672..e92143ca8b 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFormulaEvaluation.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFormulaEvaluation.java @@ -159,7 +159,7 @@ public final class TestXSSFFormulaEvaluation extends BaseTestFormulaEvaluator { } // Setup the environment - Map<String,FormulaEvaluator> evaluators = new HashMap<String, FormulaEvaluator>(); + Map<String,FormulaEvaluator> evaluators = new HashMap<>(); evaluators.put("ref2-56737.xlsx", evaluator); evaluators.put("56737.xlsx", _testDataProvider.openSampleWorkbook("56737.xlsx").getCreationHelper().createFormulaEvaluator()); diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheet.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheet.java index d1c975d637..4eff222a24 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheet.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheet.java @@ -296,9 +296,9 @@ public final class TestXSSFSheet extends BaseTestXSheet { sheet.addMergedRegion(region_3); sheet.addMergedRegion(region_4); // test invalid indexes OOBE - Set<Integer> rmIdx = new HashSet<Integer>(Arrays.asList(5,6)); + Set<Integer> rmIdx = new HashSet<>(Arrays.asList(5, 6)); sheet.removeMergedRegions(rmIdx); - rmIdx = new HashSet<Integer>(Arrays.asList(1,3)); + rmIdx = new HashSet<>(Arrays.asList(1, 3)); sheet.removeMergedRegions(rmIdx); assertEquals("A1:B2", ctWorksheet.getMergeCells().getMergeCellArray(0).getRef()); assertEquals("E5:F6", ctWorksheet.getMergeCells().getMergeCellArray(1).getRef()); diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFTable.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFTable.java index 06ef68a549..6ff8b8b007 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFTable.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFTable.java @@ -50,7 +50,7 @@ public final class TestXSSFTable { // read the original sheet header order XSSFRow row = wb1.getSheetAt(0).getRow(0); - List<String> headers = new ArrayList<String>(); + List<String> headers = new ArrayList<>(); for (Cell cell : row) { headers.add(cell.getStringCellValue()); } |