poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cen...@apache.org
Subject svn commit: r1808516 [2/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/java/org/apache/poi/hpsf/DocumentSummaryInformation.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hpsf/DocumentSummaryInformation.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hpsf/DocumentSummaryInformation.java (original)
+++ poi/trunk/src/java/org/apache/poi/hpsf/DocumentSummaryInformation.java Sat Sep 16 08:27:23 2017
@@ -825,7 +825,7 @@ public class DocumentSummaryInformation
             throw new HPSFRuntimeException("Illegal internal format of Document SummaryInformation stream: second section is missing.");
         }
 
-        List<Section> l = new LinkedList<Section>(getSections());
+        List<Section> l = new LinkedList<>(getSections());
         clearSections();
         int idx = 0;
         for (Section s : l) {

Modified: poi/trunk/src/java/org/apache/poi/hpsf/HPSFPropertiesOnlyDocument.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hpsf/HPSFPropertiesOnlyDocument.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hpsf/HPSFPropertiesOnlyDocument.java (original)
+++ poi/trunk/src/java/org/apache/poi/hpsf/HPSFPropertiesOnlyDocument.java Sat Sep 16 08:27:23 2017
@@ -83,7 +83,7 @@ public class HPSFPropertiesOnlyDocument
     
     private void write(NPOIFSFileSystem fs) throws IOException {
         // For tracking what we've written out, so far
-        List<String> excepts = new ArrayList<String>(2);
+        List<String> excepts = new ArrayList<>(2);
 
         // Write out our HPFS properties, with any changes
         writeProperties(fs, excepts);

Modified: poi/trunk/src/java/org/apache/poi/hpsf/PropertySet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hpsf/PropertySet.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hpsf/PropertySet.java (original)
+++ poi/trunk/src/java/org/apache/poi/hpsf/PropertySet.java Sat Sep 16 08:27:23 2017
@@ -134,7 +134,7 @@ public class PropertySet {
     /**
      * The sections in this {@link PropertySet}.
      */
-    private final List<Section> sections = new ArrayList<Section>();
+    private final List<Section> sections = new ArrayList<>();
 
     
     /**

Modified: poi/trunk/src/java/org/apache/poi/hpsf/Section.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hpsf/Section.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hpsf/Section.java (original)
+++ poi/trunk/src/java/org/apache/poi/hpsf/Section.java Sat Sep 16 08:27:23 2017
@@ -71,7 +71,7 @@ public class Section {
     /**
      * This section's properties.
      */
-    private final Map<Long,Property> properties = new LinkedHashMap<Long,Property>();
+    private final Map<Long,Property> properties = new LinkedHashMap<>();
 
     /**
      * This member is {@code true} if the last call to {@link
@@ -175,7 +175,7 @@ public class Section {
          *    seconds pass reads the other properties.
          */
         /* Pass 1: Read the property list. */
-        final TreeBidiMap<Long,Long> offset2Id = new TreeBidiMap<Long,Long>();
+        final TreeBidiMap<Long,Long> offset2Id = new TreeBidiMap<>();
         for (int i = 0; i < propertyCount; i++) {
             /* Read the property ID. */
             long id = (int)leis.readUInt();
@@ -662,7 +662,7 @@ public class Section {
 
         /* Compare all properties except the dictionary (id 0) and
          * the codepage (id 1 / ignored) as they must be handled specially. */
-        Set<Long> propIds = new HashSet<Long>(properties.keySet());
+        Set<Long> propIds = new HashSet<>(properties.keySet());
         propIds.addAll(s.properties.keySet());
         propIds.remove(0L);
         propIds.remove(1L);
@@ -800,7 +800,7 @@ public class Section {
      */
     private boolean readDictionary(LittleEndianByteArrayInputStream leis, final int length, final int codepage)
     throws UnsupportedEncodingException {
-        Map<Long,String> dic = new HashMap<Long,String>();
+        Map<Long,String> dic = new HashMap<>();
 
         /*
          * Read the number of dictionary entries.
@@ -919,7 +919,7 @@ public class Section {
     public void setDictionary(final Map<Long,String> dictionary) throws IllegalPropertySetDataException {
         if (dictionary != null) {
             if (this.dictionary == null) {
-                this.dictionary = new TreeMap<Long,String>();
+                this.dictionary = new TreeMap<>();
             }
             this.dictionary.putAll(dictionary);
 

Modified: poi/trunk/src/java/org/apache/poi/hpsf/Variant.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hpsf/Variant.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hpsf/Variant.java (original)
+++ poi/trunk/src/java/org/apache/poi/hpsf/Variant.java Sat Sep 16 08:27:23 2017
@@ -387,8 +387,8 @@ public class Variant
 
     /* Initialize the number-to-name and number-to-length map: */
     static {
-        Map<Long,String> number2Name = new HashMap<Long,String>(NUMBER_TO_NAME_LIST.length, 1.0F);
-        Map<Long,Integer> number2Len = new HashMap<Long,Integer>(NUMBER_TO_NAME_LIST.length, 1.0F);
+        Map<Long,String> number2Name = new HashMap<>(NUMBER_TO_NAME_LIST.length, 1.0F);
+        Map<Long,Integer> number2Len = new HashMap<>(NUMBER_TO_NAME_LIST.length, 1.0F);
 
         for (Object[] nn : NUMBER_TO_NAME_LIST) {
             number2Name.put((Long)nn[0], (String)nn[1]);

Modified: poi/trunk/src/java/org/apache/poi/hpsf/VariantSupport.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hpsf/VariantSupport.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hpsf/VariantSupport.java (original)
+++ poi/trunk/src/java/org/apache/poi/hpsf/VariantSupport.java Sat Sep 16 08:27:23 2017
@@ -105,7 +105,7 @@ public class VariantSupport extends Vari
         if (isLogUnsupportedTypes())
         {
             if (unsupportedMessage == null) {
-                unsupportedMessage = new LinkedList<Long>();
+                unsupportedMessage = new LinkedList<>();
             }
             Long vt = Long.valueOf(ex.getVariantType());
             if (!unsupportedMessage.contains(vt))

Modified: poi/trunk/src/java/org/apache/poi/hpsf/Vector.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hpsf/Vector.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hpsf/Vector.java (original)
+++ poi/trunk/src/java/org/apache/poi/hpsf/Vector.java Sat Sep 16 08:27:23 2017
@@ -47,7 +47,7 @@ class Vector {
         //of allocating array of length "length".
         //If the length is corrupted and crazily big but < Integer.MAX_VALUE,
         //this will trigger a RuntimeException "Buffer overrun" in lei.checkPosition
-        List<TypedPropertyValue> values = new ArrayList<TypedPropertyValue>();
+        List<TypedPropertyValue> values = new ArrayList<>();
         int paddedType = (_type == Variant.VT_VARIANT) ? 0 : _type;
         for ( int i = 0; i < length; i++ ) {
             TypedPropertyValue value = new TypedPropertyValue(paddedType, null);

Modified: poi/trunk/src/java/org/apache/poi/hpsf/wellknown/PropertyIDMap.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hpsf/wellknown/PropertyIDMap.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hpsf/wellknown/PropertyIDMap.java (original)
+++ poi/trunk/src/java/org/apache/poi/hpsf/wellknown/PropertyIDMap.java Sat Sep 16 08:27:23 2017
@@ -420,7 +420,7 @@ public class PropertyIDMap implements Ma
      * @param map The instance to be created is backed by this map.
      */
     private PropertyIDMap(Object[][] idValues) {
-        Map<Long,String> m = new HashMap<Long,String>(idValues.length);
+        Map<Long,String> m = new HashMap<>(idValues.length);
         for (Object[] idValue : idValues) {
             m.put((Long)idValue[0], (String)idValue[1]);
         }

Modified: poi/trunk/src/java/org/apache/poi/hpsf/wellknown/SectionIDMap.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hpsf/wellknown/SectionIDMap.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hpsf/wellknown/SectionIDMap.java (original)
+++ poi/trunk/src/java/org/apache/poi/hpsf/wellknown/SectionIDMap.java Sat Sep 16 08:27:23 2017
@@ -45,7 +45,7 @@ public class SectionIDMap {
      * The default section ID map. It maps section format IDs to {@link PropertyIDMap PropertyIDMaps}
      */
     private static ThreadLocal<Map<ClassID,PropertyIDMap>> defaultMap =
-        new ThreadLocal<Map<ClassID,PropertyIDMap>>();
+            new ThreadLocal<>();
     
     /**
      * <p>The SummaryInformation's section's format ID.</p>
@@ -79,7 +79,7 @@ public class SectionIDMap {
     public static SectionIDMap getInstance() {
         Map<ClassID,PropertyIDMap> m = defaultMap.get();
         if (m == null) {
-            m = new HashMap<ClassID,PropertyIDMap>();
+            m = new HashMap<>();
             m.put(SUMMARY_INFORMATION_ID, PropertyIDMap.getSummaryInformationProperties());
             m.put(DOCUMENT_SUMMARY_INFORMATION_ID[0], PropertyIDMap.getDocumentSummaryInformationProperties());
             defaultMap.set(m);

Modified: poi/trunk/src/java/org/apache/poi/hssf/dev/BiffDrawingToXml.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/dev/BiffDrawingToXml.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/dev/BiffDrawingToXml.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/dev/BiffDrawingToXml.java Sat Sep 16 08:27:23 2017
@@ -57,7 +57,7 @@ public class BiffDrawingToXml {
     }
 
     private static List<Integer> getIndexesByName(String[] params, HSSFWorkbook workbook) {
-        List<Integer> list = new ArrayList<Integer>();
+        List<Integer> list = new ArrayList<>();
         int pos = getAttributeIndex(SHEET_NAME_PARAM, params);
         if (-1 != pos) {
             if (pos >= params.length) {
@@ -74,7 +74,7 @@ public class BiffDrawingToXml {
     }
 
     private static List<Integer> getIndexesByIdArray(String[] params) {
-        List<Integer> list = new ArrayList<Integer>();
+        List<Integer> list = new ArrayList<>();
         int pos = getAttributeIndex(SHEET_INDEXES_PARAM, params);
         if (-1 != pos) {
             if (pos >= params.length) {
@@ -90,7 +90,7 @@ public class BiffDrawingToXml {
     }
 
     private static List<Integer> getSheetsIndexes(String[] params, HSSFWorkbook workbook) {
-        List<Integer> list = new ArrayList<Integer>();
+        List<Integer> list = new ArrayList<>();
         list.addAll(getIndexesByIdArray(params));
         list.addAll(getIndexesByName(params, workbook));
         if (0 == list.size()) {

Modified: poi/trunk/src/java/org/apache/poi/hssf/dev/BiffViewer.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/dev/BiffViewer.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/dev/BiffViewer.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/dev/BiffViewer.java Sat Sep 16 08:27:23 2017
@@ -76,7 +76,7 @@ public final class BiffViewer {
      */
     public static Record[] createRecords(InputStream is, PrintWriter ps, BiffRecordListener recListener, boolean dumpInterpretedRecords)
             throws org.apache.poi.util.RecordFormatException {
-        List<Record> temp = new ArrayList<Record>();
+        List<Record> temp = new ArrayList<>();
 
         RecordInputStream recStream = new RecordInputStream(is);
         while (true) {
@@ -456,7 +456,7 @@ public final class BiffViewer {
 			_hexDumpWriter = hexDumpWriter;
 			_zeroAlignEachRecord = zeroAlignEachRecord;
 			_noHeader = noHeader;
-			_headers = new ArrayList<String>();
+			_headers = new ArrayList<>();
 		}
 
 		@Override
@@ -480,7 +480,7 @@ public final class BiffViewer {
 		}
 		public List<String> getRecentHeaders() {
 		    List<String> result = _headers;
-		    _headers = new ArrayList<String>();
+		    _headers = new ArrayList<>();
 		    return result;
 		}
 		private static String formatRecordDetails(int globalOffset, int sid, int size, int recordCounter) {

Modified: poi/trunk/src/java/org/apache/poi/hssf/eventusermodel/EventWorkbookBuilder.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/eventusermodel/EventWorkbookBuilder.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/eventusermodel/EventWorkbookBuilder.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/eventusermodel/EventWorkbookBuilder.java Sat Sep 16 08:27:23 2017
@@ -65,7 +65,7 @@ public class EventWorkbookBuilder {
 	 */
 	public static InternalWorkbook createStubWorkbook(ExternSheetRecord[] externs,
 			BoundSheetRecord[] bounds, SSTRecord sst) {
-		List<Record> wbRecords = new ArrayList<Record>();
+		List<Record> wbRecords = new ArrayList<>();
 
 		// Core Workbook records go first
 		if(bounds != null) {
@@ -114,8 +114,8 @@ public class EventWorkbookBuilder {
 	 */
 	public static class SheetRecordCollectingListener implements HSSFListener {
 		private final HSSFListener childListener;
-		private final List<BoundSheetRecord> boundSheetRecords = new ArrayList<BoundSheetRecord>();
-		private final List<ExternSheetRecord> externSheetRecords = new ArrayList<ExternSheetRecord>();
+		private final List<BoundSheetRecord> boundSheetRecords = new ArrayList<>();
+		private final List<ExternSheetRecord> externSheetRecords = new ArrayList<>();
 		private SSTRecord sstRecord;
 
 		public SheetRecordCollectingListener(HSSFListener childListener) {

Modified: poi/trunk/src/java/org/apache/poi/hssf/eventusermodel/FormatTrackingHSSFListener.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/eventusermodel/FormatTrackingHSSFListener.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/eventusermodel/FormatTrackingHSSFListener.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/eventusermodel/FormatTrackingHSSFListener.java Sat Sep 16 08:27:23 2017
@@ -45,8 +45,8 @@ public class FormatTrackingHSSFListener
 	private final HSSFListener _childListener;
 	private final HSSFDataFormatter _formatter;
 	private final NumberFormat _defaultFormat;
-	private final Map<Integer, FormatRecord> _customFormatRecords = new HashMap<Integer, FormatRecord>();
-	private final List<ExtendedFormatRecord> _xfRecords = new ArrayList<ExtendedFormatRecord>();
+	private final Map<Integer, FormatRecord> _customFormatRecords = new HashMap<>();
+	private final List<ExtendedFormatRecord> _xfRecords = new ArrayList<>();
 
 	/**
 	 * Creates a format tracking wrapper around the given listener, using

Modified: poi/trunk/src/java/org/apache/poi/hssf/eventusermodel/HSSFRequest.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/eventusermodel/HSSFRequest.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/eventusermodel/HSSFRequest.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/eventusermodel/HSSFRequest.java Sat Sep 16 08:27:23 2017
@@ -38,7 +38,7 @@ public class HSSFRequest {
 
 	/** Creates a new instance of HSSFRequest */
 	public HSSFRequest() {
-		_records = new HashMap<Short, List<HSSFListener>>(50); // most folks won't listen for too many of these
+		_records = new HashMap<>(50); // most folks won't listen for too many of these
 	}
 
 	/**
@@ -58,7 +58,7 @@ public class HSSFRequest {
 		List<HSSFListener> list = _records.get(Short.valueOf(sid));
 
 		if (list == null) {
-			list = new ArrayList<HSSFListener>(1); // probably most people will use one listener
+			list = new ArrayList<>(1); // probably most people will use one listener
 			_records.put(Short.valueOf(sid), list);
 		}
 		list.add(lsnr);

Modified: poi/trunk/src/java/org/apache/poi/hssf/extractor/EventBasedExcelExtractor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/extractor/EventBasedExcelExtractor.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/extractor/EventBasedExcelExtractor.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/extractor/EventBasedExcelExtractor.java Sat Sep 16 08:27:23 2017
@@ -171,7 +171,7 @@ public class EventBasedExcelExtractor ex
        private int nextRow = -1;
 
        public TextListener() {
-           sheetNames = new ArrayList<String>();
+           sheetNames = new ArrayList<>();
        }
        public void processRecord(Record record) {
            String thisText = null;

Modified: poi/trunk/src/java/org/apache/poi/hssf/model/DrawingManager2.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/model/DrawingManager2.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/model/DrawingManager2.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/model/DrawingManager2.java Sat Sep 16 08:27:23 2017
@@ -30,7 +30,7 @@ import org.apache.poi.util.Removal;
  */
 public class DrawingManager2 {
     private final EscherDggRecord dgg;
-    private final List<EscherDgRecord> drawingGroups = new ArrayList<EscherDgRecord>();
+    private final List<EscherDgRecord> drawingGroups = new ArrayList<>();
 
 
     public DrawingManager2( EscherDggRecord dgg ) {

Modified: poi/trunk/src/java/org/apache/poi/hssf/model/InternalSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/model/InternalSheet.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/model/InternalSheet.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/model/InternalSheet.java Sat Sep 16 08:27:23 2017
@@ -125,7 +125,7 @@ public final class InternalSheet {
         _mergedCellsTable = new MergedCellsTable();
         RowRecordsAggregate rra = null;
 
-        List<RecordBase> records = new ArrayList<RecordBase>(128);
+        List<RecordBase> records = new ArrayList<>(128);
         _records = records; // needed here due to calls to findFirstRecordLocBySid before we're done
         int dimsloc = -1;
 
@@ -378,7 +378,7 @@ public final class InternalSheet {
      * @return the cloned sheet
      */
     public InternalSheet cloneSheet() {
-        List<Record> clonedRecords = new ArrayList<Record>(_records.size());
+        List<Record> clonedRecords = new ArrayList<>(_records.size());
         for (int i = 0; i < _records.size(); i++) {
             RecordBase rb = _records.get(i);
             if (rb instanceof RecordAggregate) {
@@ -413,7 +413,7 @@ public final class InternalSheet {
     }
     private InternalSheet() {
         _mergedCellsTable = new MergedCellsTable();
-        List<RecordBase> records = new ArrayList<RecordBase>(32);
+        List<RecordBase> records = new ArrayList<>(32);
 
         if (log.check( POILogger.DEBUG ))
             log.log(POILogger.DEBUG, "Sheet createsheet from scratch called");
@@ -1662,7 +1662,7 @@ public final class InternalSheet {
      * @return never <code>null</code>, typically empty array
      */
     public NoteRecord[] getNoteRecords() {
-        List<NoteRecord> temp = new ArrayList<NoteRecord>();
+        List<NoteRecord> temp = new ArrayList<>();
         for(int i=_records.size()-1; i>=0; i--) {
             RecordBase rec = _records.get(i);
             if (rec instanceof NoteRecord) {

Modified: poi/trunk/src/java/org/apache/poi/hssf/model/InternalWorkbook.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/model/InternalWorkbook.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/model/InternalWorkbook.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/model/InternalWorkbook.java Sat Sep 16 08:27:23 2017
@@ -197,15 +197,15 @@ public final class InternalWorkbook {
     private InternalWorkbook() {
     	records     = new WorkbookRecordList();
 
-		boundsheets = new ArrayList<BoundSheetRecord>();
-		formats = new ArrayList<FormatRecord>();
-		hyperlinks = new ArrayList<HyperlinkRecord>();
+		boundsheets = new ArrayList<>();
+		formats = new ArrayList<>();
+		hyperlinks = new ArrayList<>();
 		numxfs = 0;
 		numfonts = 0;
 		maxformatid = -1;
 		uses1904datewindowing = false;
-		escherBSERecords = new ArrayList<EscherBSERecord>();
-		commentRecords = new LinkedHashMap<String, NameCommentRecord>();
+		escherBSERecords = new ArrayList<>();
+		commentRecords = new LinkedHashMap<>();
     }
 
     /**
@@ -223,7 +223,7 @@ public final class InternalWorkbook {
     public static InternalWorkbook createWorkbook(List<Record> recs) {
         LOG.log(DEBUG, "Workbook (readfile) created with reclen=", recs.size());
         InternalWorkbook retval = new InternalWorkbook();
-        List<Record> records = new ArrayList<Record>(recs.size() / 3);
+        List<Record> records = new ArrayList<>(recs.size() / 3);
         retval.records.setRecords(records);
 
         boolean eofPassed = false;
@@ -369,7 +369,7 @@ public final class InternalWorkbook {
         LOG.log( DEBUG, "creating new workbook from scratch" );
 
         InternalWorkbook retval = new InternalWorkbook();
-        List<Record> records = new ArrayList<Record>( 30 );
+        List<Record> records = new ArrayList<>(30);
         retval.records.setRecords(records);
         List<FormatRecord> formats = retval.formats;
 

Modified: poi/trunk/src/java/org/apache/poi/hssf/model/LinkTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/model/LinkTable.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/model/LinkTable.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/model/LinkTable.java Sat Sep 16 08:27:23 2017
@@ -96,7 +96,7 @@ final class LinkTable {
 
 		public ExternalBookBlock(RecordStream rs) {
 			_externalBookRecord = (SupBookRecord) rs.getNext();
-			List<Object> temp = new ArrayList<Object>();
+			List<Object> temp = new ArrayList<>();
 			while(rs.peekNextClass() == ExternalNameRecord.class) {
 			   temp.add(rs.getNext());
 			}
@@ -191,7 +191,7 @@ final class LinkTable {
 		_workbookRecordList = workbookRecordList;
 		RecordStream rs = new RecordStream(inputList, startIndex);
 
-		List<ExternalBookBlock> temp = new ArrayList<ExternalBookBlock>();
+		List<ExternalBookBlock> temp = new ArrayList<>();
 		while(rs.peekNextClass() == SupBookRecord.class) {
 		   temp.add(new ExternalBookBlock(rs));
 		}
@@ -212,7 +212,7 @@ final class LinkTable {
 			_externSheetRecord = null;
 		}
 
-		_definedNames = new ArrayList<NameRecord>();
+		_definedNames = new ArrayList<>();
 		// collect zero or more DEFINEDNAMEs id=0x18,
 		//  with their comments if present
 		while(true) {
@@ -235,7 +235,7 @@ final class LinkTable {
 	}
 
 	private static ExternSheetRecord readExtSheetRecord(RecordStream rs) {
-		List<ExternSheetRecord> temp = new ArrayList<ExternSheetRecord>(2);
+		List<ExternSheetRecord> temp = new ArrayList<>(2);
 		while(rs.peekNextClass() == ExternSheetRecord.class) {
 			temp.add((ExternSheetRecord) rs.getNext());
 		}
@@ -258,7 +258,7 @@ final class LinkTable {
 
 	public LinkTable(int numberOfSheets, WorkbookRecordList workbookRecordList) {
 		_workbookRecordList = workbookRecordList;
-		_definedNames = new ArrayList<NameRecord>();
+		_definedNames = new ArrayList<>();
 		_externalBookBlocks = new ExternalBookBlock[] {
 				new ExternalBookBlock(numberOfSheets),
 		};

Modified: poi/trunk/src/java/org/apache/poi/hssf/model/RowBlocksReader.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/model/RowBlocksReader.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/model/RowBlocksReader.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/model/RowBlocksReader.java Sat Sep 16 08:27:23 2017
@@ -47,12 +47,12 @@ public final class RowBlocksReader {
 	 * @param  rs the record stream
 	 */
 	public RowBlocksReader(RecordStream rs) {
-		List<Record> plainRecords = new ArrayList<Record>();
-		List<Record> shFrmRecords = new ArrayList<Record>();
-		List<CellReference> firstCellRefs = new ArrayList<CellReference>();
-		List<Record> arrayRecords = new ArrayList<Record>();
-		List<Record> tableRecords = new ArrayList<Record>();
-		List<Record> mergeCellRecords = new ArrayList<Record>();
+		List<Record> plainRecords = new ArrayList<>();
+		List<Record> shFrmRecords = new ArrayList<>();
+		List<CellReference> firstCellRefs = new ArrayList<>();
+		List<Record> arrayRecords = new ArrayList<>();
+		List<Record> tableRecords = new ArrayList<>();
+		List<Record> mergeCellRecords = new ArrayList<>();
 
 		Record prevRec = null;
 		while(!RecordOrderer.isEndOfRowBlock(rs.peekNextSid())) {

Modified: poi/trunk/src/java/org/apache/poi/hssf/model/WorkbookRecordList.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/model/WorkbookRecordList.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/model/WorkbookRecordList.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/model/WorkbookRecordList.java Sat Sep 16 08:27:23 2017
@@ -23,7 +23,7 @@ import java.util.List;
 import org.apache.poi.hssf.record.Record;
 
 public final class WorkbookRecordList {
-    private List<Record> records = new ArrayList<Record>();
+    private List<Record> records = new ArrayList<>();
 
     /** holds the position of the protect record */
 	private int protpos;

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/AbstractEscherHolderRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/AbstractEscherHolderRecord.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/AbstractEscherHolderRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/AbstractEscherHolderRecord.java Sat Sep 16 08:27:23 2017
@@ -47,12 +47,12 @@ public abstract class AbstractEscherHold
 
     public AbstractEscherHolderRecord()
     {
-        escherRecords = new ArrayList<EscherRecord>();
+        escherRecords = new ArrayList<>();
     }
 
     public AbstractEscherHolderRecord(RecordInputStream in)
     {
-        escherRecords = new ArrayList<EscherRecord>();
+        escherRecords = new ArrayList<>();
         if (! DESERIALISE ) {
             rawDataContainer.concatenate(in.readRemainder());
         } else {

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/EscherAggregate.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/EscherAggregate.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/EscherAggregate.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/EscherAggregate.java Sat Sep 16 08:27:23 2017
@@ -295,12 +295,12 @@ public final class EscherAggregate exten
     /**
      * Maps shape container objects to their {@link TextObjectRecord} or {@link ObjRecord}
      */
-    private final Map<EscherRecord, Record> shapeToObj = new HashMap<EscherRecord, Record>();
+    private final Map<EscherRecord, Record> shapeToObj = new HashMap<>();
 
     /**
      * list of "tail" records that need to be serialized after all drawing group records
      */
-    private final Map<Integer, NoteRecord> tailRec = new LinkedHashMap<Integer, NoteRecord>();
+    private final Map<Integer, NoteRecord> tailRec = new LinkedHashMap<>();
 
     /**
      * create new EscherAggregate
@@ -376,7 +376,7 @@ public final class EscherAggregate exten
     public static EscherAggregate createAggregate(List<RecordBase> records, int locFirstDrawingRecord) {
         // Keep track of any shape records created so we can match them back to the object id's.
         // Textbox objects are also treated as shape objects.
-        final List<EscherRecord> shapeRecords = new ArrayList<EscherRecord>();
+        final List<EscherRecord> shapeRecords = new ArrayList<>();
         EscherRecordFactory recordFactory = new DefaultEscherRecordFactory() {
             public EscherRecord createRecord(byte[] data, int offset) {
                 EscherRecord r = super.createRecord(data, offset);
@@ -466,8 +466,8 @@ public final class EscherAggregate exten
         byte[] buffer = new byte[size];
 
         // Serialize escher records into one big data structure and keep note of ending offsets.
-        final List <Integer>spEndingOffsets = new ArrayList<Integer>();
-        final List <EscherRecord> shapes = new ArrayList<EscherRecord>();
+        final List <Integer>spEndingOffsets = new ArrayList<>();
+        final List <EscherRecord> shapes = new ArrayList<>();
         int pos = 0;
         for (Object record : records) {
             EscherRecord e = (EscherRecord) record;
@@ -594,7 +594,7 @@ public final class EscherAggregate exten
         List<EscherRecord> records = getEscherRecords();
         int rawEscherSize = getEscherRecordSize(records);
         byte[] buffer = new byte[rawEscherSize];
-        final List<Integer> spEndingOffsets = new ArrayList<Integer>();
+        final List<Integer> spEndingOffsets = new ArrayList<>();
         int pos = 0;
         for (EscherRecord e : records) {
             pos += e.serialize(pos, buffer, new EscherSerializationListener() {

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/ExtSSTRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/ExtSSTRecord.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/ExtSSTRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/ExtSSTRecord.java Sat Sep 16 08:27:23 2017
@@ -93,7 +93,7 @@ public final class ExtSSTRecord extends
         _stringsPerBucket = in.readShort();
 
         int nInfos = in.remaining() / InfoSubRecord.ENCODED_SIZE;
-        ArrayList<InfoSubRecord> lst = new ArrayList<InfoSubRecord>(nInfos);
+        ArrayList<InfoSubRecord> lst = new ArrayList<>(nInfos);
 
         while (in.available() > 0) {
             InfoSubRecord info = new InfoSubRecord(in);

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/ExternSheetRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/ExternSheetRecord.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/ExternSheetRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/ExternSheetRecord.java Sat Sep 16 08:27:23 2017
@@ -87,11 +87,11 @@ public class ExternSheetRecord extends S
 	
 	
 	public ExternSheetRecord() {
-		_list = new ArrayList<RefSubRecord>();
+		_list = new ArrayList<>();
 	}
 
 	public ExternSheetRecord(RecordInputStream in) {
-		_list = new ArrayList<RefSubRecord>();
+		_list = new ArrayList<>();
 		
 		int nItems  = in.readShort();
 		

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/ObjRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/ObjRecord.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/ObjRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/ObjRecord.java Sat Sep 16 08:27:23 2017
@@ -51,7 +51,7 @@ public final class ObjRecord extends Rec
 
 
 	public ObjRecord() {
-		subrecords = new ArrayList<SubRecord>(2);
+		subrecords = new ArrayList<>(2);
 		// TODO - ensure 2 sub-records (ftCmo 15h, and ftEnd 00h) are always created
 		_uninterpretedData = null;
 	}
@@ -84,7 +84,7 @@ public final class ObjRecord extends Rec
 		}
         */
 
-		subrecords = new ArrayList<SubRecord>();
+		subrecords = new ArrayList<>();
 		ByteArrayInputStream bais = new ByteArrayInputStream(subRecordData);
 		LittleEndianInputStream subRecStream = new LittleEndianInputStream(bais);
 		CommonObjectDataSubRecord cmo = (CommonObjectDataSubRecord)SubRecord.createSubRecord(subRecStream, 0);

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/PageBreakRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/PageBreakRecord.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/PageBreakRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/PageBreakRecord.java Sat Sep 16 08:27:23 2017
@@ -77,15 +77,15 @@ public abstract class PageBreakRecord ex
     }
 
     protected PageBreakRecord() {
-        _breaks = new ArrayList<Break>();
-        _breakMap = new HashMap<Integer, Break>();
+        _breaks = new ArrayList<>();
+        _breakMap = new HashMap<>();
     }
 
     public PageBreakRecord(RecordInputStream in)
     {
         int nBreaks = in.readShort();
-        _breaks = new ArrayList<Break>(nBreaks + 2);
-        _breakMap = new HashMap<Integer, Break>();
+        _breaks = new ArrayList<>(nBreaks + 2);
+        _breakMap = new HashMap<>();
 
         for(int k = 0; k < nBreaks; k++) {
             Break br = new Break(in);

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/PaletteRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/PaletteRecord.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/PaletteRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/PaletteRecord.java Sat Sep 16 08:27:23 2017
@@ -39,7 +39,7 @@ public final class PaletteRecord extends
 
     public PaletteRecord() {
       PColor[] defaultPalette = createDefaultPalette();
-      _colors    = new ArrayList<PColor>(defaultPalette.length);
+      _colors    = new ArrayList<>(defaultPalette.length);
       for (PColor element : defaultPalette) {
         _colors.add(element);
       }
@@ -47,7 +47,7 @@ public final class PaletteRecord extends
 
     public PaletteRecord(RecordInputStream in) {
        int field_1_numcolors = in.readShort();
-       _colors    = new ArrayList<PColor>(field_1_numcolors);
+       _colors    = new ArrayList<>(field_1_numcolors);
        for (int k = 0; k < field_1_numcolors; k++) {
            _colors.add(new PColor(in));
        }

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/RecordFactory.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/RecordFactory.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/RecordFactory.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/RecordFactory.java Sat Sep 16 08:27:23 2017
@@ -425,8 +425,8 @@ public final class RecordFactory {
      * most of org.apache.poi.hssf.record.*
      */
     private static Map<Integer, I_RecordCreator> recordsToMap(Class<? extends Record> [] records) {
-        Map<Integer, I_RecordCreator> result = new HashMap<Integer, I_RecordCreator>();
-        Set<Class<?>> uniqueRecClasses = new HashSet<Class<?>>(records.length * 3 / 2);
+        Map<Integer, I_RecordCreator> result = new HashMap<>();
+        Set<Class<?>> uniqueRecClasses = new HashSet<>(records.length * 3 / 2);
 
         for (Class<? extends Record> recClass : records) {
             if(!Record.class.isAssignableFrom(recClass)) {
@@ -486,7 +486,7 @@ public final class RecordFactory {
      */
     public static List<Record> createRecords(InputStream in) throws org.apache.poi.util.RecordFormatException {
 
-        List<Record> records = new ArrayList<Record>(NUM_RECORDS);
+        List<Record> records = new ArrayList<>(NUM_RECORDS);
 
         RecordFactoryInputStream recStream = new RecordFactoryInputStream(in, true);
 

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/RecordFactoryInputStream.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/RecordFactoryInputStream.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/RecordFactoryInputStream.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/RecordFactoryInputStream.java Sat Sep 16 08:27:23 2017
@@ -183,7 +183,7 @@ public final class RecordFactoryInputStr
 	 */
 	public RecordFactoryInputStream(InputStream in, boolean shouldIncludeContinueRecords) {
 		RecordInputStream rs = new RecordInputStream(in);
-		List<Record> records = new ArrayList<Record>();
+		List<Record> records = new ArrayList<>();
 		StreamEncryptionInfo sei = new StreamEncryptionInfo(rs, records);
 		if (sei.hasEncryption()) {
 			rs = sei.createDecryptingStream(in);

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/SSTRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/SSTRecord.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/SSTRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/SSTRecord.java Sat Sep 16 08:27:23 2017
@@ -68,7 +68,7 @@ public final class SSTRecord extends Con
     {
         field_1_num_strings = 0;
         field_2_num_unique_strings = 0;
-        field_3_strings = new IntMapper<UnicodeString>();
+        field_3_strings = new IntMapper<>();
         deserializer = new SSTDeserializer(field_3_strings);
     }
 
@@ -240,7 +240,7 @@ public final class SSTRecord extends Con
         // we initialize our fields
         field_1_num_strings = in.readInt();
         field_2_num_unique_strings = in.readInt();
-        field_3_strings = new IntMapper<UnicodeString>();
+        field_3_strings = new IntMapper<>();
         
         deserializer = new SSTDeserializer(field_3_strings);
         // Bug 57456: some Excel Sheets send 0 as field=1, but have some random number in field_2,

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/CFRecordsAggregate.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/CFRecordsAggregate.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/CFRecordsAggregate.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/CFRecordsAggregate.java Sat Sep 16 08:27:23 2017
@@ -72,7 +72,7 @@ public final class CFRecordsAggregate ex
             throw new RecordFormatException("Mismatch number of rules");
         }
         header = pHeader;
-        rules = new ArrayList<CFRuleBase>(pRules.length);
+        rules = new ArrayList<>(pRules.length);
         for (CFRuleBase pRule : pRules) {
             checkRuleType(pRule);
             rules.add(pRule);
@@ -221,7 +221,7 @@ public final class CFRecordsAggregate ex
     public boolean updateFormulasAfterCellShift(FormulaShifter shifter, int currentExternSheetIx) {
         CellRangeAddress[] cellRanges = header.getCellRanges();
         boolean changed = false;
-        List<CellRangeAddress> temp = new ArrayList<CellRangeAddress>();
+        List<CellRangeAddress> temp = new ArrayList<>();
         for (CellRangeAddress craOld : cellRanges) {
             CellRangeAddress craNew = shiftRange(shifter, craOld, currentExternSheetIx);
             if (craNew == null) {

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/ChartSubstreamRecordAggregate.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/ChartSubstreamRecordAggregate.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/ChartSubstreamRecordAggregate.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/ChartSubstreamRecordAggregate.java Sat Sep 16 08:27:23 2017
@@ -38,7 +38,7 @@ public final class ChartSubstreamRecordA
 
 	public ChartSubstreamRecordAggregate(RecordStream rs) {
 		_bofRec = (BOFRecord) rs.getNext();
-		List<RecordBase> temp = new ArrayList<RecordBase>();
+		List<RecordBase> temp = new ArrayList<>();
 		while (rs.peekNextClass() != EOFRecord.class) {
 			if (PageSettingsBlock.isComponentRecord(rs.peekNextSid())) {
 				if (_psBlock != null) {

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/ColumnInfoRecordsAggregate.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/ColumnInfoRecordsAggregate.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/ColumnInfoRecordsAggregate.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/ColumnInfoRecordsAggregate.java Sat Sep 16 08:27:23 2017
@@ -52,7 +52,7 @@ public final class ColumnInfoRecordsAggr
 	 * Creates an empty aggregate
 	 */
 	public ColumnInfoRecordsAggregate() {
-		records = new ArrayList<ColumnInfoRecord>();
+		records = new ArrayList<>();
 	}
 	public ColumnInfoRecordsAggregate(RecordStream rs) {
 		this();

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/ConditionalFormattingTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/ConditionalFormattingTable.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/ConditionalFormattingTable.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/ConditionalFormattingTable.java Sat Sep 16 08:27:23 2017
@@ -37,12 +37,12 @@ public final class ConditionalFormatting
 	 * Creates an empty ConditionalFormattingTable
 	 */
 	public ConditionalFormattingTable() {
-		_cfHeaders = new ArrayList<CFRecordsAggregate>();
+		_cfHeaders = new ArrayList<>();
 	}
 
 	public ConditionalFormattingTable(RecordStream rs) {
 
-		List<CFRecordsAggregate> temp = new ArrayList<CFRecordsAggregate>();
+		List<CFRecordsAggregate> temp = new ArrayList<>();
 		while (rs.peekNextClass() == CFHeaderRecord.class ||
 		       rs.peekNextClass() == CFHeader12Record.class) {
 			temp.add(CFRecordsAggregate.createCFAggregate(rs));

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/CustomViewSettingsRecordAggregate.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/CustomViewSettingsRecordAggregate.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/CustomViewSettingsRecordAggregate.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/CustomViewSettingsRecordAggregate.java Sat Sep 16 08:27:23 2017
@@ -42,7 +42,7 @@ public final class CustomViewSettingsRec
 		if (_begin.getSid() != UserSViewBegin.sid) {
 			throw new IllegalStateException("Bad begin record");
 		}
-		List<RecordBase> temp = new ArrayList<RecordBase>();
+		List<RecordBase> temp = new ArrayList<>();
 		while (rs.peekNextSid() != UserSViewEnd.sid) {
 			if (PageSettingsBlock.isComponentRecord(rs.peekNextSid())) {
                 if (_psBlock != null) {

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/DataValidityTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/DataValidityTable.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/DataValidityTable.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/DataValidityTable.java Sat Sep 16 08:27:23 2017
@@ -39,7 +39,7 @@ public final class DataValidityTable ext
 
 	public DataValidityTable(RecordStream rs) {
 		_headerRec = (DVALRecord) rs.getNext();
-		List<DVRecord> temp = new ArrayList<DVRecord>();
+		List<DVRecord> temp = new ArrayList<>();
 		while (rs.peekNextClass() == DVRecord.class) {
 			temp.add((DVRecord) rs.getNext());
 		}
@@ -48,7 +48,7 @@ public final class DataValidityTable ext
 
 	public DataValidityTable() {
 		_headerRec = new DVALRecord();
-		_validationList = new ArrayList<DVRecord>();
+		_validationList = new ArrayList<>();
 	}
 
 	public void visitContainedRecords(RecordVisitor rv) {

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/MergedCellsTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/MergedCellsTable.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/MergedCellsTable.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/MergedCellsTable.java Sat Sep 16 08:27:23 2017
@@ -38,7 +38,7 @@ public final class MergedCellsTable exte
 	 * Creates an empty aggregate
 	 */
 	public MergedCellsTable() {
-		_mergedRegions = new ArrayList<CellRangeAddress>();
+		_mergedRegions = new ArrayList<>();
 	}
 
 	/**

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/PageSettingsBlock.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/PageSettingsBlock.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/PageSettingsBlock.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/PageSettingsBlock.java Sat Sep 16 08:27:23 2017
@@ -52,7 +52,7 @@ public final class PageSettingsBlock ext
         public PLSAggregate(RecordStream rs) {
             _pls = rs.getNext();
             if (rs.peekNextSid()==ContinueRecord.sid) {
-                List<ContinueRecord> temp = new ArrayList<ContinueRecord>();
+                List<ContinueRecord> temp = new ArrayList<>();
                 while (rs.peekNextSid()==ContinueRecord.sid) {
                     temp.add((ContinueRecord)rs.getNext());
                 }
@@ -93,11 +93,11 @@ public final class PageSettingsBlock ext
      * The indicator of such records is a non-zero GUID,
      *  see {@link  org.apache.poi.hssf.record.HeaderFooterRecord#getGuid()}
      */
-    private final List<HeaderFooterRecord> _sviewHeaderFooters = new ArrayList<HeaderFooterRecord>();
+    private final List<HeaderFooterRecord> _sviewHeaderFooters = new ArrayList<>();
     private Record _printSize;
 
     public PageSettingsBlock(RecordStream rs) {
-        _plsRecords = new ArrayList<PLSAggregate>();
+        _plsRecords = new ArrayList<>();
         while(true) {
             if (!readARecord(rs)) {
                 break;
@@ -109,7 +109,7 @@ public final class PageSettingsBlock ext
      * Creates a PageSettingsBlock with default settings
      */
     public PageSettingsBlock() {
-        _plsRecords = new ArrayList<PLSAggregate>();
+        _plsRecords = new ArrayList<>();
         _rowBreaksRecord = new HorizontalPageBreakRecord();
         _columnBreaksRecord = new VerticalPageBreakRecord();
         _header = new HeaderRecord("");
@@ -482,7 +482,7 @@ public final class PageSettingsBlock ext
     private static void shiftBreaks(PageBreakRecord breaks, int start, int stop, int count) {
 
         Iterator<PageBreakRecord.Break> iterator = breaks.getBreaksIterator();
-        List<PageBreakRecord.Break> shiftedBreak = new ArrayList<PageBreakRecord.Break>();
+        List<PageBreakRecord.Break> shiftedBreak = new ArrayList<>();
         while(iterator.hasNext())
         {
             PageBreakRecord.Break breakItem = iterator.next();
@@ -672,9 +672,9 @@ public final class PageSettingsBlock ext
     public void positionRecords(List<RecordBase> sheetRecords) {
         // Take a copy to loop over, so we can update the real one
         //  without concurrency issues
-        List<HeaderFooterRecord> hfRecordsToIterate = new ArrayList<HeaderFooterRecord>(_sviewHeaderFooters);
+        List<HeaderFooterRecord> hfRecordsToIterate = new ArrayList<>(_sviewHeaderFooters);
 
-        final Map<String, HeaderFooterRecord> hfGuidMap = new HashMap<String, HeaderFooterRecord>();
+        final Map<String, HeaderFooterRecord> hfGuidMap = new HashMap<>();
 
         for(final HeaderFooterRecord hf : hfRecordsToIterate) {
             hfGuidMap.put(HexDump.toHex(hf.getGuid()), hf);

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/RowRecordsAggregate.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/RowRecordsAggregate.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/RowRecordsAggregate.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/RowRecordsAggregate.java Sat Sep 16 08:27:23 2017
@@ -53,9 +53,9 @@ public final class RowRecordsAggregate e
         if (svm == null) {
             throw new IllegalArgumentException("SharedValueManager must be provided.");
         }
-        _rowRecords = new TreeMap<Integer, RowRecord>();
+        _rowRecords = new TreeMap<>();
         _valuesAgg = new ValueRecordsAggregate();
-        _unknownRecords = new ArrayList<Record>();
+        _unknownRecords = new ArrayList<>();
         _sharedValueManager = svm;
     }
 

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/SharedValueManager.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/SharedValueManager.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/SharedValueManager.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/SharedValueManager.java Sat Sep 16 08:27:23 2017
@@ -122,7 +122,7 @@ public final class SharedValueManager {
 		}
 		_arrayRecords = toList(arrayRecords);
 		_tableRecords = tableRecords;
-		Map<SharedFormulaRecord, SharedFormulaGroup> m = new HashMap<SharedFormulaRecord, SharedFormulaGroup>(nShF * 3 / 2);
+		Map<SharedFormulaRecord, SharedFormulaGroup> m = new HashMap<>(nShF * 3 / 2);
 		for (int i = 0; i < nShF; i++) {
 			SharedFormulaRecord sfr = sharedFormulaRecords[i];
 			m.put(sfr, new SharedFormulaGroup(sfr, firstCells[i]));
@@ -134,7 +134,7 @@ public final class SharedValueManager {
 	 * @return a modifiable list, independent of the supplied array
 	 */
 	private static <Z> List<Z> toList(Z[] zz) {
-		List<Z> result = new ArrayList<Z>(zz.length);
+		List<Z> result = new ArrayList<>(zz.length);
 		for (int i = 0; i < zz.length; i++) {
 			result.add(zz[i]);
 		}
@@ -167,7 +167,7 @@ public final class SharedValueManager {
 
     private SharedFormulaGroup findFormulaGroupForCell(final CellReference cellRef) {
         if(null == _groupsCache) {
-            _groupsCache = new HashMap<Integer,SharedFormulaGroup>(_groupsBySharedFormulaRecord.size());
+            _groupsCache = new HashMap<>(_groupsBySharedFormulaRecord.size());
             for(SharedFormulaGroup group: _groupsBySharedFormulaRecord.values()) {
                 _groupsCache.put(getKeyForCache(group._firstCell),group);
             }

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/common/UnicodeString.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/common/UnicodeString.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/common/UnicodeString.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/common/UnicodeString.java Sat Sep 16 08:27:23 2017
@@ -464,7 +464,7 @@ public class UnicodeString implements Co
         field_3_string = (isCompressed) ? in.readCompressedUnicode(cc) : in.readUnicodeLEString(cc);
 
         if (isRichText() && (runCount > 0)) {
-          field_4_format_runs = new ArrayList<FormatRun>(runCount);
+          field_4_format_runs = new ArrayList<>(runCount);
           for (int i=0;i<runCount;i++) {
             field_4_format_runs.add(new FormatRun(in));
           }
@@ -610,7 +610,7 @@ public class UnicodeString implements Co
      */
     public void addFormatRun(FormatRun r) {
       if (field_4_format_runs == null) {
-		field_4_format_runs = new ArrayList<FormatRun>();
+		field_4_format_runs = new ArrayList<>();
 	  }
 
       int index = findFormatRunAt(r._character);
@@ -812,7 +812,7 @@ public class UnicodeString implements Co
         str.field_2_optionflags = field_2_optionflags;
         str.field_3_string = field_3_string;
         if (field_4_format_runs != null) {
-          str.field_4_format_runs = new ArrayList<FormatRun>();
+          str.field_4_format_runs = new ArrayList<>();
           for (FormatRun r : field_4_format_runs) {
             str.field_4_format_runs.add(new FormatRun(r._character, r._fontIndex));
           }

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/crypto/Biff8EncryptionKey.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/crypto/Biff8EncryptionKey.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/crypto/Biff8EncryptionKey.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/crypto/Biff8EncryptionKey.java Sat Sep 16 08:27:23 2017
@@ -24,7 +24,7 @@ public final class Biff8EncryptionKey {
 	 * using a {@link ThreadLocal} in order to avoid further overloading the various public APIs
 	 * (e.g. {@link HSSFWorkbook}) that need this functionality.
 	 */
-	private static final ThreadLocal<String> _userPasswordTLS = new ThreadLocal<String>();
+	private static final ThreadLocal<String> _userPasswordTLS = new ThreadLocal<>();
 
 	/**
 	 * Sets the BIFF8 encryption/decryption password for the current thread.

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/FontDetails.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/FontDetails.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/FontDetails.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/FontDetails.java Sat Sep 16 08:27:23 2017
@@ -29,7 +29,7 @@ public class FontDetails
 {
     private String _fontName;
     private int _height;
-    private final Map<Character, Integer> charWidths = new HashMap<Character, Integer>();
+    private final Map<Character, Integer> charWidths = new HashMap<>();
 
     /**
      * Construct the font details with the given name and height.

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java Sat Sep 16 08:27:23 2017
@@ -116,8 +116,8 @@ public final class HSSFCellStyle impleme
             return Short.MIN_VALUE;
         }
     };
-    private static final ThreadLocal<List<FormatRecord>> lastFormats = new ThreadLocal<List<FormatRecord>>();
-    private static final ThreadLocal<String> getDataFormatStringCache = new ThreadLocal<String>();
+    private static final ThreadLocal<List<FormatRecord>> lastFormats = new ThreadLocal<>();
+    private static final ThreadLocal<String> getDataFormatStringCache = new ThreadLocal<>();
 
     /**
      * Get the contents of the format string, by looking up

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFDataFormat.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFDataFormat.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFDataFormat.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFDataFormat.java Sat Sep 16 08:27:23 2017
@@ -42,7 +42,7 @@ import org.apache.poi.ss.usermodel.DataF
 public final class HSSFDataFormat implements DataFormat {
 	private static final String[] _builtinFormats = BuiltinFormats.getAll();
 
-	private final Vector<String> _formats = new Vector<String>();
+	private final Vector<String> _formats = new Vector<>();
 	private final InternalWorkbook _workbook;
 	private boolean _movedBuiltins;  // Flag to see if need to
 	// check the built in list

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFOptimiser.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFOptimiser.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFOptimiser.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFOptimiser.java Sat Sep 16 08:27:23 2017
@@ -137,7 +137,7 @@ public class HSSFOptimiser {
 		//  the new locations of the fonts
 		// Remember that one underlying unicode string
 		//  may be shared by multiple RichTextStrings!
-		HashSet<UnicodeString> doneUnicodeStrings = new HashSet<UnicodeString>();
+		HashSet<UnicodeString> doneUnicodeStrings = new HashSet<>();
 		for(int sheetNum=0; sheetNum<workbook.getNumberOfSheets(); sheetNum++) {
 			HSSFSheet s = workbook.getSheetAt(sheetNum);
 			for (Row row : s) {

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFPatriarch.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFPatriarch.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFPatriarch.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFPatriarch.java Sat Sep 16 08:27:23 2017
@@ -60,7 +60,7 @@ import org.apache.poi.util.StringUtil;
  */
 public final class HSSFPatriarch implements HSSFShapeContainer, Drawing<HSSFShape> {
     // private static POILogger log = POILogFactory.getLogger(HSSFPatriarch.class);
-    private final List<HSSFShape> _shapes = new ArrayList<HSSFShape>();
+    private final List<HSSFShape> _shapes = new ArrayList<>();
 
     private final EscherSpgrRecord _spgrRecord;
     private final EscherContainerRecord _mainSpgrContainer;
@@ -122,7 +122,7 @@ public final class HSSFPatriarch impleme
         /**
          * contains coordinates of comments we iterate over
          */
-        Set<String> coordinates = new HashSet<String>(tailRecords.size());
+        Set<String> coordinates = new HashSet<>(tailRecords.size());
         for(NoteRecord rec : tailRecords.values()){
             String noteRef = new CellReference(rec.getRow(),
                     rec.getColumn()).formatAsString(); // A1-style notation
@@ -416,7 +416,7 @@ public final class HSSFPatriarch impleme
      */
     @Override
     public void clear() {
-        ArrayList <HSSFShape> copy = new ArrayList<HSSFShape>(_shapes);
+        ArrayList <HSSFShape> copy = new ArrayList<>(_shapes);
         for (HSSFShape shape: copy){
             removeShape(shape);
         }

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFShapeGroup.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFShapeGroup.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFShapeGroup.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFShapeGroup.java Sat Sep 16 08:27:23 2017
@@ -30,7 +30,7 @@ import java.util.Iterator;
  * sheet.
  */
 public class HSSFShapeGroup extends HSSFShape implements HSSFShapeContainer {
-    private final List<HSSFShape> shapes = new ArrayList<HSSFShape>();
+    private final List<HSSFShape> shapes = new ArrayList<>();
     private EscherSpgrRecord _spgrRecord;
 
     public HSSFShapeGroup(EscherContainerRecord spgrContainer, ObjRecord objRecord) {
@@ -268,7 +268,7 @@ public class HSSFShapeGroup extends HSSF
     }
 
     public void clear() {
-        ArrayList <HSSFShape> copy = new ArrayList<HSSFShape>(shapes);
+        ArrayList <HSSFShape> copy = new ArrayList<>(shapes);
         for (HSSFShape shape: copy){
             removeShape(shape);
         }

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java Sat Sep 16 08:27:23 2017
@@ -124,7 +124,7 @@ public final class HSSFSheet implements
      */
     protected HSSFSheet(HSSFWorkbook workbook) {
         _sheet = InternalSheet.createSheet();
-        _rows = new TreeMap<Integer, HSSFRow>();
+        _rows = new TreeMap<>();
         this._workbook = workbook;
         this._book = workbook.getWorkbook();
     }
@@ -139,7 +139,7 @@ public final class HSSFSheet implements
      */
     protected HSSFSheet(HSSFWorkbook workbook, InternalSheet sheet) {
         this._sheet = sheet;
-        _rows = new TreeMap<Integer, HSSFRow>();
+        _rows = new TreeMap<>();
         this._workbook = workbook;
         this._book = workbook.getWorkbook();
         setPropertiesFromSheet(sheet);
@@ -424,7 +424,7 @@ public final class HSSFSheet implements
     @Override
     public List<HSSFDataValidation> getDataValidations() {
         DataValidityTable dvt = _sheet.getOrCreateDataValidityTable();
-        final List<HSSFDataValidation> hssfValidations = new ArrayList<HSSFDataValidation>();
+        final List<HSSFDataValidation> hssfValidations = new ArrayList<>();
         RecordVisitor visitor = new RecordVisitor() {
             private HSSFEvaluationWorkbook book = HSSFEvaluationWorkbook.create(getWorkbook());
 
@@ -908,7 +908,7 @@ public final class HSSFSheet implements
      */
     @Override
     public void removeMergedRegions(Collection<Integer> indices) {
-        for (int i : (new TreeSet<Integer>(indices)).descendingSet()) {
+        for (int i : (new TreeSet<>(indices)).descendingSet()) {
             _sheet.removeMergedRegion(i);
         }
     }
@@ -936,7 +936,7 @@ public final class HSSFSheet implements
      */
     @Override
     public List<CellRangeAddress> getMergedRegions() {
-        List<CellRangeAddress> addresses = new ArrayList<CellRangeAddress>();
+        List<CellRangeAddress> addresses = new ArrayList<>();
         int count = _sheet.getNumMergedRegions();
         for (int i=0; i < count; i++) {
             addresses.add(_sheet.getMergedRegionAt(i));
@@ -2223,7 +2223,7 @@ public final class HSSFSheet implements
      */
     @Override
     public List<HSSFHyperlink> getHyperlinkList() {
-        final List<HSSFHyperlink> hyperlinkList = new ArrayList<HSSFHyperlink>();
+        final List<HSSFHyperlink> hyperlinkList = new ArrayList<>();
         for (RecordBase rec : _sheet.getRecords()) {
             if (rec instanceof HyperlinkRecord) {
                 HyperlinkRecord link = (HyperlinkRecord) rec;
@@ -2290,7 +2290,7 @@ public final class HSSFSheet implements
         int lastColumn = range.getLastColumn();
         int height = lastRow - firstRow + 1;
         int width = lastColumn - firstColumn + 1;
-        List<HSSFCell> temp = new ArrayList<HSSFCell>(height * width);
+        List<HSSFCell> temp = new ArrayList<>(height * width);
         for (int rowIn = firstRow; rowIn <= lastRow; rowIn++) {
             for (int colIn = firstColumn; colIn <= lastColumn; colIn++) {
                 HSSFRow row = getRow(rowIn);
@@ -2432,7 +2432,7 @@ public final class HSSFSheet implements
             patriarch = createDrawingPatriarch();
         }
         
-        Map<CellAddress, HSSFComment> locations = new TreeMap<CellAddress, HSSFComment>();
+        Map<CellAddress, HSSFComment> locations = new TreeMap<>();
         findCellCommentLocations(patriarch, locations);
         return locations;
     }
@@ -2530,7 +2530,7 @@ public final class HSSFSheet implements
                     NameRecord.BUILTIN_PRINT_TITLE, sheetIndex);
         }
 
-        List<Ptg> ptgList = new ArrayList<Ptg>();
+        List<Ptg> ptgList = new ArrayList<>();
         if (setBoth) {
             final int exprsSize = 2 * 11 + 1; // 2 * Area3DPtg.SIZE + UnionPtg.SIZE
             ptgList.add(new MemFuncPtg(exprsSize));

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java Sat Sep 16 08:27:23 2017
@@ -217,8 +217,8 @@ public final class HSSFWorkbook extends
     private HSSFWorkbook(InternalWorkbook book) {
         super((DirectoryNode)null);
         workbook = book;
-        _sheets = new ArrayList<HSSFSheet>(INITIAL_CAPACITY);
-        names = new ArrayList<HSSFName>(INITIAL_CAPACITY);
+        _sheets = new ArrayList<>(INITIAL_CAPACITY);
+        names = new ArrayList<>(INITIAL_CAPACITY);
     }
 
     /**
@@ -345,8 +345,8 @@ public final class HSSFWorkbook extends
             clearDirectory();
         }
 
-        _sheets = new ArrayList<HSSFSheet>(INITIAL_CAPACITY);
-        names  = new ArrayList<HSSFName>(INITIAL_CAPACITY);
+        _sheets = new ArrayList<>(INITIAL_CAPACITY);
+        names  = new ArrayList<>(INITIAL_CAPACITY);
 
         // Grab the data from the workbook stream, however
         //  it happens to be spelled.
@@ -606,7 +606,7 @@ public final class HSSFWorkbook extends
      * @param indexes Array of sheets to select, the index is 0-based.
      */
     public void setSelectedTabs(int[] indexes) {
-        Collection<Integer> list = new ArrayList<Integer>(indexes.length);
+        Collection<Integer> list = new ArrayList<>(indexes.length);
         for (int index : indexes) {
             list.add(index);
         }
@@ -626,7 +626,7 @@ public final class HSSFWorkbook extends
             validateSheetIndex(index);
         }
         // ignore duplicates
-        Set<Integer> set = new HashSet<Integer>(indexes);
+        Set<Integer> set = new HashSet<>(indexes);
         int nSheets = _sheets.size();
         for (int i=0; i<nSheets; i++) {
             boolean bSelect = set.contains(i);
@@ -643,7 +643,7 @@ public final class HSSFWorkbook extends
      * @return indices of selected sheets
      */
     public Collection<Integer> getSelectedTabs() {
-        Collection<Integer> indexes = new ArrayList<Integer>();
+        Collection<Integer> indexes = new ArrayList<>();
         int nSheets = _sheets.size();
         for (int i=0; i<nSheets; i++) {
             HSSFSheet sheet = getSheetAt(i);
@@ -946,7 +946,7 @@ public final class HSSFWorkbook extends
      */
     @Override
     public Iterator<Sheet> sheetIterator() {
-        return new SheetIterator<Sheet>();
+        return new SheetIterator<>();
     }
 
     /**
@@ -1235,7 +1235,7 @@ public final class HSSFWorkbook extends
     @Override
     public HSSFFont getFontAt(short idx) {
         if(fonts == null) {
-            fonts = new HashMap<Short, HSSFFont>();
+            fonts = new HashMap<>();
         }
 
         // So we don't confuse users, give them back
@@ -1260,7 +1260,7 @@ public final class HSSFWorkbook extends
      *  and that's not something you should normally do
      */
     protected void resetFontCache() {
-        fonts = new HashMap<Short, HSSFFont>();
+        fonts = new HashMap<>();
     }
 
     /**
@@ -1401,7 +1401,7 @@ public final class HSSFWorkbook extends
     private void write(NPOIFSFileSystem fs) throws IOException {
         // For tracking what we've written out, used if we're
         //  going to be preserving nodes
-        List<String> excepts = new ArrayList<String>(1);
+        List<String> excepts = new ArrayList<>(1);
 
         // Write out the Workbook stream
         fs.createDocument(new ByteArrayInputStream(getBytes()), "Workbook");
@@ -1445,7 +1445,7 @@ public final class HSSFWorkbook extends
 
         public SheetRecordCollector() {
             _totalSize = 0;
-            _list = new ArrayList<Record>(128);
+            _list = new ArrayList<>(128);
         }
         public int getTotalSize() {
             return _totalSize;
@@ -1597,7 +1597,7 @@ public final class HSSFWorkbook extends
 
     @Override
     public List<HSSFName> getNames(String name) {
-        List<HSSFName> nameList = new ArrayList<HSSFName>();
+        List<HSSFName> nameList = new ArrayList<>();
         for(HSSFName nr : names) {
             if(nr.getNameName().equals(name)) {
                 nameList.add(nr);
@@ -1970,7 +1970,7 @@ public final class HSSFWorkbook extends
     public List<HSSFPictureData> getAllPictures()
     {
         // The drawing group record always exists at the top level, so we won't need to do this recursively.
-        List<HSSFPictureData> pictures = new ArrayList<HSSFPictureData>();
+        List<HSSFPictureData> pictures = new ArrayList<>();
         for (Record r : workbook.getRecords()) {
             if (r instanceof AbstractEscherHolderRecord) {
                 ((AbstractEscherHolderRecord) r).decode();
@@ -2011,7 +2011,7 @@ public final class HSSFWorkbook extends
     }
 
     protected static Map<String,ClassID> getOleMap() {
-    	Map<String,ClassID> olemap = new HashMap<String,ClassID>();
+    	Map<String,ClassID> olemap = new HashMap<>();
     	olemap.put("PowerPoint Document", ClassID.PPT_SHOW);
     	for (String str : WORKBOOK_DIR_ENTRY_NAMES) {
     		olemap.put(str, ClassID.XLS_WORKBOOK);
@@ -2123,7 +2123,7 @@ public final class HSSFWorkbook extends
      */
     public List<HSSFObjectData> getAllEmbeddedObjects()
     {
-        List<HSSFObjectData> objects = new ArrayList<HSSFObjectData>();
+        List<HSSFObjectData> objects = new ArrayList<>();
         for (HSSFSheet sheet : _sheets)
         {
             getAllEmbeddedObjects(sheet, objects);

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/StaticFontMetrics.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/StaticFontMetrics.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/StaticFontMetrics.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/StaticFontMetrics.java Sat Sep 16 08:27:23 2017
@@ -41,7 +41,7 @@ final class StaticFontMetrics {
 	/** The font metrics property file we're using */
 	private static Properties fontMetricsProps;
 	/** Our cache of font details we've already looked up */
-	private static final Map<String, FontDetails> fontDetailsMap = new HashMap<String, FontDetails>();
+	private static final Map<String, FontDetails> fontDetailsMap = new HashMap<>();
 
 	private StaticFontMetrics() {}
 	

Modified: poi/trunk/src/java/org/apache/poi/hssf/util/HSSFColor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/util/HSSFColor.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/util/HSSFColor.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/util/HSSFColor.java Sat Sep 16 08:27:23 2017
@@ -187,7 +187,7 @@ public class HSSFColor implements Color
 
     private static Map<Integer,HSSFColor> createColorsByIndexMap() {
         Map<HSSFColorPredefined,HSSFColor> eList = mapEnumToColorClass();
-        Map<Integer,HSSFColor> result = new HashMap<Integer,HSSFColor>(eList.size() * 3 / 2);
+        Map<Integer,HSSFColor> result = new HashMap<>(eList.size() * 3 / 2);
 
         for (Map.Entry<HSSFColorPredefined,HSSFColor> colorRef : eList.entrySet()) {
             Integer index1 = (int)colorRef.getKey().getIndex();
@@ -218,7 +218,7 @@ public class HSSFColor implements Color
 
     private static Map<String,HSSFColor> createColorsByHexStringMap() {
         Map<HSSFColorPredefined,HSSFColor> eList = mapEnumToColorClass();
-        Map<String,HSSFColor> result = new HashMap<String,HSSFColor>(eList.size());
+        Map<String,HSSFColor> result = new HashMap<>(eList.size());
 
         for (Map.Entry<HSSFColorPredefined,HSSFColor> colorRef : eList.entrySet()) {
             String hexString = colorRef.getKey().getHexString();
@@ -239,7 +239,7 @@ public class HSSFColor implements Color
     @Removal(version="3.18")
     private static synchronized Map<HSSFColorPredefined,HSSFColor> mapEnumToColorClass() {
         if (enumList == null) {
-            enumList = new EnumMap<HSSFColorPredefined,HSSFColor>(HSSFColorPredefined.class);
+            enumList = new EnumMap<>(HSSFColorPredefined.class);
             // AUTOMATIC is not add to list
             addHSSFColorPredefined(HSSFColorPredefined.BLACK);
             addHSSFColorPredefined(HSSFColorPredefined.BROWN);

Modified: poi/trunk/src/java/org/apache/poi/hssf/util/LazilyConcatenatedByteArray.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/util/LazilyConcatenatedByteArray.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/util/LazilyConcatenatedByteArray.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/util/LazilyConcatenatedByteArray.java Sat Sep 16 08:27:23 2017
@@ -26,7 +26,7 @@ import java.util.List;
  * a large amount of time.
  */
 public class LazilyConcatenatedByteArray {
-    private final List<byte[]> arrays = new ArrayList<byte[]>(1);
+    private final List<byte[]> arrays = new ArrayList<>(1);
 
     /**
      * Clears the array (sets the concatenated length back to zero.

Modified: poi/trunk/src/java/org/apache/poi/poifs/crypt/cryptoapi/CryptoAPIEncryptor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/poifs/crypt/cryptoapi/CryptoAPIEncryptor.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/poifs/crypt/cryptoapi/CryptoAPIEncryptor.java (original)
+++ poi/trunk/src/java/org/apache/poi/poifs/crypt/cryptoapi/CryptoAPIEncryptor.java Sat Sep 16 08:27:23 2017
@@ -128,7 +128,7 @@ public class CryptoAPIEncryptor extends
         byte buf[] = new byte[8];
         
         bos.write(buf, 0, 8); // skip header
-        List<StreamDescriptorEntry> descList = new ArrayList<StreamDescriptorEntry>();
+        List<StreamDescriptorEntry> descList = new ArrayList<>();
 
         int block = 0;
         for (Entry entry : entries.getRoot()) {

Modified: poi/trunk/src/java/org/apache/poi/poifs/dev/POIFSViewEngine.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/poifs/dev/POIFSViewEngine.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/poifs/dev/POIFSViewEngine.java (original)
+++ poi/trunk/src/java/org/apache/poi/poifs/dev/POIFSViewEngine.java Sat Sep 16 08:27:23 2017
@@ -55,7 +55,7 @@ public class POIFSViewEngine
                                        final int indentLevel,
                                        final String indentString)
     {
-        List<String> objects = new ArrayList<String>();
+        List<String> objects = new ArrayList<>();
 
         if (viewable instanceof POIFSViewable)
         {

Modified: poi/trunk/src/java/org/apache/poi/poifs/eventfilesystem/POIFSReaderRegistry.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/poifs/eventfilesystem/POIFSReaderRegistry.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/poifs/eventfilesystem/POIFSReaderRegistry.java (original)
+++ poi/trunk/src/java/org/apache/poi/poifs/eventfilesystem/POIFSReaderRegistry.java Sat Sep 16 08:27:23 2017
@@ -57,9 +57,9 @@ class POIFSReaderRegistry
 
     POIFSReaderRegistry()
     {
-        omnivorousListeners       = new HashSet<POIFSReaderListener>();
-        selectiveListeners        = new HashMap<POIFSReaderListener, Set<DocumentDescriptor>>();
-        chosenDocumentDescriptors = new HashMap<DocumentDescriptor,Set<POIFSReaderListener>>();
+        omnivorousListeners       = new HashSet<>();
+        selectiveListeners        = new HashMap<>();
+        chosenDocumentDescriptors = new HashMap<>();
     }
 
     /**
@@ -85,7 +85,7 @@ class POIFSReaderRegistry
             {
 
                 // this listener has not registered before
-                descriptors = new HashSet<DocumentDescriptor>();
+                descriptors = new HashSet<>();
                 selectiveListeners.put(listener, descriptors);
             }
             DocumentDescriptor descriptor = new DocumentDescriptor(path,
@@ -104,7 +104,7 @@ class POIFSReaderRegistry
                 {
 
                     // nobody was listening for this document before
-                    listeners = new HashSet<POIFSReaderListener>();
+                    listeners = new HashSet<>();
                     chosenDocumentDescriptors.put(descriptor, listeners);
                 }
                 listeners.add(listener);
@@ -143,7 +143,7 @@ class POIFSReaderRegistry
 
     Iterator<POIFSReaderListener> getListeners(final POIFSDocumentPath path, final String name)
     {
-        Set<POIFSReaderListener> rval = new HashSet<POIFSReaderListener>(omnivorousListeners);
+        Set<POIFSReaderListener> rval = new HashSet<>(omnivorousListeners);
         Set<POIFSReaderListener> selectiveListenersInner =
             chosenDocumentDescriptors.get(new DocumentDescriptor(path, name));
 

Modified: poi/trunk/src/java/org/apache/poi/poifs/filesystem/DirectoryNode.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/poifs/filesystem/DirectoryNode.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/poifs/filesystem/DirectoryNode.java (original)
+++ poi/trunk/src/java/org/apache/poi/poifs/filesystem/DirectoryNode.java Sat Sep 16 08:27:23 2017
@@ -107,8 +107,8 @@ public class DirectoryNode
                 property.getName()
             });
         }
-        _byname     = new HashMap<String, Entry>();
-        _entries    = new ArrayList<Entry>();
+        _byname     = new HashMap<>();
+        _entries    = new ArrayList<>();
         Iterator<Property> iter = property.getChildren();
 
         while (iter.hasNext())
@@ -588,7 +588,7 @@ public class DirectoryNode
      */
     public Iterator<Object> getViewableIterator()
     {
-        List<Object> components = new ArrayList<Object>();
+        List<Object> components = new ArrayList<>();
 
         components.add(getProperty());
         Iterator<Entry> iter = _entries.iterator();

Modified: poi/trunk/src/java/org/apache/poi/poifs/filesystem/DocumentNode.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/poifs/filesystem/DocumentNode.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/poifs/filesystem/DocumentNode.java (original)
+++ poi/trunk/src/java/org/apache/poi/poifs/filesystem/DocumentNode.java Sat Sep 16 08:27:23 2017
@@ -131,7 +131,7 @@ public class DocumentNode
 
     public Iterator<Object> getViewableIterator()
     {
-        List<Object> components = new ArrayList<Object>();
+        List<Object> components = new ArrayList<>();
 
         components.add(getProperty());
         if (_document != null) {

Modified: poi/trunk/src/java/org/apache/poi/poifs/filesystem/EntryUtils.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/poifs/filesystem/EntryUtils.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/poifs/filesystem/EntryUtils.java (original)
+++ poi/trunk/src/java/org/apache/poi/poifs/filesystem/EntryUtils.java Sat Sep 16 08:27:23 2017
@@ -153,7 +153,7 @@ public class EntryUtils
        }
        
        // Next, check entries and their types/sizes
-       Map<String,Integer> aSizes = new HashMap<String, Integer>();
+       Map<String,Integer> aSizes = new HashMap<>();
        final int isDirectory = -12345; 
        for (Entry a : dirA) {
           String aName = a.getName();

Modified: poi/trunk/src/java/org/apache/poi/poifs/filesystem/FilteringDirectoryNode.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/poifs/filesystem/FilteringDirectoryNode.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/poifs/filesystem/FilteringDirectoryNode.java (original)
+++ poi/trunk/src/java/org/apache/poi/poifs/filesystem/FilteringDirectoryNode.java Sat Sep 16 08:27:23 2017
@@ -64,8 +64,8 @@ public class FilteringDirectoryNode impl
       this.directory = directory;
       
       // Process the excludes
-      this.excludes = new HashSet<String>();
-      this.childExcludes = new HashMap<String, List<String>>();
+      this.excludes = new HashSet<>();
+      this.childExcludes = new HashMap<>();
       for (String excl : excludes) {
          int splitAt = excl.indexOf('/');
          if (splitAt == -1) {
@@ -76,7 +76,7 @@ public class FilteringDirectoryNode impl
             String child = excl.substring(0, splitAt);
             String childExcl = excl.substring(splitAt+1);
             if (! this.childExcludes.containsKey(child)) {
-               this.childExcludes.put(child, new ArrayList<String>());
+               this.childExcludes.put(child, new ArrayList<>());
             }
             this.childExcludes.get(child).add(childExcl);
          }
@@ -116,7 +116,7 @@ public class FilteringDirectoryNode impl
    }
    
    public Set<String> getEntryNames() {
-       Set<String> names = new HashSet<String>();
+       Set<String> names = new HashSet<>();
        for (String name : directory.getEntryNames()) {
            if (!excludes.contains(name)) {
                names.add(name);

Modified: poi/trunk/src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java (original)
+++ poi/trunk/src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java Sat Sep 16 08:27:23 2017
@@ -97,9 +97,9 @@ public class NPOIFSFileSystem extends Bl
     {
         _header         = new HeaderBlock(bigBlockSize);
         _property_table = new NPropertyTable(_header);
-        _mini_store     = new NPOIFSMiniStore(this, _property_table.getRoot(), new ArrayList<BATBlock>(), _header);
-        _xbat_blocks    = new ArrayList<BATBlock>();
-        _bat_blocks     = new ArrayList<BATBlock>();
+        _mini_store     = new NPOIFSMiniStore(this, _property_table.getRoot(), new ArrayList<>(), _header);
+        _xbat_blocks    = new ArrayList<>();
+        _bat_blocks     = new ArrayList<>();
         _root           = null;
         
         if(newFS) {
@@ -426,7 +426,7 @@ public class NPOIFSFileSystem extends Bl
        
        // Finally read the Small Stream FAT (SBAT) blocks
        BATBlock sfat;
-       List<BATBlock> sbats = new ArrayList<BATBlock>();
+       List<BATBlock> sbats = new ArrayList<>();
        _mini_store     = new NPOIFSMiniStore(this, _property_table.getRoot(), sbats, _header);
        nextAt = _header.getSBATStart();
        for(int i=0; i<_header.getSBATCount() && nextAt != POIFSConstants.END_OF_CHAIN; i++) {

Modified: poi/trunk/src/java/org/apache/poi/poifs/filesystem/OPOIFSDocument.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/poifs/filesystem/OPOIFSDocument.java?rev=1808516&r1=1808515&r2=1808516&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/poifs/filesystem/OPOIFSDocument.java (original)
+++ poi/trunk/src/java/org/apache/poi/poifs/filesystem/OPOIFSDocument.java Sat Sep 16 08:27:23 2017
@@ -149,7 +149,7 @@ public final class OPOIFSDocument implem
 	 * @param stream the InputStream we read data from
 	 */
 	public OPOIFSDocument(String name, POIFSBigBlockSize bigBlockSize, InputStream stream) throws IOException {
-		List<DocumentBlock> blocks = new ArrayList<DocumentBlock>();
+		List<DocumentBlock> blocks = new ArrayList<>();
 
 		_size = 0;
 		_bigBigBlockSize = bigBlockSize;



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


Mime
View raw message