poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cen...@apache.org
Subject svn commit: r1808516 [7/10] - in /poi/trunk/src: examples/src/org/apache/poi/hpsf/examples/ examples/src/org/apache/poi/hssf/eventusermodel/examples/ examples/src/org/apache/poi/hssf/usermodel/examples/ examples/src/org/apache/poi/hssf/view/brush/ exam...
Date Sat, 16 Sep 2017 08:27:33 GMT
Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/MapInfo.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/MapInfo.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/MapInfo.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/MapInfo.java Sat Sep 16 08:27:23 2017
@@ -73,7 +73,7 @@ public class MapInfo extends POIXMLDocum
 			MapInfoDocument doc = MapInfoDocument.Factory.parse(is, DEFAULT_XML_OPTIONS);
 			mapInfo = doc.getMapInfo();
 
-            maps= new HashMap<Integer, XSSFMap>();
+            maps= new HashMap<>();
             for(CTMap map :mapInfo.getMapArray()){
                 maps.put((int)map.getID(), new XSSFMap(map,this));
             }

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/SharedStringsTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/SharedStringsTable.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/SharedStringsTable.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/SharedStringsTable.java Sat Sep 16 08:27:23 2017
@@ -63,12 +63,12 @@ public class SharedStringsTable extends
     /**
      *  Array of individual string items in the Shared String table.
      */
-    private final List<CTRst> strings = new ArrayList<CTRst>();
+    private final List<CTRst> strings = new ArrayList<>();
 
     /**
      *  Maps strings and their indexes in the <code>strings</code> arrays
      */
