diff options
author | Dominik Stadler <centic@apache.org> | 2017-09-16 08:27:23 +0000 |
---|---|---|
committer | Dominik Stadler <centic@apache.org> | 2017-09-16 08:27:23 +0000 |
commit | 0cfa1ede4cbc9c00d2f5d3946ae9f57a6dd74d48 (patch) | |
tree | b7f6385f47dbeda7309986def1a4450c64499eb0 /src/testcases/org/apache/poi/ss/formula | |
parent | 3e70d75cfb84a6eb6ddb06d1028e636cf03914d1 (diff) | |
download | poi-0cfa1ede4cbc9c00d2f5d3946ae9f57a6dd74d48.tar.gz poi-0cfa1ede4cbc9c00d2f5d3946ae9f57a6dd74d48.zip |
Remove unnecessary type arguments (Java 8)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808516 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/ss/formula')
7 files changed, 15 insertions, 15 deletions
diff --git a/src/testcases/org/apache/poi/ss/formula/TestEvaluationCache.java b/src/testcases/org/apache/poi/ss/formula/TestEvaluationCache.java index 4641c4fdc3..923392a30c 100644 --- a/src/testcases/org/apache/poi/ss/formula/TestEvaluationCache.java +++ b/src/testcases/org/apache/poi/ss/formula/TestEvaluationCache.java @@ -96,9 +96,9 @@ public class TestEvaluationCache extends TestCase { public EvalListener(HSSFWorkbook wb) { _book = wb; - _logList = new ArrayList<String>(); - _formulaCellsByCacheEntry = new HashMap<ICacheEntry,EvaluationCell>(); - _plainCellLocsByCacheEntry = new HashMap<ICacheEntry, Loc>(); + _logList = new ArrayList<>(); + _formulaCellsByCacheEntry = new HashMap<>(); + _plainCellLocsByCacheEntry = new HashMap<>(); } @Override public void onCacheHit(int sheetIndex, int rowIndex, int columnIndex, ValueEval result) { diff --git a/src/testcases/org/apache/poi/ss/formula/TestMissingWorkbook.java b/src/testcases/org/apache/poi/ss/formula/TestMissingWorkbook.java index 3e467b2bef..b9f09a1318 100644 --- a/src/testcases/org/apache/poi/ss/formula/TestMissingWorkbook.java +++ b/src/testcases/org/apache/poi/ss/formula/TestMissingWorkbook.java @@ -117,7 +117,7 @@ public class TestMissingWorkbook extends TestCase { FormulaEvaluator lMainWorkbookEvaluator = mainWorkbook.getCreationHelper().createFormulaEvaluator(); FormulaEvaluator lSourceEvaluator = sourceWorkbook.getCreationHelper().createFormulaEvaluator(); - Map<String,FormulaEvaluator> workbooks = new HashMap<String, FormulaEvaluator>(); + Map<String,FormulaEvaluator> workbooks = new HashMap<>(); workbooks.put(MAIN_WORKBOOK_FILENAME, lMainWorkbookEvaluator); workbooks.put(SOURCE_DUMMY_WORKBOOK_FILENAME, lSourceEvaluator); lMainWorkbookEvaluator.setupReferencedWorkbooks(workbooks); diff --git a/src/testcases/org/apache/poi/ss/formula/atp/TestNetworkdaysFunction.java b/src/testcases/org/apache/poi/ss/formula/atp/TestNetworkdaysFunction.java index f92204d872..678b766fe8 100644 --- a/src/testcases/org/apache/poi/ss/formula/atp/TestNetworkdaysFunction.java +++ b/src/testcases/org/apache/poi/ss/formula/atp/TestNetworkdaysFunction.java @@ -88,7 +88,7 @@ public class TestNetworkdaysFunction extends TestCase { public MockAreaEval(String... holidays) { this(0, 0, 0, holidays.length - 1); - this.holidays = new ArrayList<ValueEval>(); + this.holidays = new ArrayList<>(); for (String holiday : holidays) { this.holidays.add(new StringEval(holiday)); } diff --git a/src/testcases/org/apache/poi/ss/formula/atp/TestWorkdayFunction.java b/src/testcases/org/apache/poi/ss/formula/atp/TestWorkdayFunction.java index bbd6e56aad..365d1352cc 100644 --- a/src/testcases/org/apache/poi/ss/formula/atp/TestWorkdayFunction.java +++ b/src/testcases/org/apache/poi/ss/formula/atp/TestWorkdayFunction.java @@ -177,7 +177,7 @@ public class TestWorkdayFunction { public MockAreaEval(String... holidays) { this(0, 0, 0, holidays.length - 1); - this.holidays = new ArrayList<ValueEval>(); + this.holidays = new ArrayList<>(); for (String holiday : holidays) { this.holidays.add(new StringEval(holiday)); } diff --git a/src/testcases/org/apache/poi/ss/formula/eval/TestFormulasFromSpreadsheet.java b/src/testcases/org/apache/poi/ss/formula/eval/TestFormulasFromSpreadsheet.java index 87b1fed4a4..99f1b8a56e 100644 --- a/src/testcases/org/apache/poi/ss/formula/eval/TestFormulasFromSpreadsheet.java +++ b/src/testcases/org/apache/poi/ss/formula/eval/TestFormulasFromSpreadsheet.java @@ -124,7 +124,7 @@ public final class TestFormulasFromSpreadsheet { sheet = workbook.getSheetAt( 0 ); evaluator = new HSSFFormulaEvaluator(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/testcases/org/apache/poi/ss/formula/function/ExcelFileFormatDocFunctionExtractor.java b/src/testcases/org/apache/poi/ss/formula/function/ExcelFileFormatDocFunctionExtractor.java index 2dab84ca7e..8da0aded7e 100644 --- a/src/testcases/org/apache/poi/ss/formula/function/ExcelFileFormatDocFunctionExtractor.java +++ b/src/testcases/org/apache/poi/ss/formula/function/ExcelFileFormatDocFunctionExtractor.java @@ -159,10 +159,10 @@ public final class ExcelFileFormatDocFunctionExtractor { public FunctionDataCollector(PrintStream ps) { _ps = ps; - _allFunctionsByIndex = new HashMap<Integer, FunctionData>(); - _allFunctionsByName = new HashMap<String, FunctionData>(); - _groupFunctionIndexes = new HashSet<Integer>(); - _groupFunctionNames = new HashSet<String>(); + _allFunctionsByIndex = new HashMap<>(); + _allFunctionsByName = new HashMap<>(); + _groupFunctionIndexes = new HashSet<>(); + _groupFunctionNames = new HashSet<>(); } public void addFuntion(int funcIx, boolean hasFootnote, String funcName, int minParams, int maxParams, @@ -265,11 +265,11 @@ public final class ExcelFileFormatDocFunctionExtractor { public EFFDocHandler(FunctionDataCollector fdc) { _fdc = fdc; - _elemNameStack = new Stack<String>(); + _elemNameStack = new Stack<>(); _isInsideTable = false; - _rowData = new ArrayList<String>(); + _rowData = new ArrayList<>(); _textNodeBuffer = new StringBuffer(); - _rowNoteFlags = new ArrayList<Boolean>(); + _rowNoteFlags = new ArrayList<>(); } private boolean matchesTargetPath() { diff --git a/src/testcases/org/apache/poi/ss/formula/functions/BaseTestFunctionsFromSpreadsheet.java b/src/testcases/org/apache/poi/ss/formula/functions/BaseTestFunctionsFromSpreadsheet.java index 2d589217ed..72ab0b67db 100644 --- a/src/testcases/org/apache/poi/ss/formula/functions/BaseTestFunctionsFromSpreadsheet.java +++ b/src/testcases/org/apache/poi/ss/formula/functions/BaseTestFunctionsFromSpreadsheet.java @@ -87,7 +87,7 @@ public abstract class BaseTestFunctionsFromSpreadsheet { HSSFWorkbook workbook = HSSFTestDataSamples.openSampleWorkbook(filename); confirmReadMeSheet(workbook, clazz); - List<Object[]> data = new ArrayList<Object[]>(); + List<Object[]> data = new ArrayList<>(); int nSheets = workbook.getNumberOfSheets(); for(int sheetIdx=1; sheetIdx< nSheets; sheetIdx++) { |