-    private final Map<String, Integer> stmap = new HashMap<String, Integer>();
+    private final Map<String, Integer> stmap = new HashMap<>();
 
     /**
      * An integer representing the total count of strings in the workbook. This count does not

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/SingleXmlCells.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/SingleXmlCells.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/SingleXmlCells.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/SingleXmlCells.java Sat Sep 16 08:27:23 2017
@@ -98,7 +98,7 @@ public class SingleXmlCells extends POIX
 	 * @return all the SimpleXmlCell contained in this SingleXmlCells element
 	 */
 	public List<XSSFSingleXmlCell> getAllSimpleXmlCell(){
-		List<XSSFSingleXmlCell> list = new Vector<XSSFSingleXmlCell>();
+		List<XSSFSingleXmlCell> list = new Vector<>();
 		
 		for(CTSingleXmlCell singleXmlCell: singleXMLCells.getSingleXmlCellArray()){
 			list.add(new XSSFSingleXmlCell(singleXmlCell,this));

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java Sat Sep 16 08:27:23 2017
@@ -60,15 +60,15 @@ import org.openxmlformats.schemas.spread
  * Table of styles shared across all sheets in a workbook.
  */
 public class StylesTable extends POIXMLDocumentPart {
-    private final SortedMap<Short, String> numberFormats = new TreeMap<Short,String>();
-    private final List<XSSFFont> fonts = new ArrayList<XSSFFont>();
-    private final List<XSSFCellFill> fills = new ArrayList<XSSFCellFill>();
-    private final List<XSSFCellBorder> borders = new ArrayList<XSSFCellBorder>();
-    private final List<CTXf> styleXfs = new ArrayList<CTXf>();
-    private final List<CTXf> xfs = new ArrayList<CTXf>();
+    private final SortedMap<Short, String> numberFormats = new TreeMap<>();
+    private final List<XSSFFont> fonts = new ArrayList<>();
+    private final List<XSSFCellFill> fills = new ArrayList<>();
+    private final List<XSSFCellBorder> borders = new ArrayList<>();
+    private final List<CTXf> styleXfs = new ArrayList<>();
+    private final List<CTXf> xfs = new ArrayList<>();
 
-    private final List<CTDxf> dxfs = new ArrayList<CTDxf>();
-    private final Map<String, TableStyle> tableStyles = new HashMap<String, TableStyle>();
+    private final List<CTDxf> dxfs = new ArrayList<>();
+    private final Map<String, TableStyle> tableStyles = new HashMap<>();
     
     private IndexedColorMap indexedColors = new DefaultIndexedColorMap();
     

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/AutoSizeColumnTracker.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/AutoSizeColumnTracker.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/AutoSizeColumnTracker.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/AutoSizeColumnTracker.java Sat Sep 16 08:27:23 2017
@@ -55,10 +55,10 @@ import org.apache.poi.util.Internal;
     // will be called more frequently than getTrackedColumns(). The O(1) cost of insertion, removal, and membership operations
     // outweigh the infrequent O(n*log n) cost of sorting getTrackedColumns().
     // Memory consumption for a HashMap and TreeMap is about the same
-    private final Map<Integer, ColumnWidthPair> maxColumnWidths = new HashMap<Integer, ColumnWidthPair>();
+    private final Map<Integer, ColumnWidthPair> maxColumnWidths = new HashMap<>();
     // untrackedColumns stores columns have been explicitly untracked so they aren't implicitly re-tracked by trackAllColumns
     // Using a HashSet instead of a TreeSet because we don't care about order.
-    private final Set<Integer> untrackedColumns = new HashSet<Integer>();
+    private final Set<Integer> untrackedColumns = new HashSet<>();
     private boolean trackAllColumns;
 
     /**
@@ -126,7 +126,7 @@ import org.apache.poi.util.Internal;
      * @since 3.14beta1
      */
     public SortedSet<Integer> getTrackedColumns() {
-        SortedSet<Integer> sorted = new TreeSet<Integer>(maxColumnWidths.keySet());
+        SortedSet<Integer> sorted = new TreeSet<>(maxColumnWidths.keySet());
         return Collections.unmodifiableSortedSet(sorted);
     }
     

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFRow.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFRow.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFRow.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFRow.java Sat Sep 16 08:27:23 2017
@@ -39,7 +39,7 @@ public class SXSSFRow implements Row, Co
     private static final Boolean UNDEFINED = null;
     
     private final SXSSFSheet _sheet; // parent sheet
-    private final SortedMap<Integer, SXSSFCell> _cells = new TreeMap<Integer, SXSSFCell>();
+    private final SortedMap<Integer, SXSSFCell> _cells = new TreeMap<>();
     private short _style = -1; // index of cell style in style table
     private short _height = -1; // row height in twips (1/20 point)
     private boolean _zHeight; // row zero-height (this is somehow different than being hidden)

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java Sat Sep 16 08:27:23 2017
@@ -66,7 +66,7 @@ public class SXSSFSheet implements Sheet
 {
     /*package*/ final XSSFSheet _sh;
     private final SXSSFWorkbook _workbook;
-    private final TreeMap<Integer,SXSSFRow> _rows=new TreeMap<Integer,SXSSFRow>();
+    private final TreeMap<Integer,SXSSFRow> _rows= new TreeMap<>();
     private final SheetDataWriter _writer;
     private int _randomAccessWindowSize = SXSSFWorkbook.DEFAULT_WINDOW_SIZE;
     private final AutoSizeColumnTracker _autoSizeColumnTracker;

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java Sat Sep 16 08:27:23 2017
@@ -94,8 +94,8 @@ public class SXSSFWorkbook implements Wo
 
     private final XSSFWorkbook _wb;
 
-    private final Map<SXSSFSheet,XSSFSheet> _sxFromXHash = new HashMap<SXSSFSheet,XSSFSheet>();
-    private final Map<XSSFSheet,SXSSFSheet> _xFromSxHash = new HashMap<XSSFSheet,SXSSFSheet>();
+    private final Map<SXSSFSheet,XSSFSheet> _sxFromXHash = new HashMap<>();
+    private final Map<XSSFSheet,SXSSFSheet> _xFromSxHash = new HashMap<>();
 
     private int _randomAccessWindowSize = DEFAULT_WINDOW_SIZE;
 
@@ -707,7 +707,7 @@ public class SXSSFWorkbook implements Wo
      */
     @Override
     public Iterator<Sheet> sheetIterator() {
-        return new SheetIterator<Sheet>();
+        return new SheetIterator<>();
     }
     
     private final class SheetIterator<T extends Sheet> implements Iterator<T> {

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/BaseXSSFEvaluationWorkbook.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/BaseXSSFEvaluationWorkbook.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/BaseXSSFEvaluationWorkbook.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/BaseXSSFEvaluationWorkbook.java Sat Sep 16 08:27:23 2017
@@ -369,7 +369,7 @@ public abstract class BaseXSSFEvaluation
             return _tableCache;
         }
         // FIXME: use org.apache.commons.collections.map.CaseInsensitiveMap
-        _tableCache = new HashMap<String, XSSFTable>();
+        _tableCache = new HashMap<>();
 
         for (Sheet sheet : _uBook) {
             for (XSSFTable tbl : ((XSSFSheet)sheet).getTables()) {

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFBuiltinTableStyle.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFBuiltinTableStyle.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFBuiltinTableStyle.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFBuiltinTableStyle.java Sat Sep 16 08:27:23 2017
@@ -334,7 +334,7 @@ public enum XSSFBuiltinTableStyle {
     /**
      * Interestingly, this is initialized after the enum instances, so using an {@link EnumMap} works.
      */
-    private static final Map<XSSFBuiltinTableStyle, TableStyle> styleMap = new EnumMap<XSSFBuiltinTableStyle, TableStyle>(XSSFBuiltinTableStyle.class);
+    private static final Map<XSSFBuiltinTableStyle, TableStyle> styleMap = new EnumMap<>(XSSFBuiltinTableStyle.class);
     
     private XSSFBuiltinTableStyle() {
     }

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFChart.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFChart.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFChart.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFChart.java Sat Sep 16 08:27:23 2017
@@ -84,7 +84,7 @@ public final class XSSFChart extends POI
 	 */
 	private CTChart chart;
 
-	List<XSSFChartAxis> axis = new ArrayList<XSSFChartAxis>();
+	List<XSSFChartAxis> axis = new ArrayList<>();
 
 	/**
 	 * Create a new SpreadsheetML chart

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFConditionalFormatting.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFConditionalFormatting.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFConditionalFormatting.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFConditionalFormatting.java Sat Sep 16 08:27:23 2017
@@ -54,7 +54,7 @@ public class XSSFConditionalFormatting i
      */
     @Override
     public CellRangeAddress[] getFormattingRanges() {
-        ArrayList<CellRangeAddress> lst = new ArrayList<CellRangeAddress>();
+        ArrayList<CellRangeAddress> lst = new ArrayList<>();
         for (Object stRef : _cf.getSqref()) {
             String[] regions = stRef.toString().split(" ");
             for (final String region : regions) {

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFConditionalFormattingRule.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFConditionalFormattingRule.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFConditionalFormattingRule.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFConditionalFormattingRule.java Sat Sep 16 08:27:23 2017
@@ -35,8 +35,8 @@ public class XSSFConditionalFormattingRu
     private final CTCfRule _cfRule;
     private XSSFSheet _sh;
     
-    private static Map<STCfType.Enum, ConditionType> typeLookup = new HashMap<STCfType.Enum, ConditionType>();
-    private static Map<STCfType.Enum, ConditionFilterType> filterTypeLookup = new HashMap<STCfType.Enum, ConditionFilterType>();
+    private static Map<STCfType.Enum, ConditionType> typeLookup = new HashMap<>();
+    private static Map<STCfType.Enum, ConditionFilterType> filterTypeLookup = new HashMap<>();
     static {
         typeLookup.put(STCfType.CELL_IS, ConditionType.CELL_VALUE_IS);
         typeLookup.put(STCfType.EXPRESSION, ConditionType.FORMULA);

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDataValidation.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDataValidation.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDataValidation.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDataValidation.java Sat Sep 16 08:27:23 2017
@@ -41,11 +41,11 @@ public class XSSFDataValidation implemen
 	private XSSFDataValidationConstraint validationConstraint;
 	private CellRangeAddressList regions;
 
-    static Map<Integer,STDataValidationOperator.Enum> operatorTypeMappings = new HashMap<Integer,STDataValidationOperator.Enum>();
-	static Map<STDataValidationOperator.Enum,Integer> operatorTypeReverseMappings = new HashMap<STDataValidationOperator.Enum,Integer>();
-	static Map<Integer,STDataValidationType.Enum> validationTypeMappings = new HashMap<Integer,STDataValidationType.Enum>();
-	static Map<STDataValidationType.Enum,Integer> validationTypeReverseMappings = new HashMap<STDataValidationType.Enum,Integer>();
-	static Map<Integer,STDataValidationErrorStyle.Enum> errorStyleMappings = new HashMap<Integer,STDataValidationErrorStyle.Enum>();
+    static Map<Integer,STDataValidationOperator.Enum> operatorTypeMappings = new HashMap<>();
+	static Map<STDataValidationOperator.Enum,Integer> operatorTypeReverseMappings = new HashMap<>();
+	static Map<Integer,STDataValidationType.Enum> validationTypeMappings = new HashMap<>();
+	static Map<STDataValidationType.Enum,Integer> validationTypeReverseMappings = new HashMap<>();
+	static Map<Integer,STDataValidationErrorStyle.Enum> errorStyleMappings = new HashMap<>();
 
     static {
 		errorStyleMappings.put(DataValidation.ErrorStyle.INFO, STDataValidationErrorStyle.INFORMATION);

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDataValidationHelper.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDataValidationHelper.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDataValidationHelper.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDataValidationHelper.java Sat Sep 16 08:27:23 2017
@@ -163,7 +163,7 @@ public class XSSFDataValidationHelper im
 		}
 		
 		CellRangeAddress[] cellRangeAddresses = cellRangeAddressList.getCellRangeAddresses();
-		List<String> sqref = new ArrayList<String>();
+		List<String> sqref = new ArrayList<>();
 		for (int i = 0; i < cellRangeAddresses.length; i++) {
 			CellRangeAddress cellRangeAddress = cellRangeAddresses[i];
 			sqref.add(cellRangeAddress.formatAsString());

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDrawing.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDrawing.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDrawing.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDrawing.java Sat Sep 16 08:27:23 2017
@@ -482,7 +482,7 @@ public final class XSSFDrawing extends P
      * Returns all charts in this drawing.
      */
     public List<XSSFChart> getCharts() {
-       List<XSSFChart> charts = new ArrayList<XSSFChart>();
+       List<XSSFChart> charts = new ArrayList<>();
        for(POIXMLDocumentPart part : getRelations()) {
           if(part instanceof XSSFChart) {
              charts.add((XSSFChart)part);
@@ -549,7 +549,7 @@ public final class XSSFDrawing extends P
      * @return list of shapes in this drawing
      */
     public List<XSSFShape> getShapes(){
-        List<XSSFShape> lst = new ArrayList<XSSFShape>();
+        List<XSSFShape> lst = new ArrayList<>();
         XmlCursor cur = drawing.newCursor();
         try {
             if (cur.toFirstChild()) {
@@ -565,7 +565,7 @@ public final class XSSFDrawing extends P
      * @return list of shapes in this shape group
      */
     public List<XSSFShape> getShapes(XSSFShapeGroup groupshape){
-        List<XSSFShape> lst = new ArrayList<XSSFShape>();
+        List<XSSFShape> lst = new ArrayList<>();
         XmlCursor cur = groupshape.getCTGroupShape().newCursor();
         try {
             addShapes(cur, lst);

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFEvaluationSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFEvaluationSheet.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFEvaluationSheet.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFEvaluationSheet.java Sat Sep 16 08:27:23 2017
@@ -55,7 +55,7 @@ final class XSSFEvaluationSheet implemen
     public EvaluationCell getCell(int rowIndex, int columnIndex) {
         // cache for performance: ~30% speedup due to caching
         if (_cellCache == null) {
-            _cellCache = new HashMap<CellKey, EvaluationCell>(_xs.getLastRowNum()*3);
+            _cellCache = new HashMap<>(_xs.getLastRowNum() * 3);
             for (final Row row : _xs) {
                 final int rowNum = row.getRowNum();
                 for (final Cell cell : row) {

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFMap.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFMap.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFMap.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFMap.java Sat Sep 16 08:27:23 2017
@@ -76,7 +76,7 @@ public class XSSFMap {
      * @return the list of Single Xml Cells that provide a map rule to this mapping.
      */
     public List<XSSFSingleXmlCell> getRelatedSingleXMLCell() {
-        List<XSSFSingleXmlCell> relatedSimpleXmlCells = new ArrayList<XSSFSingleXmlCell>();
+        List<XSSFSingleXmlCell> relatedSimpleXmlCells = new ArrayList<>();
 
         int sheetNumber = mapInfo.getWorkbook().getNumberOfSheets();
         for (int i = 0; i < sheetNumber; i++) {
@@ -99,7 +99,7 @@ public class XSSFMap {
      * @return the list of all Tables that provide a map rule to this mapping
      */
     public List<XSSFTable> getRelatedTables() {
-        List<XSSFTable> tables = new ArrayList<XSSFTable>();
+        List<XSSFTable> tables = new ArrayList<>();
         for (Sheet sheet : mapInfo.getWorkbook()) {
             for (RelationPart rp : ((XSSFSheet)sheet).getRelationParts()) {
                 if (rp.getRelationship().getRelationshipType().equals(XSSFRelation.TABLE.getRelation())) {

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotTable.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotTable.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotTable.java Sat Sep 16 08:27:23 2017
@@ -283,7 +283,7 @@ public class XSSFPivotTable extends POIX
     @Beta
     public List<Integer> getRowLabelColumns() {
         if (pivotTableDefinition.getRowFields() != null) {
-            List<Integer> columnIndexes = new ArrayList<Integer>();
+            List<Integer> columnIndexes = new ArrayList<>();
             for (CTField f : pivotTableDefinition.getRowFields().getFieldArray()) {
                 columnIndexes.add(f.getX());
             }

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRelation.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRelation.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRelation.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRelation.java Sat Sep 16 08:27:23 2017
@@ -41,7 +41,7 @@ public final class XSSFRelation extends
     /**
      * A map to lookup POIXMLRelation by its relation type
      */
-    private static final Map<String, XSSFRelation> _table = new HashMap<String, XSSFRelation>();
+    private static final Map<String, XSSFRelation> _table = new HashMap<>();
 
 
     public static final XSSFRelation WORKBOOK = new XSSFRelation(

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRichTextString.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRichTextString.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRichTextString.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRichTextString.java Sat Sep 16 08:27:23 2017
@@ -559,7 +559,7 @@ public class XSSFRichTextString implemen
 
     TreeMap<Integer, CTRPrElt> getFormatMap(CTRst entry){
         int length = 0;
-        TreeMap<Integer, CTRPrElt> formats = new TreeMap<Integer, CTRPrElt>();
+        TreeMap<Integer, CTRPrElt> formats = new TreeMap<>();
         //noinspection deprecation - for performance reasons!
         for (CTRElt r : entry.getRArray()) {
             String txt = r.getT();

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRow.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRow.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRow.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRow.java Sat Sep 16 08:27:23 2017
@@ -70,7 +70,7 @@ public class XSSFRow implements Row, Com
     protected XSSFRow(CTRow row, XSSFSheet sheet) {
         _row = row;
         _sheet = sheet;
-        _cells = new TreeMap<Integer, XSSFCell>();
+        _cells = new TreeMap<>();
         for (CTCell c : row.getCArray()) {
             XSSFCell cell = new XSSFCell(this, c);
             // Performance optimization for bug 57840: explicit boxing is slightly faster than auto-unboxing, though may use more memory
@@ -617,7 +617,7 @@ public class XSSFRow implements Row, Com
                 // Remove MergedRegions in dest row
                 final int destRowNum = getRowNum();
                 int index = 0;
-                final Set<Integer> indices = new HashSet<Integer>();
+                final Set<Integer> indices = new HashSet<>();
                 for (CellRangeAddress destRegion : getSheet().getMergedRegions()) {
                     if (destRowNum == destRegion.getFirstRow() && destRowNum == destRegion.getLastRow()) {
                         indices.add(index);

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java Sat Sep 16 08:27:23 2017
@@ -162,7 +162,7 @@ public class XSSFSheet extends POIXMLDoc
     protected CTSheet sheet;
     protected CTWorksheet worksheet;
 
-    private final SortedMap<Integer, XSSFRow> _rows = new TreeMap<Integer, XSSFRow>();
+    private final SortedMap<Integer, XSSFRow> _rows = new TreeMap<>();
     private List<XSSFHyperlink> hyperlinks;
     private ColumnHelper columnHelper;
     private CommentsTable sheetComments;
@@ -256,14 +256,14 @@ public class XSSFSheet extends POIXMLDoc
         worksheet = newSheet();
         initRows(worksheet);
         columnHelper = new ColumnHelper(worksheet);
-        hyperlinks = new ArrayList<XSSFHyperlink>();
+        hyperlinks = new ArrayList<>();
     }
 
     private void initRows(CTWorksheet worksheetParam) {
         _rows.clear();
-        tables = new TreeMap<String, XSSFTable>();
-        sharedFormulas = new HashMap<Integer, CTCellFormula>();
-        arrayFormulas = new ArrayList<CellRangeAddress>();
+        tables = new TreeMap<>();
+        sharedFormulas = new HashMap<>();
+        arrayFormulas = new ArrayList<>();
         for (CTRow row : worksheetParam.getSheetData().getRowArray()) {
             XSSFRow r = new XSSFRow(row, this);
             // Performance optimization: explicit boxing is slightly faster than auto-unboxing, though may use more memory
@@ -277,7 +277,7 @@ public class XSSFSheet extends POIXMLDoc
      * and initialize the internal array of XSSFHyperlink objects
      */
     private void initHyperlinks() {
-        hyperlinks = new ArrayList<XSSFHyperlink>();
+        hyperlinks = new ArrayList<>();
 
         if(!worksheet.isSetHyperlinks()) {
             return;
@@ -1316,7 +1316,7 @@ public class XSSFSheet extends POIXMLDoc
      */
     @Override
     public List<CellRangeAddress> getMergedRegions() {
-        List<CellRangeAddress> addresses = new ArrayList<CellRangeAddress>();
+        List<CellRangeAddress> addresses = new ArrayList<>();
         CTMergeCells ctMergeCells = worksheet.getMergeCells();
         if(ctMergeCells == null) {
             return addresses;
@@ -1468,7 +1468,7 @@ public class XSSFSheet extends POIXMLDoc
         if (startRowNum > endRowNum) {
             throw new IllegalArgumentException("getRows: startRowNum must be less than or equal to endRowNum");
         }
-        final List<XSSFRow> rows = new ArrayList<XSSFRow>();
+        final List<XSSFRow> rows = new ArrayList<>();
         if (createRowIfMissing) {
             for (int i = startRowNum; i <= endRowNum; i++) {
                 XSSFRow row = getRow(i);
@@ -1944,7 +1944,7 @@ public class XSSFSheet extends POIXMLDoc
         }
         
         CTMergeCells ctMergeCells = worksheet.getMergeCells();
-        List<CTMergeCell> newMergeCells = new ArrayList<CTMergeCell>(ctMergeCells.sizeOfMergeCellArray());
+        List<CTMergeCell> newMergeCells = new ArrayList<>(ctMergeCells.sizeOfMergeCellArray());
 
         int idx = 0;
         for (CTMergeCell mc : ctMergeCells.getMergeCellArray()) {
@@ -1972,7 +1972,7 @@ public class XSSFSheet extends POIXMLDoc
             throw new IllegalArgumentException("Specified row does not belong to this sheet");
         }
         // collect cells into a temporary array to avoid ConcurrentModificationException
-        ArrayList<XSSFCell> cellsToDelete = new ArrayList<XSSFCell>();
+        ArrayList<XSSFCell> cellsToDelete = new ArrayList<>();
         for (Cell cell : row) {
             cellsToDelete.add((XSSFCell)cell);
         }
@@ -3020,7 +3020,7 @@ public class XSSFSheet extends POIXMLDoc
                 // FIXME: (performance optimization) this should be moved outside the for-loop so that hyperlinks only needs to be iterated over once.
                 // also remove any hyperlinks associated with this row
                 if (hyperlinks != null) {
-                    for (XSSFHyperlink link : new ArrayList<XSSFHyperlink>(hyperlinks)) {
+                    for (XSSFHyperlink link : new ArrayList<>(hyperlinks)) {
                         CellReference ref = new CellReference(link.getCellRef());
                         if (ref.getRow() == rownum) {
                             hyperlinks.remove(link);
@@ -3033,20 +3033,20 @@ public class XSSFSheet extends POIXMLDoc
         // then do the actual moving and also adjust comments/rowHeight
         // we need to sort it in a way so the shifting does not mess up the structures, 
         // i.e. when shifting down, start from down and go up, when shifting up, vice-versa
-        SortedMap<XSSFComment, Integer> commentsToShift = new TreeMap<XSSFComment, Integer>(new Comparator<XSSFComment>() {
+        SortedMap<XSSFComment, Integer> commentsToShift = new TreeMap<>(new Comparator<XSSFComment>() {
             @Override
             public int compare(XSSFComment o1, XSSFComment o2) {
                 int row1 = o1.getRow();
                 int row2 = o2.getRow();
-                
-                if(row1 == row2) {
+
+                if (row1 == row2) {
                     // ordering is not important when row is equal, but don't return zero to still 
                     // get multiple comments per row into the map
                     return o1.hashCode() - o2.hashCode();
                 }
 
                 // when shifting down, sort higher row-values first
-                if(n > 0) {
+                if (n > 0) {
                     return row1 < row2 ? 1 : -1;
                 } else {
                     // sort lower-row values first when shifting up
@@ -3116,7 +3116,7 @@ public class XSSFSheet extends POIXMLDoc
         rowShifter.updateHyperlinks(shifter);
 
         //rebuild the _rows map
-        Map<Integer, XSSFRow> map = new HashMap<Integer, XSSFRow>();
+        Map<Integer, XSSFRow> map = new HashMap<>();
         for(XSSFRow r : _rows.values()) {
             // Performance optimization: explicit boxing is slightly faster than auto-unboxing, though may use more memory
             final Integer rownumI = new Integer(r.getRowNum()); // NOSONAR
@@ -3833,7 +3833,7 @@ public class XSSFSheet extends POIXMLDoc
         int lastColumn = range.getLastColumn();
         int height = lastRow - firstRow + 1;
         int width = lastColumn - firstColumn + 1;
-        List<XSSFCell> temp = new ArrayList<XSSFCell>(height*width);
+        List<XSSFCell> temp = new ArrayList<>(height * width);
         for (int rowIn = firstRow; rowIn <= lastRow; rowIn++) {
             for (int colIn = firstColumn; colIn <= lastColumn; colIn++) {
                 XSSFRow row = getRow(rowIn);
@@ -3888,7 +3888,7 @@ public class XSSFSheet extends POIXMLDoc
 
     @Override
     public List<XSSFDataValidation> getDataValidations() {
-        List<XSSFDataValidation> xssfValidations = new ArrayList<XSSFDataValidation>();
+        List<XSSFDataValidation> xssfValidations = new ArrayList<>();
         CTDataValidations dataValidations = this.worksheet.getDataValidations();
         if( dataValidations!=null && dataValidations.getCount() > 0 ) {
             for (CTDataValidation ctDataValidation : dataValidations.getDataValidationArray()) {
@@ -3983,7 +3983,7 @@ public class XSSFSheet extends POIXMLDoc
      * Returns any tables associated with this Sheet
      */
     public List<XSSFTable> getTables() {
-        return new ArrayList<XSSFTable>(tables.values());
+        return new ArrayList<>(tables.values());
     }
 
     /**
@@ -4374,7 +4374,7 @@ public class XSSFSheet extends POIXMLDoc
      */
     @Beta
     public List<XSSFPivotTable> getPivotTables() {
-        List<XSSFPivotTable> tables = new ArrayList<XSSFPivotTable>();
+        List<XSSFPivotTable> tables = new ArrayList<>();
         for (XSSFPivotTable table : getWorkbook().getPivotTables()) {
             if (table.getParent() == this) {
                 tables.add(table);
@@ -4421,12 +4421,12 @@ public class XSSFSheet extends POIXMLDoc
      * @return Map of error type to the range(s) where they are ignored.
      */
     public Map<IgnoredErrorType, Set<CellRangeAddress>> getIgnoredErrors() {
-        Map<IgnoredErrorType, Set<CellRangeAddress>> result = new LinkedHashMap<IgnoredErrorType, Set<CellRangeAddress>>();
+        Map<IgnoredErrorType, Set<CellRangeAddress>> result = new LinkedHashMap<>();
         if (worksheet.isSetIgnoredErrors()) {
             for (CTIgnoredError err : worksheet.getIgnoredErrors().getIgnoredErrorList()) {
                 for (IgnoredErrorType errType : XSSFIgnoredErrorHelper.getErrorTypes(err)) {
                     if (!result.containsKey(errType)) {
-                        result.put(errType, new LinkedHashSet<CellRangeAddress>());
+                        result.put(errType, new LinkedHashSet<>());
                     }
                     for (Object ref : err.getSqref()) {
                         result.get(errType).add(CellRangeAddress.valueOf(ref.toString()));

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheetConditionalFormatting.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheetConditionalFormatting.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheetConditionalFormatting.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheetConditionalFormatting.java Sat Sep 16 08:27:23 2017
@@ -200,7 +200,7 @@ public class XSSFSheetConditionalFormatt
 
         CellRangeAddress[] mergeCellRanges = CellRangeUtil.mergeCellRanges(regions);
         CTConditionalFormatting cf = _sheet.getCTWorksheet().addNewConditionalFormatting();
-        List<String> refs = new ArrayList<String>();
+        List<String> refs = new ArrayList<>();
         for(CellRangeAddress a : mergeCellRanges) refs.add(a.formatAsString());
         cf.setSqref(refs);
 

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSimpleShape.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSimpleShape.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSimpleShape.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSimpleShape.java Sat Sep 16 08:27:23 2017
@@ -57,7 +57,7 @@ public class XSSFSimpleShape extends XSS
         this.drawing = drawing;
         this.ctShape = ctShape;
         
-        _paragraphs = new ArrayList<XSSFTextParagraph>();
+        _paragraphs = new ArrayList<>();
         
         // initialize any existing paragraphs - this will be the default body paragraph in a new shape, 
         // or existing paragraphs that have been loaded from the file
@@ -132,7 +132,7 @@ public class XSSFSimpleShape extends XSS
     public String getText() {
         final int MAX_LEVELS = 9;
         StringBuilder out = new StringBuilder();
-        List<Integer> levelCount = new ArrayList<Integer>(MAX_LEVELS);	// maximum 9 levels
+        List<Integer> levelCount = new ArrayList<>(MAX_LEVELS);	// maximum 9 levels
         XSSFTextParagraph p = null;
         
         // initialise the levelCount array - this maintains a record of the numbering to be used at each level

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTable.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTable.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTable.java Sat Sep 16 08:27:23 2017
@@ -219,7 +219,7 @@ public class XSSFTable extends POIXMLDoc
      */
     public List<XSSFXmlColumnPr> getXmlColumnPrs() {
         if (xmlColumnPr==null) {
-            xmlColumnPr = new ArrayList<XSSFXmlColumnPr>();
+            xmlColumnPr = new ArrayList<>();
             for (CTTableColumn column: getTableColumns()) {
                 if (column.getXmlColumnPr()!=null) {
                     XSSFXmlColumnPr columnPr = new XSSFXmlColumnPr(this,column,column.getXmlColumnPr());
@@ -520,7 +520,7 @@ public class XSSFTable extends POIXMLDoc
         if (columnMap == null) {
             // FIXME: replace with org.apache.commons.collections.map.CaseInsensitiveMap
             final int count = getTableColumns().length;
-            columnMap = new HashMap<String, Integer>(count * 3 / 2);
+            columnMap = new HashMap<>(count * 3 / 2);
             
             int i = 0;
             for (CTTableColumn column : getTableColumns()) {

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTableStyle.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTableStyle.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTableStyle.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTableStyle.java Sat Sep 16 08:27:23 2017
@@ -45,7 +45,7 @@ public class XSSFTableStyle implements T
 
     private final String name;
     private final int index;
-    private final Map<TableStyleType, DifferentialStyleProvider> elementMap = new EnumMap<TableStyleType, DifferentialStyleProvider>(TableStyleType.class);
+    private final Map<TableStyleType, DifferentialStyleProvider> elementMap = new EnumMap<>(TableStyleType.class);
 
     /**
      * @param index style definition index or built-in ordinal depending on use
@@ -58,7 +58,7 @@ public class XSSFTableStyle implements T
         this.name = tableStyle.getName();
         this.index = index;
         
-        List<CTDxf> dxfList = new ArrayList<CTDxf>();
+        List<CTDxf> dxfList = new ArrayList<>();
 
         // CT* classes don't handle "mc:AlternateContent" elements, so get the Dxf instances manually
         XmlCursor cur = dxfs.newCursor();

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTextParagraph.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTextParagraph.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTextParagraph.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTextParagraph.java Sat Sep 16 08:27:23 2017
@@ -41,7 +41,7 @@ public class XSSFTextParagraph implement
     XSSFTextParagraph(CTTextParagraph p, CTShape ctShape){
         _p = p;
         _shape = ctShape;
-        _runs = new ArrayList<XSSFTextRun>();
+        _runs = new ArrayList<>();
 
         for(XmlObject ch : _p.selectPath("*")){
             if(ch instanceof CTRegularTextRun){

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFVMLDrawing.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFVMLDrawing.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFVMLDrawing.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFVMLDrawing.java Sat Sep 16 08:27:23 2017
@@ -92,8 +92,8 @@ public final class XSSFVMLDrawing extend
      */
     private static final Pattern ptrn_shapeId = Pattern.compile("_x0000_s(\\d+)");
 
-    private List<QName> _qnames = new ArrayList<QName>();
-    private List<XmlObject> _items = new ArrayList<XmlObject>();
+    private List<QName> _qnames = new ArrayList<>();
+    private List<XmlObject> _items = new ArrayList<>();
     private String _shapeTypeId;
     private int _shapeId = 1024;
 
@@ -135,8 +135,8 @@ public final class XSSFVMLDrawing extend
         }
         XmlObject root = XmlObject.Factory.parse(doc, DEFAULT_XML_OPTIONS);
 
-        _qnames = new ArrayList<QName>();
-        _items = new ArrayList<XmlObject>();
+        _qnames = new ArrayList<>();
+        _items = new ArrayList<>();
         for(XmlObject obj : root.selectPath("$this/xml/*")) {
             Node nd = obj.getDomNode();
             QName qname = new QName(nd.getNamespaceURI(), nd.getLocalName());

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java Sat Sep 16 08:27:23 2017
@@ -347,8 +347,8 @@ public class XSSFWorkbook extends POIXML
         }
 
         // Create arrays for parts attached to the workbook itself
-        pivotTables = new ArrayList<XSSFPivotTable>();
-        pivotCaches = new ArrayList<CTPivotCache>();
+        pivotTables = new ArrayList<>();
+        pivotCaches = new ArrayList<>();
     }
 
     @Override
@@ -358,8 +358,8 @@ public class XSSFWorkbook extends POIXML
             this.workbook = doc.getWorkbook();
 
             ThemesTable theme = null;
-            Map<String, XSSFSheet> shIdMap = new HashMap<String, XSSFSheet>();
-            Map<String, ExternalLinksTable> elIdMap = new HashMap<String, ExternalLinksTable>();
+            Map<String, XSSFSheet> shIdMap = new HashMap<>();
+            Map<String, ExternalLinksTable> elIdMap = new HashMap<>();
             for(RelationPart rp : getRelationParts()){
                 POIXMLDocumentPart p = rp.getDocumentPart();
                 if(p instanceof SharedStringsTable) {
@@ -402,7 +402,7 @@ public class XSSFWorkbook extends POIXML
             
             // Load individual sheets. The order of sheets is defined by the order
             //  of CTSheet elements in the workbook
-            sheets = new ArrayList<XSSFSheet>(shIdMap.size());
+            sheets = new ArrayList<>(shIdMap.size());
             //noinspection deprecation
             for (CTSheet ctSheet : this.workbook.getSheets().getSheetArray()) {
                 parseSheet(shIdMap, ctSheet);
@@ -410,7 +410,7 @@ public class XSSFWorkbook extends POIXML
             
             // Load the external links tables. Their order is defined by the order 
             //  of CTExternalReference elements in the workbook
-            externalLinks = new ArrayList<ExternalLinksTable>(elIdMap.size());
+            externalLinks = new ArrayList<>(elIdMap.size());
             if (this.workbook.isSetExternalReferences()) {
                 for (CTExternalReference er : this.workbook.getExternalReferences().getExternalReferenceArray()) {
                     ExternalLinksTable el = elIdMap.get(er.getId());
@@ -466,10 +466,10 @@ public class XSSFWorkbook extends POIXML
         stylesSource = (StylesTable)createRelationship(XSSFRelation.STYLES, XSSFFactory.getInstance());
         stylesSource.setWorkbook(this);
 
-        namedRanges = new ArrayList<XSSFName>();
-        namedRangesByName = new ArrayListValuedHashMap<String, XSSFName>();
-        sheets = new ArrayList<XSSFSheet>();
-        pivotTables = new ArrayList<XSSFPivotTable>();
+        namedRanges = new ArrayList<>();
+        namedRangesByName = new ArrayListValuedHashMap<>();
+        sheets = new ArrayList<>();
+        pivotTables = new ArrayList<>();
     }
 
     /**
@@ -932,7 +932,7 @@ public class XSSFWorkbook extends POIXML
     public List<XSSFPictureData> getAllPictures() {
         if(pictures == null){
             List<PackagePart> mediaParts = getPackage().getPartsByName(Pattern.compile("/xl/media/.*?"));
-            pictures = new ArrayList<XSSFPictureData>(mediaParts.size());
+            pictures = new ArrayList<>(mediaParts.size());
             for(PackagePart part : mediaParts){
                 pictures.add(new XSSFPictureData(part));
             }
@@ -1189,7 +1189,7 @@ public class XSSFWorkbook extends POIXML
      */
     @Override
     public Iterator<Sheet> sheetIterator() {
-        return new SheetIterator<Sheet>();
+        return new SheetIterator<>();
     }
     
     /**
@@ -1381,7 +1381,7 @@ public class XSSFWorkbook extends POIXML
         }
 
         //adjust indices of names ranges
-        List<XSSFName> toRemove = new ArrayList<XSSFName>();
+        List<XSSFName> toRemove = new ArrayList<>();
         for (XSSFName nm : namedRanges) {
             CTDefinedName ct = nm.getCTName();
             if(!ct.isSetLocalSheetId()) {
@@ -1722,8 +1722,8 @@ public class XSSFWorkbook extends POIXML
     }
     
     private void reprocessNamedRanges() {
-        namedRangesByName = new ArrayListValuedHashMap<String, XSSFName>();
-        namedRanges = new ArrayList<XSSFName>();
+        namedRangesByName = new ArrayListValuedHashMap<>();
+        namedRanges = new ArrayList<>();
         if(workbook.isSetDefinedNames()) {
             for(CTDefinedName ctName : workbook.getDefinedNames().getDefinedNameArray()) {
                 createAndStoreName(ctName);
@@ -1843,7 +1843,7 @@ public class XSSFWorkbook extends POIXML
      */
     @Override
     public List<PackagePart> getAllEmbedds() throws OpenXML4JException {
-        List<PackagePart> embedds = new LinkedList<PackagePart>();
+        List<PackagePart> embedds = new LinkedList<>();
 
         for(XSSFSheet sheet : sheets){
             // Get the embeddings for the workbook
@@ -1978,7 +1978,7 @@ public class XSSFWorkbook extends POIXML
      * @return a collection of custom XML mappings defined in this workbook
      */
     public Collection<XSSFMap> getCustomXMLMappings(){
-        return mapInfo == null ? new ArrayList<XSSFMap>() : mapInfo.getAllXSSFMaps();
+        return mapInfo == null ? new ArrayList<>() : mapInfo.getAllXSSFMaps();
     }
 
     /**
@@ -2244,7 +2244,7 @@ public class XSSFWorkbook extends POIXML
         cache.setCacheId(tableId);
         cache.setId(rId);
         if(pivotCaches == null) {
-            pivotCaches = new ArrayList<CTPivotCache>();
+            pivotCaches = new ArrayList<>();
         }
         pivotCaches.add(cache);
         return cache;

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/charts/XSSFLineChartData.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/charts/XSSFLineChartData.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/charts/XSSFLineChartData.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/charts/XSSFLineChartData.java Sat Sep 16 08:27:23 2017
@@ -46,7 +46,7 @@ public class XSSFLineChartData implement
     private List<Series> series;
 
     public XSSFLineChartData() {
-        series = new ArrayList<Series>();
+        series = new ArrayList<>();
     }
 
     static class Series extends AbstractXSSFChartSeries implements LineChartSeries {

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/charts/XSSFScatterChartData.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/charts/XSSFScatterChartData.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/charts/XSSFScatterChartData.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/charts/XSSFScatterChartData.java Sat Sep 16 08:27:23 2017
@@ -48,7 +48,7 @@ public class XSSFScatterChartData implem
     private List<Series> series;
 
     public XSSFScatterChartData() {
-        series = new ArrayList<Series>();
+        series = new ArrayList<>();
     }
 
     /**

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/ColumnHelper.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/ColumnHelper.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/ColumnHelper.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/ColumnHelper.java Sat Sep 16 08:27:23 2017
@@ -47,7 +47,7 @@ public class ColumnHelper {
     }
     
     public void cleanColumns() {
-        TreeSet<CTCol> trackedCols = new TreeSet<CTCol>(CTColComparator.BY_MIN_MAX);
+        TreeSet<CTCol> trackedCols = new TreeSet<>(CTColComparator.BY_MIN_MAX);
         CTCols newCols = CTCols.Factory.newInstance();
         CTCols[] colsArray = worksheet.getColsArray();
         int i = 0;
@@ -72,7 +72,7 @@ public class ColumnHelper {
         // class then we could keep trackedCols as state,
         // making this log(N) rather than Nlog(N). We do this for the initial
         // read above.
-        TreeSet<CTCol> trackedCols = new TreeSet<CTCol>(
+        TreeSet<CTCol> trackedCols = new TreeSet<>(
                 CTColComparator.BY_MIN_MAX);
         trackedCols.addAll(cols.getColList());
         addCleanColIntoCols(cols, newCol, trackedCols);
@@ -130,7 +130,7 @@ public class ColumnHelper {
     private List<CTCol> getOverlappingCols(final CTCol newCol, final TreeSet<CTCol> trackedCols) {
         CTCol lower = trackedCols.lower(newCol);
         NavigableSet<CTCol> potentiallyOverlapping = lower == null ? trackedCols : trackedCols.tailSet(lower, overlaps(lower, newCol));
-        List<CTCol> overlapping = new ArrayList<CTCol>();
+        List<CTCol> overlapping = new ArrayList<>();
         for (CTCol existing : potentiallyOverlapping) {
             if (overlaps(newCol, existing)) {
                 overlapping.add(existing);

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFIgnoredErrorHelper.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFIgnoredErrorHelper.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFIgnoredErrorHelper.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFIgnoredErrorHelper.java Sat Sep 16 08:27:23 2017
@@ -95,7 +95,7 @@ public class XSSFIgnoredErrorHelper {
     }
 
     public static  Set<IgnoredErrorType> getErrorTypes(CTIgnoredError err) {
-        Set<IgnoredErrorType> result = new LinkedHashSet<IgnoredErrorType>();
+        Set<IgnoredErrorType> result = new LinkedHashSet<>();
         for (IgnoredErrorType errType : IgnoredErrorType.values()) {
             if (XSSFIgnoredErrorHelper.isSet(errType, err)) {
                 result.add(errType);

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFRowShifter.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFRowShifter.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFRowShifter.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFRowShifter.java Sat Sep 16 08:27:23 2017
@@ -206,7 +206,7 @@ public final class XSSFRowShifter extend
         for (int j = conditionalFormattingArray.length - 1; j >= 0; j--) {
             CTConditionalFormatting cf = conditionalFormattingArray[j];
 
-            ArrayList<CellRangeAddress> cellRanges = new ArrayList<CellRangeAddress>();
+            ArrayList<CellRangeAddress> cellRanges = new ArrayList<>();
             for (Object stRef : cf.getSqref()) {
                 String[] regions = stRef.toString().split(" ");
                 for (String region : regions) {
@@ -215,7 +215,7 @@ public final class XSSFRowShifter extend
             }
 
             boolean changed = false;
-            List<CellRangeAddress> temp = new ArrayList<CellRangeAddress>();
+            List<CellRangeAddress> temp = new ArrayList<>();
             for (CellRangeAddress craOld : cellRanges) {
                 CellRangeAddress craNew = shiftRange(shifter, craOld, sheetIndex);
                 if (craNew == null) {
@@ -234,7 +234,7 @@ public final class XSSFRowShifter extend
                     ctWorksheet.removeConditionalFormatting(j);
                     continue;
                 }
-                List<String> refs = new ArrayList<String>();
+                List<String> refs = new ArrayList<>();
                 for(CellRangeAddress a : temp) refs.add(a.formatAsString());
                 cf.setSqref(refs);
             }

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/Borders.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/Borders.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/Borders.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/Borders.java Sat Sep 16 08:27:23 2017
@@ -600,7 +600,7 @@ public enum Borders {
 
     ZIG_ZAG_STITCH(191);
 
-    private static Map<Integer, Borders> imap = new HashMap<Integer, Borders>();
+    private static Map<Integer, Borders> imap = new HashMap<>();
 
     static {
         for (Borders p : values()) {

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/BreakClear.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/BreakClear.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/BreakClear.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/BreakClear.java Sat Sep 16 08:27:23 2017
@@ -83,7 +83,7 @@ public enum BreakClear {
      */
     ALL(4);
 
-    private static Map<Integer, BreakClear> imap = new HashMap<Integer, BreakClear>();
+    private static Map<Integer, BreakClear> imap = new HashMap<>();
 
     static {
         for (BreakClear p : values()) {

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/BreakType.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/BreakType.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/BreakType.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/BreakType.java Sat Sep 16 08:27:23 2017
@@ -56,7 +56,7 @@ public enum BreakType {
      */
     TEXT_WRAPPING(3);
 
-    private static Map<Integer, BreakType> imap = new HashMap<Integer, BreakType>();
+    private static Map<Integer, BreakType> imap = new HashMap<>();
 
     static {
         for (BreakType p : values()) {

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/LineSpacingRule.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/LineSpacingRule.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/LineSpacingRule.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/LineSpacingRule.java Sat Sep 16 08:27:23 2017
@@ -49,7 +49,7 @@ public enum LineSpacingRule {
     AT_LEAST(3);
 
 
-    private static Map<Integer, LineSpacingRule> imap = new HashMap<Integer, LineSpacingRule>();
+    private static Map<Integer, LineSpacingRule> imap = new HashMap<>();
 
     static {
         for (LineSpacingRule p : values()) {

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/ParagraphAlignment.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/ParagraphAlignment.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/ParagraphAlignment.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/ParagraphAlignment.java Sat Sep 16 08:27:23 2017
@@ -40,7 +40,7 @@ public enum ParagraphAlignment {
     LOW_KASHIDA(9),
     THAI_DISTRIBUTE(10);
 
-    private static Map<Integer, ParagraphAlignment> imap = new HashMap<Integer, ParagraphAlignment>();
+    private static Map<Integer, ParagraphAlignment> imap = new HashMap<>();
 
     static {
         for (ParagraphAlignment p : values()) {

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/TextAlignment.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/TextAlignment.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/TextAlignment.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/TextAlignment.java Sat Sep 16 08:27:23 2017
@@ -52,7 +52,7 @@ public enum TextAlignment {
      */
     AUTO(5);
 
-    private static Map<Integer, TextAlignment> imap = new HashMap<Integer, TextAlignment>();
+    private static Map<Integer, TextAlignment> imap = new HashMap<>();
 
     static {
         for (TextAlignment p : values()) {

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/UnderlinePatterns.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/UnderlinePatterns.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/UnderlinePatterns.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/UnderlinePatterns.java Sat Sep 16 08:27:23 2017
@@ -135,7 +135,7 @@ public enum UnderlinePatterns {
      */
     NONE(18);
 
-    private static Map<Integer, UnderlinePatterns> imap = new HashMap<Integer, UnderlinePatterns>();
+    private static Map<Integer, UnderlinePatterns> imap = new HashMap<>();
 
     static {
         for (UnderlinePatterns p : values()) {

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/VerticalAlign.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/VerticalAlign.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/VerticalAlign.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/VerticalAlign.java Sat Sep 16 08:27:23 2017
@@ -47,7 +47,7 @@ public enum VerticalAlign {
      */
     SUBSCRIPT(3);
 
-    private static Map<Integer, VerticalAlign> imap = new HashMap<Integer, VerticalAlign>();
+    private static Map<Integer, VerticalAlign> imap = new HashMap<>();
 
     static {
         for (VerticalAlign p : values()) {

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java Sat Sep 16 08:27:23 2017
@@ -80,17 +80,17 @@ import org.openxmlformats.schemas.wordpr
 public class XWPFDocument extends POIXMLDocument implements Document, IBody {
     private static final POILogger LOG = POILogFactory.getLogger(XWPFDocument.class);
     
-    protected List<XWPFFooter> footers = new ArrayList<XWPFFooter>();
-    protected List<XWPFHeader> headers = new ArrayList<XWPFHeader>();
-    protected List<XWPFComment> comments = new ArrayList<XWPFComment>();
-    protected List<XWPFHyperlink> hyperlinks = new ArrayList<XWPFHyperlink>();
-    protected List<XWPFParagraph> paragraphs = new ArrayList<XWPFParagraph>();
-    protected List<XWPFTable> tables = new ArrayList<XWPFTable>();
-    protected List<XWPFSDT> contentControls = new ArrayList<XWPFSDT>();
-    protected List<IBodyElement> bodyElements = new ArrayList<IBodyElement>();
-    protected List<XWPFPictureData> pictures = new ArrayList<XWPFPictureData>();
-    protected Map<Long, List<XWPFPictureData>> packagePictures = new HashMap<Long, List<XWPFPictureData>>();
-    protected Map<Integer, XWPFFootnote> endnotes = new HashMap<Integer, XWPFFootnote>();
+    protected List<XWPFFooter> footers = new ArrayList<>();
+    protected List<XWPFHeader> headers = new ArrayList<>();
+    protected List<XWPFComment> comments = new ArrayList<>();
+    protected List<XWPFHyperlink> hyperlinks = new ArrayList<>();
+    protected List<XWPFParagraph> paragraphs = new ArrayList<>();
+    protected List<XWPFTable> tables = new ArrayList<>();
+    protected List<XWPFSDT> contentControls = new ArrayList<>();
+    protected List<IBodyElement> bodyElements = new ArrayList<>();
+    protected List<XWPFPictureData> pictures = new ArrayList<>();
+    protected Map<Long, List<XWPFPictureData>> packagePictures = new HashMap<>();
+    protected Map<Integer, XWPFFootnote> endnotes = new HashMap<>();
     protected XWPFNumbering numbering;
     protected XWPFStyles styles;
     protected XWPFFootnotes footnotes;
@@ -522,7 +522,7 @@ public class XWPFDocument extends POIXML
      */
     @Override
     public List<PackagePart> getAllEmbedds() throws OpenXML4JException {
-        List<PackagePart> embedds = new LinkedList<PackagePart>();
+        List<PackagePart> embedds = new LinkedList<>();
 
         // Get the embeddings for the workbook
         PackagePart part = getPackagePart();
@@ -1312,7 +1312,7 @@ public class XWPFDocument extends POIXML
      * @return all Pictures in this package
      */
     public List<XWPFPictureData> getAllPackagePictures() {
-        List<XWPFPictureData> result = new ArrayList<XWPFPictureData>();
+        List<XWPFPictureData> result = new ArrayList<>();
         Collection<List<XWPFPictureData>> values = packagePictures.values();
         for (List<XWPFPictureData> list : values) {
             result.addAll(list);
@@ -1323,7 +1323,7 @@ public class XWPFDocument extends POIXML
     void registerPackagePictureData(XWPFPictureData picData) {
         List<XWPFPictureData> list = packagePictures.get(picData.getChecksum());
         if (list == null) {
-            list = new ArrayList<XWPFPictureData>(1);
+            list = new ArrayList<>(1);
             packagePictures.put(picData.getChecksum(), list);
         }
         if (!list.contains(picData)) {

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFootnote.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFootnote.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFootnote.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFootnote.java Sat Sep 16 08:27:23 2017
@@ -32,10 +32,10 @@ import org.openxmlformats.schemas.wordpr
 import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc;
 
 public class XWPFFootnote implements Iterable<XWPFParagraph>, IBody {
-    private List<XWPFParagraph> paragraphs = new ArrayList<XWPFParagraph>();
-    private List<XWPFTable> tables = new ArrayList<XWPFTable>();
-    private List<XWPFPictureData> pictures = new ArrayList<XWPFPictureData>();
-    private List<IBodyElement> bodyElements = new ArrayList<IBodyElement>();
+    private List<XWPFParagraph> paragraphs = new ArrayList<>();
+    private List<XWPFTable> tables = new ArrayList<>();
+    private List<XWPFPictureData> pictures = new ArrayList<>();
+    private List<IBodyElement> bodyElements = new ArrayList<>();
 
     private CTFtnEdn ctFtnEdn;
     private XWPFFootnotes footnotes;

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFootnotes.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFootnotes.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFootnotes.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFootnotes.java Sat Sep 16 08:27:23 2017
@@ -42,7 +42,7 @@ import org.openxmlformats.schemas.wordpr
  */
 public class XWPFFootnotes extends POIXMLDocumentPart {
     protected XWPFDocument document;
-    private List<XWPFFootnote> listFootnote = new ArrayList<XWPFFootnote>();
+    private List<XWPFFootnote> listFootnote = new ArrayList<>();
     private CTFootnotes ctFootnotes;
 
     /**

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFHeaderFooter.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFHeaderFooter.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFHeaderFooter.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFHeaderFooter.java Sat Sep 16 08:27:23 2017
@@ -42,10 +42,10 @@ import org.openxmlformats.schemas.wordpr
  * Parent of XWPF headers and footers
  */
 public abstract class XWPFHeaderFooter extends POIXMLDocumentPart implements IBody {
-    List<XWPFParagraph> paragraphs = new ArrayList<XWPFParagraph>();
-    List<XWPFTable> tables = new ArrayList<XWPFTable>();
-    List<XWPFPictureData> pictures = new ArrayList<XWPFPictureData>();
-    List<IBodyElement> bodyElements = new ArrayList<IBodyElement>();
+    List<XWPFParagraph> paragraphs = new ArrayList<>();
+    List<XWPFTable> tables = new ArrayList<>();
+    List<XWPFPictureData> pictures = new ArrayList<>();
+    List<IBodyElement> bodyElements = new ArrayList<>();
 
     CTHdrFtr headerFooter;
     XWPFDocument document;
@@ -518,9 +518,9 @@ public abstract class XWPFHeaderFooter e
     }
 
     public void readHdrFtr() {
-        bodyElements = new ArrayList<IBodyElement>();
-        paragraphs = new ArrayList<XWPFParagraph>();
-        tables = new ArrayList<XWPFTable>();
+        bodyElements = new ArrayList<>();
+        paragraphs = new ArrayList<>();
+        tables = new ArrayList<>();
         // parse the document with cursor and add
         // the XmlObject to its lists
         XmlCursor cursor = headerFooter.newCursor();

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFNumbering.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFNumbering.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFNumbering.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFNumbering.java Sat Sep 16 08:27:23 2017
@@ -42,8 +42,8 @@ import org.openxmlformats.schemas.wordpr
  * @author Philipp Epp
  */
 public class XWPFNumbering extends POIXMLDocumentPart {
-    protected List<XWPFAbstractNum> abstractNums = new ArrayList<XWPFAbstractNum>();
-    protected List<XWPFNum> nums = new ArrayList<XWPFNum>();
+    protected List<XWPFAbstractNum> abstractNums = new ArrayList<>();
+    protected List<XWPFNum> nums = new ArrayList<>();
     boolean isNew;
     private CTNumbering ctNumbering;
 
@@ -61,8 +61,8 @@ public class XWPFNumbering extends POIXM
      * create a new XWPFNumbering object for use in a new document
      */
     public XWPFNumbering() {
-        abstractNums = new ArrayList<XWPFAbstractNum>();
-        nums = new ArrayList<XWPFNum>();
+        abstractNums = new ArrayList<>();
+        nums = new ArrayList<>();
         isNew = true;
     }
 

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFParagraph.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFParagraph.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFParagraph.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFParagraph.java Sat Sep 16 08:27:23 2017
@@ -58,8 +58,8 @@ public class XWPFParagraph implements IB
         }
 
         // Build up the character runs
-        runs = new ArrayList<XWPFRun>();
-        iruns = new ArrayList<IRunElement>();
+        runs = new ArrayList<>();
+        iruns = new ArrayList<>();
         buildRunsInOrderFromXml(paragraph);
 
         // Look for bits associated with the runs

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRelation.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRelation.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRelation.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRelation.java Sat Sep 16 08:27:23 2017
@@ -32,7 +32,7 @@ public final class XWPFRelation extends
     /**
      * A map to lookup POIXMLRelation by its relation type
      */
-    private static final Map<String, XWPFRelation> _table = new HashMap<String, XWPFRelation>();
+    private static final Map<String, XWPFRelation> _table = new HashMap<>();
 
     public static final XWPFRelation DOCUMENT = new XWPFRelation(
             "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml",

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java Sat Sep 16 08:27:23 2017
@@ -123,7 +123,7 @@ public class XWPFRun implements ISDTCont
 
         // Look for any text in any of our pictures or drawings
         StringBuilder text = new StringBuilder();
-        List<XmlObject> pictTextObjs = new ArrayList<XmlObject>();
+        List<XmlObject> pictTextObjs = new ArrayList<>();
         pictTextObjs.addAll(Arrays.asList(r.getPictArray()));
         pictTextObjs.addAll(Arrays.asList(r.getDrawingArray()));
         for (XmlObject o : pictTextObjs) {
@@ -143,7 +143,7 @@ public class XWPFRun implements ISDTCont
 
         // Do we have any embedded pictures?
         // (They're a different CTPicture, under the drawingml namespace)
-        pictures = new ArrayList<XWPFPicture>();
+        pictures = new ArrayList<>();
         for (XmlObject o : pictTextObjs) {
             for (CTPicture pict : getCTPictures(o)) {
                 XWPFPicture picture = new XWPFPicture(pict, this);
@@ -175,7 +175,7 @@ public class XWPFRun implements ISDTCont
     }
 
     private List<CTPicture> getCTPictures(XmlObject o) {
-        List<CTPicture> pics = new ArrayList<CTPicture>();
+        List<CTPicture> pics = new ArrayList<>();
         XmlObject[] picts = o.selectPath("declare namespace pic='" + CTPicture.type.getName().getNamespaceURI() + "' .//pic:pic");
         for (XmlObject pict : picts) {
             if (pict instanceof XmlAnyTypeImpl) {

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFSDTContent.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFSDTContent.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFSDTContent.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFSDTContent.java Sat Sep 16 08:27:23 2017
@@ -40,11 +40,11 @@ public class XWPFSDTContent implements I
 
     // private final IBody part;
     // private final XWPFDocument document;
-    private List<XWPFParagraph> paragraphs = new ArrayList<XWPFParagraph>();
-    private List<XWPFTable> tables = new ArrayList<XWPFTable>();
-    private List<XWPFRun> runs = new ArrayList<XWPFRun>();
-    private List<XWPFSDT> contentControls = new ArrayList<XWPFSDT>();
-    private List<ISDTContents> bodyElements = new ArrayList<ISDTContents>();
+    private List<XWPFParagraph> paragraphs = new ArrayList<>();
+    private List<XWPFTable> tables = new ArrayList<>();
+    private List<XWPFRun> runs = new ArrayList<>();
+    private List<XWPFSDT> contentControls = new ArrayList<>();
+    private List<ISDTContents> bodyElements = new ArrayList<>();
 
     public XWPFSDTContent(CTSdtContentRun sdtRun, IBody part, IRunBody parent) {
         for (CTR ctr : sdtRun.getRArray()) {

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFStyles.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFStyles.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFStyles.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFStyles.java Sat Sep 16 08:27:23 2017
@@ -51,7 +51,7 @@ import org.openxmlformats.schemas.wordpr
  */
 public class XWPFStyles extends POIXMLDocumentPart {
     private CTStyles ctStyles;
-    private List<XWPFStyle> listStyle = new ArrayList<XWPFStyle>();
+    private List<XWPFStyle> listStyle = new ArrayList<>();
 
     private XWPFLatentStyles latentStyles;
     private XWPFDefaultRunStyle defaultRunStyle;
@@ -208,7 +208,7 @@ public class XWPFStyles extends POIXMLDo
      * @return a list of all styles which were used by this method
      */
     public List<XWPFStyle> getUsedStyleList(XWPFStyle style) {
-        List<XWPFStyle> usedStyleList = new ArrayList<XWPFStyle>();
+        List<XWPFStyle> usedStyleList = new ArrayList<>();
         usedStyleList.add(style);
         return getUsedStyleList(style, usedStyleList);
     }

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTable.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTable.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTable.java Sat Sep 16 08:27:23 2017
@@ -50,7 +50,7 @@ public class XWPFTable implements IBodyE
 
     static {
         // populate enum maps
-        xwpfBorderTypeMap = new EnumMap<XWPFBorderType, STBorder.Enum>(XWPFBorderType.class);
+        xwpfBorderTypeMap = new EnumMap<>(XWPFBorderType.class);
         xwpfBorderTypeMap.put(XWPFBorderType.NIL, STBorder.Enum.forInt(STBorder.INT_NIL));
         xwpfBorderTypeMap.put(XWPFBorderType.NONE, STBorder.Enum.forInt(STBorder.INT_NONE));
         xwpfBorderTypeMap.put(XWPFBorderType.SINGLE, STBorder.Enum.forInt(STBorder.INT_SINGLE));
@@ -60,7 +60,7 @@ public class XWPFTable implements IBodyE
         xwpfBorderTypeMap.put(XWPFBorderType.DASHED, STBorder.Enum.forInt(STBorder.INT_DASHED));
         xwpfBorderTypeMap.put(XWPFBorderType.DOT_DASH, STBorder.Enum.forInt(STBorder.INT_DOT_DASH));
 
-        stBorderTypeMap = new HashMap<Integer, XWPFBorderType>();
+        stBorderTypeMap = new HashMap<>();
         stBorderTypeMap.put(STBorder.INT_NIL, XWPFBorderType.NIL);
         stBorderTypeMap.put(STBorder.INT_NONE, XWPFBorderType.NONE);
         stBorderTypeMap.put(STBorder.INT_SINGLE, XWPFBorderType.SINGLE);
@@ -96,7 +96,7 @@ public class XWPFTable implements IBodyE
         this.part = part;
         this.ctTbl = table;
 
-        tableRows = new ArrayList<XWPFTableRow>();
+        tableRows = new ArrayList<>();
 
         // is an empty table: I add one row and one column as default
         if (table.sizeOfTrArray() == 0)

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTableCell.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTableCell.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTableCell.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTableCell.java Sat Sep 16 08:27:23 2017
@@ -49,13 +49,13 @@ public class XWPFTableCell implements IB
 
     static {
         // populate enum maps
-        alignMap = new EnumMap<XWPFVertAlign, STVerticalJc.Enum>(XWPFVertAlign.class);
+        alignMap = new EnumMap<>(XWPFVertAlign.class);
         alignMap.put(XWPFVertAlign.TOP, STVerticalJc.Enum.forInt(STVerticalJc.INT_TOP));
         alignMap.put(XWPFVertAlign.CENTER, STVerticalJc.Enum.forInt(STVerticalJc.INT_CENTER));
         alignMap.put(XWPFVertAlign.BOTH, STVerticalJc.Enum.forInt(STVerticalJc.INT_BOTH));
         alignMap.put(XWPFVertAlign.BOTTOM, STVerticalJc.Enum.forInt(STVerticalJc.INT_BOTTOM));
 
-        stVertAlignTypeMap = new HashMap<Integer, XWPFVertAlign>();
+        stVertAlignTypeMap = new HashMap<>();
         stVertAlignTypeMap.put(STVerticalJc.INT_TOP, XWPFVertAlign.TOP);
         stVertAlignTypeMap.put(STVerticalJc.INT_CENTER, XWPFVertAlign.CENTER);
         stVertAlignTypeMap.put(STVerticalJc.INT_BOTH, XWPFVertAlign.BOTH);
@@ -81,9 +81,9 @@ public class XWPFTableCell implements IB
         // NB: If a table cell does not include at least one block-level element, then this document shall be considered corrupt.
         if (cell.sizeOfPArray() < 1)
             cell.addNewP();
-        bodyElements = new ArrayList<IBodyElement>();
-        paragraphs = new ArrayList<XWPFParagraph>();
-        tables = new ArrayList<XWPFTable>();
+        bodyElements = new ArrayList<>();
+        paragraphs = new ArrayList<>();
+        tables = new ArrayList<>();
 
         XmlCursor cursor = ctTc.newCursor();
         cursor.selectPath("./*");

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTableRow.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTableRow.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTableRow.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTableRow.java Sat Sep 16 08:27:23 2017
@@ -134,7 +134,7 @@ public class XWPFTableRow {
      */
     public List<ICell> getTableICells() {
 
-        List<ICell> cells = new ArrayList<ICell>();
+        List<ICell> cells = new ArrayList<>();
         //Can't use ctRow.getTcList because that only gets table cells
         //Can't use ctRow.getSdtList because that only gets sdts that are at cell level
         XmlCursor cursor = ctRow.newCursor();
@@ -159,7 +159,7 @@ public class XWPFTableRow {
      */
     public List<XWPFTableCell> getTableCells() {
         if (tableCells == null) {
-            List<XWPFTableCell> cells = new ArrayList<XWPFTableCell>();
+            List<XWPFTableCell> cells = new ArrayList<>();
             for (CTTc tableCell : ctRow.getTcArray()) {
                 cells.add(new XWPFTableCell(tableCell, this, table.getBody()));
             }

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/TestPOIXMLDocument.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/TestPOIXMLDocument.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/TestPOIXMLDocument.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/TestPOIXMLDocument.java Sat Sep 16 08:27:23 2017
@@ -98,7 +98,7 @@ public final class TestPOIXMLDocument {
     }
 
     private static void traverse(POIXMLDocument doc) throws IOException{
-        HashMap<String,POIXMLDocumentPart> context = new HashMap<String,POIXMLDocumentPart>();
+        HashMap<String,POIXMLDocumentPart> context = new HashMap<>();
         for (RelationPart p : doc.getRelationParts()){
             traverse(p, context);
         }
@@ -275,7 +275,7 @@ public final class TestPOIXMLDocument {
         POIXMLDocumentPart part = new POIXMLDocumentPart();
         part.prepareForCommit();
         part.commit();
-        part.onSave(new HashSet<PackagePart>());
+        part.onSave(new HashSet<>());
 
         assertNull(part.getRelationById(null));
         assertNull(part.getRelationId(null));

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/TestPOIXMLProperties.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/TestPOIXMLProperties.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/TestPOIXMLProperties.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/TestPOIXMLProperties.java Sat Sep 16 08:27:23 2017
@@ -187,7 +187,7 @@ public final class TestPOIXMLProperties
 
 
         Date dateCreated = LocaleUtil.getLocaleCalendar(2010, 6, 15, 10, 0, 0).getTime();
-        cp.setCreated(new Nullable<Date>(dateCreated));
+        cp.setCreated(new Nullable<>(dateCreated));
         assertEquals(dateCreated, cp.getCreated());
 
         XWPFDocument doc2 = XWPFTestDataSamples.writeOutAndReadBack(doc);

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestFileHelper.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestFileHelper.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestFileHelper.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestFileHelper.java Sat Sep 16 08:27:23 2017
@@ -39,7 +39,7 @@ public final class TestFileHelper {
 	 */
     @Test
 	public void testGetDirectory() {
-		TreeMap<String, String> expectedValue = new TreeMap<String, String>();
+		TreeMap<String, String> expectedValue = new TreeMap<>();
 		expectedValue.put("/dir1/test.doc", "/dir1");
 		expectedValue.put("/dir1/dir2/test.doc.xml", "/dir1/dir2");
 

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestListParts.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestListParts.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestListParts.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestListParts.java Sat Sep 16 08:27:23 2017
@@ -37,10 +37,10 @@ public final class TestListParts extends
 
 	@Override
 	protected void setUp() throws Exception {
-		values = new TreeMap<PackagePartName, String>();
+		values = new TreeMap<>();
 
 		// Expected values
-		expectedValues = new TreeMap<PackagePartName, String>();
+		expectedValues = new TreeMap<>();
 		expectedValues.put(PackagingURIHelper.createPartName("/_rels/.rels"),
 				"application/vnd.openxmlformats-package.relationships+xml");
 

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackage.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackage.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackage.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackage.java Sat Sep 16 08:27:23 2017
@@ -440,10 +440,10 @@ public final class TestPackage {
 		TreeMap<PackagePartName, String> expectedValues;
 		TreeMap<PackagePartName, String> values;
 
-		values = new TreeMap<PackagePartName, String>();
+		values = new TreeMap<>();
 
 		// Expected values
-		expectedValues = new TreeMap<PackagePartName, String>();
+		expectedValues = new TreeMap<>();
 		expectedValues.put(PackagingURIHelper.createPartName("/_rels/.rels"),
 				"application/vnd.openxmlformats-package.relationships+xml");
 
@@ -499,10 +499,10 @@ public final class TestPackage {
 		TreeMap<PackagePartName, String> expectedValues;
 		TreeMap<PackagePartName, String> values;
 
-		values = new TreeMap<PackagePartName, String>();
+		values = new TreeMap<>();
 
 		// Expected values
-		expectedValues = new TreeMap<PackagePartName, String>();
+		expectedValues = new TreeMap<>();
 		expectedValues.put(PackagingURIHelper.createPartName("/_rels/.rels"),
 				"application/vnd.openxmlformats-package.relationships+xml");
 
@@ -609,7 +609,7 @@ public final class TestPackage {
         OPCPackage pkg = OPCPackage.open(filepath, PackageAccess.READ_WRITE);
         try {
             List<PackagePart> rs =  pkg.getPartsByName(Pattern.compile("/word/.*?\\.xml"));
-            HashMap<String, PackagePart>  selected = new HashMap<String, PackagePart>();
+            HashMap<String, PackagePart>  selected = new HashMap<>();
     
             for(PackagePart p : rs)
                 selected.put(p.getPartName().getName(), p);



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message