]> source.dussan.org Git - poi.git/commitdiff
Remove unnecessary type arguments (Java 8)
authorDominik Stadler <centic@apache.org>
Sat, 16 Sep 2017 08:27:23 +0000 (08:27 +0000)
committerDominik Stadler <centic@apache.org>
Sat, 16 Sep 2017 08:27:23 +0000 (08:27 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808516 13f79535-47bb-0310-9956-ffa450edef68

530 files changed:
src/examples/src/org/apache/poi/hpsf/examples/CopyCompare.java
src/examples/src/org/apache/poi/hpsf/examples/WriteAuthorAndTitle.java
src/examples/src/org/apache/poi/hssf/eventusermodel/examples/XLS2CSVmra.java
src/examples/src/org/apache/poi/hssf/usermodel/examples/InCellLists.java
src/examples/src/org/apache/poi/hssf/view/brush/PendingPaintings.java
src/examples/src/org/apache/poi/poifs/poibrowser/ExtendableTreeCellRenderer.java
src/examples/src/org/apache/poi/poifs/poibrowser/TreeReaderListener.java
src/examples/src/org/apache/poi/ss/examples/BusinessPlan.java
src/examples/src/org/apache/poi/ss/examples/CalendarDemo.java
src/examples/src/org/apache/poi/ss/examples/ExcelComparator.java
src/examples/src/org/apache/poi/ss/examples/LoanCalculator.java
src/examples/src/org/apache/poi/ss/examples/SSPerformanceTest.java
src/examples/src/org/apache/poi/ss/examples/TimesheetDemo.java
src/examples/src/org/apache/poi/ss/examples/ToCSV.java
src/examples/src/org/apache/poi/ss/examples/formula/CheckFunctionsSupported.java
src/examples/src/org/apache/poi/ss/examples/formula/SettingExternalFunction.java
src/examples/src/org/apache/poi/ss/examples/html/ToHtml.java
src/examples/src/org/apache/poi/xssf/eventusermodel/examples/FromHowTo.java
src/examples/src/org/apache/poi/xssf/usermodel/examples/AligningCells.java
src/examples/src/org/apache/poi/xssf/usermodel/examples/BigGridDemo.java
src/examples/src/org/apache/poi/xssf/usermodel/examples/CalendarDemo.java
src/excelant/java/org/apache/poi/ss/excelant/ExcelAntTask.java
src/excelant/java/org/apache/poi/ss/excelant/ExcelAntTest.java
src/excelant/java/org/apache/poi/ss/excelant/util/ExcelAntWorkbookUtil.java
src/excelant/java/org/apache/poi/ss/excelant/util/ExcelAntWorkbookUtilFactory.java
src/integrationtest/org/apache/poi/TestAllFiles.java
src/integrationtest/org/apache/poi/stress/AbstractFileHandler.java
src/integrationtest/org/apache/poi/stress/HPSFFileHandler.java
src/integrationtest/org/apache/poi/stress/HSSFFileHandler.java
src/integrationtest/org/apache/poi/stress/XSSFFileHandler.java
src/java/org/apache/poi/common/usermodel/HyperlinkType.java
src/java/org/apache/poi/common/usermodel/fonts/FontGroup.java
src/java/org/apache/poi/ddf/AbstractEscherOptRecord.java
src/java/org/apache/poi/ddf/DefaultEscherRecordFactory.java
src/java/org/apache/poi/ddf/EscherContainerRecord.java
src/java/org/apache/poi/ddf/EscherDggRecord.java
src/java/org/apache/poi/ddf/EscherProperties.java
src/java/org/apache/poi/ddf/EscherPropertyFactory.java
src/java/org/apache/poi/ddf/EscherTextboxRecord.java
src/java/org/apache/poi/ddf/UnknownEscherRecord.java
src/java/org/apache/poi/extractor/OLE2ExtractorFactory.java
src/java/org/apache/poi/hpsf/CustomProperties.java
src/java/org/apache/poi/hpsf/DocumentSummaryInformation.java
src/java/org/apache/poi/hpsf/HPSFPropertiesOnlyDocument.java
src/java/org/apache/poi/hpsf/PropertySet.java
src/java/org/apache/poi/hpsf/Section.java
src/java/org/apache/poi/hpsf/Variant.java
src/java/org/apache/poi/hpsf/VariantSupport.java
src/java/org/apache/poi/hpsf/Vector.java
src/java/org/apache/poi/hpsf/wellknown/PropertyIDMap.java
src/java/org/apache/poi/hpsf/wellknown/SectionIDMap.java
src/java/org/apache/poi/hssf/dev/BiffDrawingToXml.java
src/java/org/apache/poi/hssf/dev/BiffViewer.java
src/java/org/apache/poi/hssf/eventusermodel/EventWorkbookBuilder.java
src/java/org/apache/poi/hssf/eventusermodel/FormatTrackingHSSFListener.java
src/java/org/apache/poi/hssf/eventusermodel/HSSFRequest.java
src/java/org/apache/poi/hssf/extractor/EventBasedExcelExtractor.java
src/java/org/apache/poi/hssf/model/DrawingManager2.java
src/java/org/apache/poi/hssf/model/InternalSheet.java
src/java/org/apache/poi/hssf/model/InternalWorkbook.java
src/java/org/apache/poi/hssf/model/LinkTable.java
src/java/org/apache/poi/hssf/model/RowBlocksReader.java
src/java/org/apache/poi/hssf/model/WorkbookRecordList.java
src/java/org/apache/poi/hssf/record/AbstractEscherHolderRecord.java
src/java/org/apache/poi/hssf/record/EscherAggregate.java
src/java/org/apache/poi/hssf/record/ExtSSTRecord.java
src/java/org/apache/poi/hssf/record/ExternSheetRecord.java
src/java/org/apache/poi/hssf/record/ObjRecord.java
src/java/org/apache/poi/hssf/record/PageBreakRecord.java
src/java/org/apache/poi/hssf/record/PaletteRecord.java
src/java/org/apache/poi/hssf/record/RecordFactory.java
src/java/org/apache/poi/hssf/record/RecordFactoryInputStream.java
src/java/org/apache/poi/hssf/record/SSTRecord.java
src/java/org/apache/poi/hssf/record/aggregates/CFRecordsAggregate.java
src/java/org/apache/poi/hssf/record/aggregates/ChartSubstreamRecordAggregate.java
src/java/org/apache/poi/hssf/record/aggregates/ColumnInfoRecordsAggregate.java
src/java/org/apache/poi/hssf/record/aggregates/ConditionalFormattingTable.java
src/java/org/apache/poi/hssf/record/aggregates/CustomViewSettingsRecordAggregate.java
src/java/org/apache/poi/hssf/record/aggregates/DataValidityTable.java
src/java/org/apache/poi/hssf/record/aggregates/MergedCellsTable.java
src/java/org/apache/poi/hssf/record/aggregates/PageSettingsBlock.java
src/java/org/apache/poi/hssf/record/aggregates/RowRecordsAggregate.java
src/java/org/apache/poi/hssf/record/aggregates/SharedValueManager.java
src/java/org/apache/poi/hssf/record/common/UnicodeString.java
src/java/org/apache/poi/hssf/record/crypto/Biff8EncryptionKey.java
src/java/org/apache/poi/hssf/usermodel/FontDetails.java
src/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java
src/java/org/apache/poi/hssf/usermodel/HSSFDataFormat.java
src/java/org/apache/poi/hssf/usermodel/HSSFOptimiser.java
src/java/org/apache/poi/hssf/usermodel/HSSFPatriarch.java
src/java/org/apache/poi/hssf/usermodel/HSSFShapeGroup.java
src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java
src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java
src/java/org/apache/poi/hssf/usermodel/StaticFontMetrics.java
src/java/org/apache/poi/hssf/util/HSSFColor.java
src/java/org/apache/poi/hssf/util/LazilyConcatenatedByteArray.java
src/java/org/apache/poi/poifs/crypt/cryptoapi/CryptoAPIEncryptor.java
src/java/org/apache/poi/poifs/dev/POIFSViewEngine.java
src/java/org/apache/poi/poifs/eventfilesystem/POIFSReaderRegistry.java
src/java/org/apache/poi/poifs/filesystem/DirectoryNode.java
src/java/org/apache/poi/poifs/filesystem/DocumentNode.java
src/java/org/apache/poi/poifs/filesystem/EntryUtils.java
src/java/org/apache/poi/poifs/filesystem/FilteringDirectoryNode.java
src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java
src/java/org/apache/poi/poifs/filesystem/OPOIFSDocument.java
src/java/org/apache/poi/poifs/filesystem/OPOIFSFileSystem.java
src/java/org/apache/poi/poifs/macros/VBAMacroReader.java
src/java/org/apache/poi/poifs/nio/FileBackedDataSource.java
src/java/org/apache/poi/poifs/property/DirectoryProperty.java
src/java/org/apache/poi/poifs/property/NPropertyTable.java
src/java/org/apache/poi/poifs/property/PropertyFactory.java
src/java/org/apache/poi/poifs/property/PropertyTableBase.java
src/java/org/apache/poi/poifs/storage/BlockAllocationTableReader.java
src/java/org/apache/poi/poifs/storage/RawDataBlockList.java
src/java/org/apache/poi/poifs/storage/SmallBlockTableWriter.java
src/java/org/apache/poi/poifs/storage/SmallDocumentBlock.java
src/java/org/apache/poi/sl/draw/DrawFactory.java
src/java/org/apache/poi/sl/draw/DrawFreeformShape.java
src/java/org/apache/poi/sl/draw/DrawSimpleShape.java
src/java/org/apache/poi/sl/draw/DrawTextParagraph.java
src/java/org/apache/poi/sl/draw/binding/CTAdjustHandleList.java
src/java/org/apache/poi/sl/draw/binding/CTColorMRU.java
src/java/org/apache/poi/sl/draw/binding/CTConnectionSiteList.java
src/java/org/apache/poi/sl/draw/binding/CTGeomGuideList.java
src/java/org/apache/poi/sl/draw/binding/CTHslColor.java
src/java/org/apache/poi/sl/draw/binding/CTOfficeArtExtensionList.java
src/java/org/apache/poi/sl/draw/binding/CTPath2D.java
src/java/org/apache/poi/sl/draw/binding/CTPath2DCubicBezierTo.java
src/java/org/apache/poi/sl/draw/binding/CTPath2DList.java
src/java/org/apache/poi/sl/draw/binding/CTPath2DQuadBezierTo.java
src/java/org/apache/poi/sl/draw/binding/CTPresetColor.java
src/java/org/apache/poi/sl/draw/binding/CTSRgbColor.java
src/java/org/apache/poi/sl/draw/binding/CTScRgbColor.java
src/java/org/apache/poi/sl/draw/binding/CTSchemeColor.java
src/java/org/apache/poi/sl/draw/binding/CTSystemColor.java
src/java/org/apache/poi/sl/draw/binding/ObjectFactory.java
src/java/org/apache/poi/sl/draw/geom/Context.java
src/java/org/apache/poi/sl/draw/geom/CustomGeometry.java
src/java/org/apache/poi/sl/draw/geom/Path.java
src/java/org/apache/poi/sl/usermodel/PresetColor.java
src/java/org/apache/poi/ss/format/CellElapsedFormatter.java
src/java/org/apache/poi/ss/format/CellFormat.java
src/java/org/apache/poi/ss/format/CellFormatCondition.java
src/java/org/apache/poi/ss/format/CellFormatPart.java
src/java/org/apache/poi/ss/format/CellNumberFormatter.java
src/java/org/apache/poi/ss/format/CellNumberPartHandler.java
src/java/org/apache/poi/ss/formula/CellEvaluationFrame.java
src/java/org/apache/poi/ss/formula/CollaboratingWorkbooksEnvironment.java
src/java/org/apache/poi/ss/formula/ConditionalFormattingEvaluator.java
src/java/org/apache/poi/ss/formula/DataValidationEvaluator.java
src/java/org/apache/poi/ss/formula/EvaluationConditionalFormatRule.java
src/java/org/apache/poi/ss/formula/EvaluationTracker.java
src/java/org/apache/poi/ss/formula/FormulaCellCache.java
src/java/org/apache/poi/ss/formula/FormulaCellCacheEntry.java
src/java/org/apache/poi/ss/formula/FormulaParser.java
src/java/org/apache/poi/ss/formula/FormulaRenderer.java
src/java/org/apache/poi/ss/formula/FormulaUsedBlankCellSet.java
src/java/org/apache/poi/ss/formula/OperationEvaluatorFactory.java
src/java/org/apache/poi/ss/formula/PlainCellCache.java
src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java
src/java/org/apache/poi/ss/formula/atp/AnalysisToolPak.java
src/java/org/apache/poi/ss/formula/atp/ArgumentsEvaluator.java
src/java/org/apache/poi/ss/formula/eval/ErrorEval.java
src/java/org/apache/poi/ss/formula/eval/FunctionEval.java
src/java/org/apache/poi/ss/formula/eval/RefListEval.java
src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationSheet.java
src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationWorkbook.java
src/java/org/apache/poi/ss/formula/function/FunctionDataBuilder.java
src/java/org/apache/poi/ss/formula/function/FunctionMetadataReader.java
src/java/org/apache/poi/ss/formula/functions/FactDouble.java
src/java/org/apache/poi/ss/formula/functions/Mode.java
src/java/org/apache/poi/ss/formula/functions/Subtotal.java
src/java/org/apache/poi/ss/formula/ptg/Ptg.java
src/java/org/apache/poi/ss/formula/udf/AggregatingUDFFinder.java
src/java/org/apache/poi/ss/formula/udf/DefaultUDFFinder.java
src/java/org/apache/poi/ss/formula/udf/IndexedUDFFinder.java
src/java/org/apache/poi/ss/usermodel/ConditionType.java
src/java/org/apache/poi/ss/usermodel/DataFormatter.java
src/java/org/apache/poi/ss/usermodel/DateUtil.java
src/java/org/apache/poi/ss/usermodel/FormulaError.java
src/java/org/apache/poi/ss/usermodel/charts/DataSources.java
src/java/org/apache/poi/ss/usermodel/helpers/RowShifter.java
src/java/org/apache/poi/ss/util/AreaReference.java
src/java/org/apache/poi/ss/util/CellRangeAddressList.java
src/java/org/apache/poi/ss/util/CellRangeUtil.java
src/java/org/apache/poi/ss/util/CellUtil.java
src/java/org/apache/poi/ss/util/DateFormatConverter.java
src/java/org/apache/poi/ss/util/PropertyTemplate.java
src/java/org/apache/poi/ss/util/SSCellRange.java
src/java/org/apache/poi/util/BitFieldFactory.java
src/java/org/apache/poi/util/HexRead.java
src/java/org/apache/poi/util/IntMapper.java
src/java/org/apache/poi/util/LocaleUtil.java
src/java/org/apache/poi/util/POILogFactory.java
src/java/org/apache/poi/util/StringUtil.java
src/ooxml/java/org/apache/poi/POIXMLDocument.java
src/ooxml/java/org/apache/poi/POIXMLDocumentPart.java
src/ooxml/java/org/apache/poi/POIXMLTypeLoader.java
src/ooxml/java/org/apache/poi/extractor/ExtractorFactory.java
src/ooxml/java/org/apache/poi/openxml4j/opc/OPCPackage.java
src/ooxml/java/org/apache/poi/openxml4j/opc/PackagePartCollection.java
src/ooxml/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java
src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentType.java
src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java
src/ooxml/java/org/apache/poi/openxml4j/opc/internal/PackagePropertiesPart.java
src/ooxml/java/org/apache/poi/openxml4j/util/ZipInputStreamZipEntrySource.java
src/ooxml/java/org/apache/poi/poifs/crypt/agile/AgileEncryptionVerifier.java
src/ooxml/java/org/apache/poi/poifs/crypt/agile/AgileEncryptor.java
src/ooxml/java/org/apache/poi/poifs/crypt/dsig/KeyInfoKeySelector.java
src/ooxml/java/org/apache/poi/poifs/crypt/dsig/SignatureConfig.java
src/ooxml/java/org/apache/poi/poifs/crypt/dsig/SignatureInfo.java
src/ooxml/java/org/apache/poi/poifs/crypt/dsig/SignatureMarshalListener.java
src/ooxml/java/org/apache/poi/poifs/crypt/dsig/facets/EnvelopedSignatureFacet.java
src/ooxml/java/org/apache/poi/poifs/crypt/dsig/facets/KeyInfoSignatureFacet.java
src/ooxml/java/org/apache/poi/poifs/crypt/dsig/facets/OOXMLSignatureFacet.java
src/ooxml/java/org/apache/poi/poifs/crypt/dsig/facets/XAdESSignatureFacet.java
src/ooxml/java/org/apache/poi/poifs/crypt/dsig/facets/XAdESXLSignatureFacet.java
src/ooxml/java/org/apache/poi/poifs/crypt/dsig/services/RelationshipTransformService.java
src/ooxml/java/org/apache/poi/poifs/crypt/dsig/services/RevocationData.java
src/ooxml/java/org/apache/poi/poifs/crypt/dsig/services/TSPTimeStampService.java
src/ooxml/java/org/apache/poi/ss/extractor/EmbeddedExtractor.java
src/ooxml/java/org/apache/poi/util/IdentifierManager.java
src/ooxml/java/org/apache/poi/util/OOXMLLite.java
src/ooxml/java/org/apache/poi/xdgf/geom/SplineCollector.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFBaseContents.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFDocument.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFMasters.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFPageContents.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFPages.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFRelation.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFShape.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFSheet.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/XmlVisioDocument.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/section/CharacterSection.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/section/GeometrySection.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/section/XDGFSection.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/GeometryRowFactory.java
src/ooxml/java/org/apache/poi/xdgf/util/ObjectFactory.java
src/ooxml/java/org/apache/poi/xslf/usermodel/XMLSlideShow.java
src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFCommonSlideData.java
src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFGroupShape.java
src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFNotes.java
src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFRelation.java
src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java
src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlideMaster.java
src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlideShow.java
src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTable.java
src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableRow.java
src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableStyles.java
src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextParagraph.java
src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextShape.java
src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTheme.java
src/ooxml/java/org/apache/poi/xslf/util/PPTX2PNG.java
src/ooxml/java/org/apache/poi/xssf/binary/XSSFBCommentsTable.java
src/ooxml/java/org/apache/poi/xssf/binary/XSSFBHyperlinksTable.java
src/ooxml/java/org/apache/poi/xssf/binary/XSSFBRecordType.java
src/ooxml/java/org/apache/poi/xssf/binary/XSSFBSharedStringsTable.java
src/ooxml/java/org/apache/poi/xssf/binary/XSSFBStylesTable.java
src/ooxml/java/org/apache/poi/xssf/eventusermodel/ReadOnlySharedStringsTable.java
src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFBReader.java
src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java
src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java
src/ooxml/java/org/apache/poi/xssf/extractor/XSSFEventBasedExcelExtractor.java
src/ooxml/java/org/apache/poi/xssf/extractor/XSSFExportToXml.java
src/ooxml/java/org/apache/poi/xssf/extractor/XSSFImportFromXML.java
src/ooxml/java/org/apache/poi/xssf/model/CommentsTable.java
src/ooxml/java/org/apache/poi/xssf/model/ExternalLinksTable.java
src/ooxml/java/org/apache/poi/xssf/model/MapInfo.java
src/ooxml/java/org/apache/poi/xssf/model/SharedStringsTable.java
src/ooxml/java/org/apache/poi/xssf/model/SingleXmlCells.java
src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java
src/ooxml/java/org/apache/poi/xssf/streaming/AutoSizeColumnTracker.java
src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFRow.java
src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java
src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java
src/ooxml/java/org/apache/poi/xssf/usermodel/BaseXSSFEvaluationWorkbook.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFBuiltinTableStyle.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFChart.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFConditionalFormatting.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFConditionalFormattingRule.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDataValidation.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDataValidationHelper.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDrawing.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFEvaluationSheet.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFMap.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotTable.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRelation.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRichTextString.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRow.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheetConditionalFormatting.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSimpleShape.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTable.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTableStyle.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTextParagraph.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFVMLDrawing.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java
src/ooxml/java/org/apache/poi/xssf/usermodel/charts/XSSFLineChartData.java
src/ooxml/java/org/apache/poi/xssf/usermodel/charts/XSSFScatterChartData.java
src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/ColumnHelper.java
src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFIgnoredErrorHelper.java
src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFRowShifter.java
src/ooxml/java/org/apache/poi/xwpf/usermodel/Borders.java
src/ooxml/java/org/apache/poi/xwpf/usermodel/BreakClear.java
src/ooxml/java/org/apache/poi/xwpf/usermodel/BreakType.java
src/ooxml/java/org/apache/poi/xwpf/usermodel/LineSpacingRule.java
src/ooxml/java/org/apache/poi/xwpf/usermodel/ParagraphAlignment.java
src/ooxml/java/org/apache/poi/xwpf/usermodel/TextAlignment.java
src/ooxml/java/org/apache/poi/xwpf/usermodel/UnderlinePatterns.java
src/ooxml/java/org/apache/poi/xwpf/usermodel/VerticalAlign.java
src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java
src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFootnote.java
src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFootnotes.java
src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFHeaderFooter.java
src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFNumbering.java
src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFParagraph.java
src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRelation.java
src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java
src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFSDTContent.java
src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFStyles.java
src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTable.java
src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTableCell.java
src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTableRow.java
src/ooxml/testcases/org/apache/poi/TestPOIXMLDocument.java
src/ooxml/testcases/org/apache/poi/TestPOIXMLProperties.java
src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestFileHelper.java
src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestListParts.java
src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackage.java
src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackageCoreProperties.java
src/ooxml/testcases/org/apache/poi/openxml4j/opc/ZipFileAssert.java
src/ooxml/testcases/org/apache/poi/poifs/crypt/TestAgileEncryptionParameters.java
src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java
src/ooxml/testcases/org/apache/poi/sl/TestFonts.java
src/ooxml/testcases/org/apache/poi/ss/extractor/TestEmbeddedExtractor.java
src/ooxml/testcases/org/apache/poi/xdgf/usermodel/section/CombinedIteratorTest.java
src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestPPTX2PNG.java
src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFChart.java
src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFPictureShape.java
src/ooxml/testcases/org/apache/poi/xssf/SXSSFITestDataProvider.java
src/ooxml/testcases/org/apache/poi/xssf/eventusermodel/TestXSSFBReader.java
src/ooxml/testcases/org/apache/poi/xssf/eventusermodel/TestXSSFReader.java
src/ooxml/testcases/org/apache/poi/xssf/extractor/TestXSSFExcelExtractor.java
src/ooxml/testcases/org/apache/poi/xssf/model/TestSharedStringsTable.java
src/ooxml/testcases/org/apache/poi/xssf/model/TestThemesTable.java
src/ooxml/testcases/org/apache/poi/xssf/streaming/TempFileRecordingSXSSFWorkbookWithCustomZipEntrySource.java
src/ooxml/testcases/org/apache/poi/xssf/streaming/TestAutoSizeColumnTracker.java
src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFSheetAutoSizeColumn.java
src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestFormulaEvaluatorOnXSSF.java
src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestMultiSheetFormulaEvaluatorOnXSSF.java
src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java
src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFormulaEvaluation.java
src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheet.java
src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFTable.java
src/ooxml/testcases/org/apache/poi/xssf/util/MemoryUsage.java
src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFSDT.java
src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFStyles.java
src/scratchpad/src/org/apache/poi/hdgf/chunks/Chunk.java
src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkFactory.java
src/scratchpad/src/org/apache/poi/hdgf/extractor/VisioTextExtractor.java
src/scratchpad/src/org/apache/poi/hdgf/streams/ChunkStream.java
src/scratchpad/src/org/apache/poi/hemf/record/HemfCommentEMFPlus.java
src/scratchpad/src/org/apache/poi/hemf/record/HemfCommentPublic.java
src/scratchpad/src/org/apache/poi/hmef/Attachment.java
src/scratchpad/src/org/apache/poi/hmef/HMEFMessage.java
src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIAttribute.java
src/scratchpad/src/org/apache/poi/hmef/attribute/TNEFProperty.java
src/scratchpad/src/org/apache/poi/hpbf/model/EscherPart.java
src/scratchpad/src/org/apache/poi/hslf/extractor/PowerPointExtractor.java
src/scratchpad/src/org/apache/poi/hslf/extractor/QuickButCruddyTextExtractor.java
src/scratchpad/src/org/apache/poi/hslf/model/textproperties/TabStopPropCollection.java
src/scratchpad/src/org/apache/poi/hslf/model/textproperties/TextPropCollection.java
src/scratchpad/src/org/apache/poi/hslf/record/Document.java
src/scratchpad/src/org/apache/poi/hslf/record/ExObjList.java
src/scratchpad/src/org/apache/poi/hslf/record/FontCollection.java
src/scratchpad/src/org/apache/poi/hslf/record/HSLFEscherClientDataRecord.java
src/scratchpad/src/org/apache/poi/hslf/record/MainMaster.java
src/scratchpad/src/org/apache/poi/hslf/record/MasterTextPropAtom.java
src/scratchpad/src/org/apache/poi/hslf/record/PPDrawing.java
src/scratchpad/src/org/apache/poi/hslf/record/PersistPtrHolder.java
src/scratchpad/src/org/apache/poi/hslf/record/Record.java
src/scratchpad/src/org/apache/poi/hslf/record/RecordContainer.java
src/scratchpad/src/org/apache/poi/hslf/record/RecordTypes.java
src/scratchpad/src/org/apache/poi/hslf/record/SlideListWithText.java
src/scratchpad/src/org/apache/poi/hslf/record/StyleTextProp9Atom.java
src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java
src/scratchpad/src/org/apache/poi/hslf/record/TextSpecInfoAtom.java
src/scratchpad/src/org/apache/poi/hslf/record/TxMasterStyleAtom.java
src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFFreeformShape.java
src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFGroupShape.java
src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFHyperlink.java
src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFNotes.java
src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSheet.java
src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlide.java
src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideMaster.java
src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShow.java
src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowEncrypted.java
src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowImpl.java
src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSoundData.java
src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTable.java
src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextParagraph.java
src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextShape.java
src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTitleMaster.java
src/scratchpad/src/org/apache/poi/hsmf/MAPIMessage.java
src/scratchpad/src/org/apache/poi/hsmf/datatypes/AttachmentChunks.java
src/scratchpad/src/org/apache/poi/hsmf/datatypes/Chunks.java
src/scratchpad/src/org/apache/poi/hsmf/datatypes/MAPIProperty.java
src/scratchpad/src/org/apache/poi/hsmf/datatypes/NameIdChunks.java
src/scratchpad/src/org/apache/poi/hsmf/datatypes/PropertiesChunk.java
src/scratchpad/src/org/apache/poi/hsmf/datatypes/RecipientChunks.java
src/scratchpad/src/org/apache/poi/hsmf/datatypes/Types.java
src/scratchpad/src/org/apache/poi/hsmf/dev/TypesLister.java
src/scratchpad/src/org/apache/poi/hsmf/parsers/POIFSChunkParser.java
src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToFoConverter.java
src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToHtmlConverter.java
src/scratchpad/src/org/apache/poi/hssf/usermodel/HSSFChart.java
src/scratchpad/src/org/apache/poi/hwmf/draw/HwmfGraphics.java
src/scratchpad/src/org/apache/poi/hwmf/record/HwmfDraw.java
src/scratchpad/src/org/apache/poi/hwmf/record/HwmfPalette.java
src/scratchpad/src/org/apache/poi/hwmf/usermodel/HwmfPicture.java
src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java
src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordUtils.java
src/scratchpad/src/org/apache/poi/hwpf/converter/HtmlDocumentFacade.java
src/scratchpad/src/org/apache/poi/hwpf/converter/WordToFoConverter.java
src/scratchpad/src/org/apache/poi/hwpf/converter/WordToHtmlConverter.java
src/scratchpad/src/org/apache/poi/hwpf/dev/HWPFLister.java
src/scratchpad/src/org/apache/poi/hwpf/model/BookmarksTables.java
src/scratchpad/src/org/apache/poi/hwpf/model/CHPBinTable.java
src/scratchpad/src/org/apache/poi/hwpf/model/CHPFormattedDiskPage.java
src/scratchpad/src/org/apache/poi/hwpf/model/ComplexFileTable.java
src/scratchpad/src/org/apache/poi/hwpf/model/EscherRecordHolder.java
src/scratchpad/src/org/apache/poi/hwpf/model/FIBFieldHandler.java
src/scratchpad/src/org/apache/poi/hwpf/model/FSPATable.java
src/scratchpad/src/org/apache/poi/hwpf/model/FieldsTables.java
src/scratchpad/src/org/apache/poi/hwpf/model/FileInformationBlock.java
src/scratchpad/src/org/apache/poi/hwpf/model/ListTables.java
src/scratchpad/src/org/apache/poi/hwpf/model/OldFontTable.java
src/scratchpad/src/org/apache/poi/hwpf/model/OldTextPieceTable.java
src/scratchpad/src/org/apache/poi/hwpf/model/PAPBinTable.java
src/scratchpad/src/org/apache/poi/hwpf/model/PAPFormattedDiskPage.java
src/scratchpad/src/org/apache/poi/hwpf/model/PICFAndOfficeArtData.java
src/scratchpad/src/org/apache/poi/hwpf/model/PicturesTable.java
src/scratchpad/src/org/apache/poi/hwpf/model/PlexOfCps.java
src/scratchpad/src/org/apache/poi/hwpf/model/SectionTable.java
src/scratchpad/src/org/apache/poi/hwpf/model/TextPieceTable.java
src/scratchpad/src/org/apache/poi/hwpf/model/io/HWPFFileSystem.java
src/scratchpad/src/org/apache/poi/hwpf/sprm/CharacterSprmCompressor.java
src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmCompressor.java
src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java
src/scratchpad/src/org/apache/poi/hwpf/sprm/SectionSprmCompressor.java
src/scratchpad/src/org/apache/poi/hwpf/sprm/TableSprmCompressor.java
src/scratchpad/src/org/apache/poi/hwpf/usermodel/BookmarksImpl.java
src/scratchpad/src/org/apache/poi/hwpf/usermodel/FieldsImpl.java
src/scratchpad/src/org/apache/poi/hwpf/usermodel/NotesImpl.java
src/scratchpad/src/org/apache/poi/hwpf/usermodel/OfficeDrawingsImpl.java
src/scratchpad/src/org/apache/poi/hwpf/usermodel/PictureRunMapper.java
src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java
src/scratchpad/src/org/apache/poi/hwpf/usermodel/Table.java
src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableRow.java
src/scratchpad/testcases/org/apache/poi/hemf/extractor/HemfExtractorTest.java
src/scratchpad/testcases/org/apache/poi/hemf/hemfplus/extractor/HemfPlusExtractorTest.java
src/scratchpad/testcases/org/apache/poi/hslf/TestReWriteSanity.java
src/scratchpad/testcases/org/apache/poi/hslf/model/TestHyperlink.java
src/scratchpad/testcases/org/apache/poi/hslf/model/TestShapes.java
src/scratchpad/testcases/org/apache/poi/hslf/record/TestExHyperlink.java
src/scratchpad/testcases/org/apache/poi/hslf/record/TestTxMasterStyleAtom.java
src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBugs.java
src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestFontRendering.java
src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestTextShape.java
src/scratchpad/testcases/org/apache/poi/hsmf/TestFixedSizedProperties.java
src/scratchpad/testcases/org/apache/poi/hssf/converter/TestExcelConverterSuite.java
src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestWordToConverterSuite.java
src/testcases/org/apache/poi/POITestCase.java
src/testcases/org/apache/poi/hpsf/basic/TestReadAllFiles.java
src/testcases/org/apache/poi/hpsf/basic/TestWrite.java
src/testcases/org/apache/poi/hpsf/basic/TestWriteWellKnown.java
src/testcases/org/apache/poi/hpsf/basic/Util.java
src/testcases/org/apache/poi/hssf/dev/BaseXLSIteratingTest.java
src/testcases/org/apache/poi/hssf/eventusermodel/TestEventWorkbookBuilder.java
src/testcases/org/apache/poi/hssf/eventusermodel/TestFormatTrackingHSSFListener.java
src/testcases/org/apache/poi/hssf/eventusermodel/TestHSSFEventFactory.java
src/testcases/org/apache/poi/hssf/eventusermodel/TestMissingRecordAwareHSSFListener.java
src/testcases/org/apache/poi/hssf/model/TestDrawingAggregate.java
src/testcases/org/apache/poi/hssf/model/TestLinkTable.java
src/testcases/org/apache/poi/hssf/model/TestRVA.java
src/testcases/org/apache/poi/hssf/model/TestSheet.java
src/testcases/org/apache/poi/hssf/record/TestBoundSheetRecord.java
src/testcases/org/apache/poi/hssf/record/TestEscherAggregate.java
src/testcases/org/apache/poi/hssf/record/TestMergeCellsRecord.java
src/testcases/org/apache/poi/hssf/record/TestSSTDeserializer.java
src/testcases/org/apache/poi/hssf/record/TestSSTRecordSizeCalculator.java
src/testcases/org/apache/poi/hssf/record/aggregates/TestCFRecordsAggregate.java
src/testcases/org/apache/poi/hssf/record/aggregates/TestColumnInfoRecordsAggregate.java
src/testcases/org/apache/poi/hssf/record/aggregates/TestValueRecordsAggregate.java
src/testcases/org/apache/poi/hssf/record/chart/TestChartTitleFormatRecord.java
src/testcases/org/apache/poi/hssf/usermodel/RecordInspector.java
src/testcases/org/apache/poi/hssf/usermodel/StreamUtility.java
src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
src/testcases/org/apache/poi/hssf/usermodel/TestHSSFWorkbook.java
src/testcases/org/apache/poi/hssf/usermodel/TestSanityChecker.java
src/testcases/org/apache/poi/poifs/eventfilesystem/TestPOIFSReaderRegistry.java
src/testcases/org/apache/poi/poifs/filesystem/ReaderWriter.java
src/testcases/org/apache/poi/poifs/filesystem/TestEntryUtils.java
src/testcases/org/apache/poi/poifs/filesystem/TestFileSystemBugs.java
src/testcases/org/apache/poi/poifs/filesystem/TestFilteringDirectoryNode.java
src/testcases/org/apache/poi/poifs/filesystem/TestOle10Native.java
src/testcases/org/apache/poi/poifs/filesystem/TestPropertySorter.java
src/testcases/org/apache/poi/poifs/macros/TestVBAMacroReader.java
src/testcases/org/apache/poi/poifs/property/TestDirectoryProperty.java
src/testcases/org/apache/poi/poifs/storage/LocalRawDataBlockList.java
src/testcases/org/apache/poi/poifs/storage/TestBATBlock.java
src/testcases/org/apache/poi/poifs/storage/TestBlockListImpl.java
src/testcases/org/apache/poi/poifs/storage/TestPropertyBlock.java
src/testcases/org/apache/poi/poifs/storage/TestSmallBlockTableWriter.java
src/testcases/org/apache/poi/poifs/storage/TestSmallDocumentBlock.java
src/testcases/org/apache/poi/ss/format/CellFormatTestBase.java
src/testcases/org/apache/poi/ss/formula/TestEvaluationCache.java
src/testcases/org/apache/poi/ss/formula/TestMissingWorkbook.java
src/testcases/org/apache/poi/ss/formula/atp/TestNetworkdaysFunction.java
src/testcases/org/apache/poi/ss/formula/atp/TestWorkdayFunction.java
src/testcases/org/apache/poi/ss/formula/eval/TestFormulasFromSpreadsheet.java
src/testcases/org/apache/poi/ss/formula/function/ExcelFileFormatDocFunctionExtractor.java
src/testcases/org/apache/poi/ss/formula/functions/BaseTestFunctionsFromSpreadsheet.java
src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java
src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java
src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetShiftRows.java
src/testcases/org/apache/poi/ss/usermodel/TestExcelStyleDateFormatter.java
src/testcases/org/apache/poi/ss/util/BaseTestCellUtil.java
src/testcases/org/apache/poi/ss/util/NumberComparisonExamples.java
src/testcases/org/apache/poi/ss/util/NumberRenderingSpreadsheetGenerator.java
src/testcases/org/apache/poi/util/DummyPOILogger.java

index b5bc87562367ec2624a52eb5f609664f6cf72211..cfc064c120c474cd31a5e2b09907b3d2e60df075 100644 (file)
@@ -433,7 +433,7 @@ public class CopyCompare
         /** Contains the directory paths that have already been created in the
          * output POI filesystem and maps them to their corresponding
          * {@link org.apache.poi.poifs.filesystem.DirectoryNode}s. */
-        private final Map<String,DirectoryEntry> paths = new HashMap<String,DirectoryEntry>();
+        private final Map<String,DirectoryEntry> paths = new HashMap<>();
 
 
 
index af0042e43a52acf455cff1be19a3322b23103aff..6fa15f9dc12aae609155d439f40ce4877da3af80 100644 (file)
@@ -323,7 +323,7 @@ public class WriteAuthorAndTitle
         /** Contains the directory paths that have already been created in the
          * output POI filesystem and maps them to their corresponding
          * {@link org.apache.poi.poifs.filesystem.DirectoryNode}s. */
-        private final Map<String, DirectoryEntry> paths = new HashMap<String, DirectoryEntry>();
+        private final Map<String, DirectoryEntry> paths = new HashMap<>();
 
 
 
index 610d9617417922a77b8d34def6c9f73f738cfb46..75a606451232f8fb1c0de088cd1ba7c4ae623f36 100644 (file)
@@ -76,7 +76,7 @@ public class XLS2CSVmra implements HSSFListener {
        /** So we known which sheet we're on */
        private int sheetIndex = -1;
        private BoundSheetRecord[] orderedBSRs;
-       private List<BoundSheetRecord> boundSheetRecords = new ArrayList<BoundSheetRecord>();
+       private List<BoundSheetRecord> boundSheetRecords = new ArrayList<>();
 
        // For handling formulas with string results
        private int nextRow;
index c568a6ed29fbbb8f35050c386f41815c8bea7ed7..81733a3424438dfbefe7753cff344d26b5eb8468 100644 (file)
@@ -81,7 +81,7 @@ public class InCellLists {
             // whose items are neither bulleted or numbered - into that cell.
             row = sheet.createRow(1);
             cell = row.createCell(0);
-            ArrayList<String> listItems = new ArrayList<String>();
+            ArrayList<String> listItems = new ArrayList<>();
             listItems.add("List Item One.");
             listItems.add("List Item Two.");
             listItems.add("List Item Three.");
@@ -125,8 +125,8 @@ public class InCellLists {
             // to preserve order.
             row = sheet.createRow(4);
             cell = row.createCell(0);
-            ArrayList<MultiLevelListItem> multiLevelListItems = new ArrayList<MultiLevelListItem>();
-            listItems = new ArrayList<String>();
+            ArrayList<MultiLevelListItem> multiLevelListItems = new ArrayList<>();
+            listItems = new ArrayList<>();
             listItems.add("ML List Item One - Sub Item One.");
             listItems.add("ML List Item One - Sub Item Two.");
             listItems.add("ML List Item One - Sub Item Three.");
@@ -137,7 +137,7 @@ public class InCellLists {
             // item
             multiLevelListItems.add(new MultiLevelListItem("List Item Two.", null));
             multiLevelListItems.add(new MultiLevelListItem("List Item Three.", null));
-            listItems = new ArrayList<String>();
+            listItems = new ArrayList<>();
             listItems.add("ML List Item Four - Sub Item One.");
             listItems.add("ML List Item Four - Sub Item Two.");
             listItems.add("ML List Item Four - Sub Item Three.");
index a8b3849dc5de5ad7c41b7b57bb9a6b0337b9c91e..dcbf8b35c39b2cb10631d45669ad6ac45715a268 100644 (file)
@@ -89,7 +89,7 @@ public class PendingPaintings {
      * @param parent
      */
     public PendingPaintings(JComponent parent) {
-        paintings = new ArrayList<Painting>();
+        paintings = new ArrayList<>();
         parent.putClientProperty(PENDING_PAINTINGS, this);
     }
 
index dbb759c9c5e47e9406158d4cca55ff1a197a981f..a2a0339b51b8f386e7f73219639c517ecd331af1 100644 (file)
@@ -46,7 +46,7 @@ public class ExtendableTreeCellRenderer implements TreeCellRenderer
 
     public ExtendableTreeCellRenderer()
     {
-        renderers = new HashMap<Class<?>,TreeCellRenderer>();
+        renderers = new HashMap<>();
         register(Object.class, new DefaultTreeCellRenderer()
             {
                 @Override
index 2795be98f023357cc0abc0204596411bfe03589c..a7d978d23493217a9c907ce48a503a1a82f307df 100644 (file)
@@ -96,7 +96,7 @@ public class TreeReaderListener implements POIFSReaderListener
     {
         this.filename = filename;
         this.rootNode = rootNode;
-        pathToNode = new HashMap<Object,MutableTreeNode>(15); // Should be a reasonable guess.
+        pathToNode = new HashMap<>(15); // Should be a reasonable guess.
     }
 
 
index d263494ec6d8ec5fa4a758b9573708ccbfda00c4..5ff1b2f3316bd30c0a4158a72845d79253530e4f 100644 (file)
@@ -209,7 +209,7 @@ public class BusinessPlan {
      * create a library of cell styles
      */
     private static Map<String, CellStyle> createStyles(Workbook wb){
-        Map<String, CellStyle> styles = new HashMap<String, CellStyle>();
+        Map<String, CellStyle> styles = new HashMap<>();
         DataFormat df = wb.createDataFormat();
 
         CellStyle style;
index 4438f22c15abd90199bf4b62e673d7139baeb6bc..3cf0d2d36d1ed2d12ef68ef00f0f375eed9c46fd 100644 (file)
@@ -148,7 +148,7 @@ public class CalendarDemo {
      * cell styles used for formatting calendar sheets
      */
     private static Map<String, CellStyle> createStyles(Workbook wb){
-        Map<String, CellStyle> styles = new HashMap<String, CellStyle>();
+        Map<String, CellStyle> styles = new HashMap<>();
 
         short borderColor = IndexedColors.GREY_50_PERCENT.getIndex();
 
index 645e798a0d9c356009521b78a7fb636b938b815c..5c6fa9fa4459f3feccc9af003b6ad95a3cb71c1d 100644 (file)
@@ -88,7 +88,7 @@ public class ExcelComparator {
         Cell cell;
     }
     
-    List<String> listOfDifferences = new ArrayList<String>();
+    List<String> listOfDifferences = new ArrayList<>();
 
     public static void main(String args[]) throws Exception {
         if (args.length != 2 || !(new File(args[0]).exists()) || !(new File(args[1]).exists())) {
index d6375dc43606fae1e57c6f2143972dc19e489b7f..7dc92ee49bc09192f5cd9b8f523d8dc365f5ff1c 100644 (file)
@@ -150,7 +150,7 @@ public class LoanCalculator {
      * cell styles used for formatting calendar sheets
      */
     private static Map<String, CellStyle> createStyles(Workbook wb){
-        Map<String, CellStyle> styles = new HashMap<String, CellStyle>();
+        Map<String, CellStyle> styles = new HashMap<>();
 
         CellStyle style;
         Font titleFont = wb.createFont();
index 10c3a4a7dc5bb14a57edfa9ebca9e607e3f763a0..30a1dccb7f39cbb6b16b9867c945f533d3c87c45 100644 (file)
@@ -153,7 +153,7 @@ public class SSPerformanceTest {
     }
 
     static Map<String, CellStyle> createStyles(Workbook wb) {
-        Map<String, CellStyle> styles = new HashMap<String, CellStyle>();
+        Map<String, CellStyle> styles = new HashMap<>();
         CellStyle style;
 
         Font headerFont = wb.createFont();
index 8ef20fe4378fd2541c0d1467fe12badf874dfef5..6ab8a294382e03d9e0ddf6fe51621181ab14ecd8 100644 (file)
@@ -163,7 +163,7 @@ public class TimesheetDemo {
      * Create a library of cell styles
      */
     private static Map<String, CellStyle> createStyles(Workbook wb){
-        Map<String, CellStyle> styles = new HashMap<String, CellStyle>();
+        Map<String, CellStyle> styles = new HashMap<>();
         CellStyle style;
         Font titleFont = wb.createFont();
         titleFont.setFontHeightInPoints((short)18);
index 1a9879f205cf5858721e13dce7620ee78957681c..af486dbc972577d598091c57d18a7ebd3e776f63 100644 (file)
@@ -409,7 +409,7 @@ public class ToCSV {
         Sheet sheet = null;
         Row row = null;
         int lastRowNum = 0;
-        this.csvData = new ArrayList<ArrayList<String>>();
+        this.csvData = new ArrayList<>();
 
         System.out.println("Converting files contents to CSV format.");
 
@@ -526,7 +526,7 @@ public class ToCSV {
     private void rowToCSV(Row row) {
         Cell cell = null;
         int lastCellNum = 0;
-        ArrayList<String> csvLine = new ArrayList<String>();
+        ArrayList<String> csvLine = new ArrayList<>();
 
         // Check to ensure that a row was recovered from the sheet as it is
         // possible that one or more rows between other populated rows could be
index 94f7cd1118b8c0944d10d7d375795095c3a4475e..adb24eb676b901dd6b5b24063546206f0af6ee62 100644 (file)
@@ -57,13 +57,13 @@ public class CheckFunctionsSupported {
         CheckFunctionsSupported check = new CheckFunctionsSupported(wb);
         
         // Fetch all the problems
-        List<FormulaEvaluationProblems> problems = new ArrayList<CheckFunctionsSupported.FormulaEvaluationProblems>();
+        List<FormulaEvaluationProblems> problems = new ArrayList<>();
         for (int sn=0; sn<wb.getNumberOfSheets(); sn++) {
             problems.add(check.getEvaluationProblems(sn));
         }
         
         // Produce an overall summary
-        Set<String> unsupportedFunctions = new TreeSet<String>();
+        Set<String> unsupportedFunctions = new TreeSet<>();
         for (FormulaEvaluationProblems p : problems) {
             unsupportedFunctions.addAll(p.unsupportedFunctions);
         }
@@ -121,8 +121,8 @@ public class CheckFunctionsSupported {
         return getEvaluationProblems(workbook.getSheetAt(sheetIndex));
     }
     public FormulaEvaluationProblems getEvaluationProblems(Sheet sheet) {
-        Set<String> unsupportedFunctions = new HashSet<String>();
-        Map<CellReference,Exception> unevaluatableCells = new HashMap<CellReference, Exception>();
+        Set<String> unsupportedFunctions = new HashSet<>();
+        Map<CellReference,Exception> unevaluatableCells = new HashMap<>();
         
         for (Row r : sheet) {
             for (Cell c : r) {
index 51f7c036702bf508f0d8b02df3ec42cc09c21028..e94a679e47f1795ec4ecfd1ee4bbe5b7790d18c0 100644 (file)
@@ -59,7 +59,7 @@ public class SettingExternalFunction {
                     return ErrorEval.NA;
                 }
             };
-            _functionsByName = new HashMap<String, FreeRefFunction>();
+            _functionsByName = new HashMap<>();
             _functionsByName.put("BDP", NA);
             _functionsByName.put("BDH", NA);
             _functionsByName.put("BDS", NA);
index 2a7fe69f2ab95deae3f6dad1f512c3926f9415b0..23a161830b1fad02be66afa2041be3837f716a67 100644 (file)
@@ -98,7 +98,7 @@ public class ToHtml {
 
     @SuppressWarnings({"unchecked"})
     private static <K, V> Map<K, V> mapFor(Object... mapping) {
-        Map<K, V> map = new HashMap<K, V>();
+        Map<K, V> map = new HashMap<>();
         for (int i = 0; i < mapping.length; i += 2) {
             map.put((K) mapping[i], (V) mapping[i + 1]);
         }
@@ -260,7 +260,7 @@ public class ToHtml {
         }
 
         // now add css for each used style
-        Set<CellStyle> seen = new HashSet<CellStyle>();
+        Set<CellStyle> seen = new HashSet<>();
         for (int i = 0; i < wb.getNumberOfSheets(); i++) {
             Sheet sheet = wb.getSheetAt(i);
             Iterator<Row> rows = sheet.rowIterator();
index 6e35e8cdbdb5657aea8c77daf07a42e2cdcfcb90..98773eaa5678352ea7f5c049fae65cbeb433458d 100644 (file)
@@ -96,7 +96,7 @@ public class FromHowTo {
                private String lastContents;
                private boolean nextIsString;
                private boolean inlineStr;
-               private final LruCache<Integer,String> lruCache = new LruCache<Integer,String>(50);
+               private final LruCache<Integer,String> lruCache = new LruCache<>(50);
 
                private static class LruCache<A,B> extends LinkedHashMap<A, B> {
                    private final int maxEntries;
index 0bb002fb3c7ea45145242250fee689b5168fd13f..05e653ee397a97fce16e895f0d536e69f59819a1 100644 (file)
@@ -131,7 +131,7 @@ public class AligningCells {
         // You can add multiple spans for one row
         Object span = start_column + ":" + end_column;
 
-        List<Object> spanList = new ArrayList<Object>();
+        List<Object> spanList = new ArrayList<>();
         spanList.add(span);
 
         //add spns to the row
index 66bb5976237d5f478ac98ba92cc1650a8c2c4337..69dc765033f1e5af6fb277bcd436e44afea52163 100644 (file)
@@ -116,7 +116,7 @@ public class BigGridDemo {
      * Create a library of cell styles.
      */
     private static Map<String, XSSFCellStyle> createStyles(XSSFWorkbook wb){
-        Map<String, XSSFCellStyle> styles = new HashMap<String, XSSFCellStyle>();
+        Map<String, XSSFCellStyle> styles = new HashMap<>();
         XSSFDataFormat fmt = wb.createDataFormat();
 
         XSSFCellStyle style1 = wb.createCellStyle();
index 48e3fd122d5d306c008eebe1833bab1a7e4a3c98..99c3c49758df3c53f613bec1eb3efc0158dd1355 100644 (file)
@@ -135,7 +135,7 @@ public class CalendarDemo {
      * cell styles used for formatting calendar sheets
      */
     private static Map<String, XSSFCellStyle> createStyles(XSSFWorkbook wb){
-        Map<String, XSSFCellStyle> styles = new HashMap<String, XSSFCellStyle>();
+        Map<String, XSSFCellStyle> styles = new HashMap<>();
 
         XSSFCellStyle style;
         XSSFFont titleFont = wb.createFont();
index 625d1a402444bfa36e7be75447c848bc121f301a..16f2e5ff8ec3f56fd53f980ae1c33d18a58e4f6c 100644 (file)
@@ -47,8 +47,8 @@ public class ExcelAntTask extends Task {
        private LinkedList<ExcelAntUserDefinedFunction> functions ;
        
        public ExcelAntTask() {
-               tests = new LinkedList<ExcelAntTest>() ;
-               functions = new LinkedList<ExcelAntUserDefinedFunction>() ;
+               tests = new LinkedList<>() ;
+               functions = new LinkedList<>() ;
        }
 
        public void addPrecision( ExcelAntPrecision prec ) {
index fc35eba08a28e836866d5afd04488a3d864a24d4..586f85566782a4c3881c39c93218402a9915126c 100644 (file)
@@ -56,9 +56,9 @@ public class ExcelAntTest extends Task{
 
        
        public ExcelAntTest() {
-               evaluators = new LinkedList<ExcelAntEvaluateCell>();
-               failureMessages = new LinkedList<String>();
-               testTasks = new LinkedList<Task>();
+               evaluators = new LinkedList<>();
+               failureMessages = new LinkedList<>();
+               testTasks = new LinkedList<>();
        }
        
        public void setPrecision( double precision ) {
index 5c3463d57b2172ccf173697761339c73a7382d85..fa98628eeef3cfb2c2160dc215e239539e83d0da 100644 (file)
@@ -59,7 +59,7 @@ public class ExcelAntWorkbookUtil extends Typedef {
 
     private Workbook workbook;
 
-    private final Map<String, FreeRefFunction> xlsMacroList = new HashMap<String, FreeRefFunction>();
+    private final Map<String, FreeRefFunction> xlsMacroList = new HashMap<>();
 
     /**
      * Constructs an instance using a String that contains the fully qualified
@@ -215,7 +215,7 @@ public class ExcelAntWorkbookUtil extends Typedef {
      * @return
      */
     public List<String> getSheets() {
-       ArrayList<String> sheets = new ArrayList<String>();
+       ArrayList<String> sheets = new ArrayList<>();
 
        int sheetCount = workbook.getNumberOfSheets();
 
index 683ac46368f9ea150551ab076a9ee3be0f91ccf1..113f0390f77204bd1b22975d12e320fcf9d1e4cf 100644 (file)
@@ -46,7 +46,7 @@ public final class ExcelAntWorkbookUtilFactory {
      */
     public static ExcelAntWorkbookUtil getInstance(String fileName) {
         if(workbookUtilMap == null) {
-            workbookUtilMap = new HashMap<String, ExcelAntWorkbookUtil>();
+            workbookUtilMap = new HashMap<>();
         }
 
         if(workbookUtilMap.containsKey(fileName)) {
index e3469da9cb5e9569555b8e1c45c205c537158c90..37aa464ee17a4a906bd98b6f2ac74d0f4c1335e0 100644 (file)
@@ -97,7 +97,7 @@ public class TestAllFiles {
 
     
     // map file extensions to the actual mappers
-    static final Map<String, FileHandler> HANDLERS = new HashMap<String, FileHandler>();
+    static final Map<String, FileHandler> HANDLERS = new HashMap<>();
     static {
         // Excel
         HANDLERS.put(".xls", new HSSFFileHandler());
@@ -210,7 +210,7 @@ public class TestAllFiles {
         HANDLERS.put("spreadsheet/BigSSTRecordCR", new NullFileHandler());
         HANDLERS.put("spreadsheet/test_properties1", new NullFileHandler());
         
-        Map<String,String> passmap = new HashMap<String,String>();
+        Map<String,String> passmap = new HashMap<>();
         passmap.put("slideshow/Password_Protected-hello.ppt", "hello");
         passmap.put("slideshow/Password_Protected-56-hello.ppt", "hello");
         passmap.put("slideshow/Password_Protected-np-hello.ppt", "hello");
@@ -237,7 +237,7 @@ public class TestAllFiles {
         return Collections.unmodifiableSet(hashSet(a));
     }
     private static Set<String> hashSet(String... a) {
-        return new HashSet<String>(Arrays.asList(a));
+        return new HashSet<>(Arrays.asList(a));
     }
 
     // Old Word Documents where we can at least extract some text
@@ -345,7 +345,7 @@ public class TestAllFiles {
 
         System.out.println("Handling " + scanner.getIncludedFiles().length + " files");
 
-        List<Object[]> files = new ArrayList<Object[]>();
+        List<Object[]> files = new ArrayList<>();
         for(String file : scanner.getIncludedFiles()) {
             file = file.replace('\\', '/'); // ... failures/handlers lookup doesn't work on windows otherwise
             if (IGNORED.contains(file)) {
index c4e453e5807fcdc80ae6cbdbb1b9f6eab1250aad..ad2150c7f24471be7bc44730e594e02daa14da17 100644 (file)
@@ -38,7 +38,7 @@ import org.apache.poi.util.IOUtils;
 import org.apache.xmlbeans.XmlException;
 
 public abstract class AbstractFileHandler implements FileHandler {
-    public static final Set<String> EXPECTED_EXTRACTOR_FAILURES = new HashSet<String>();
+    public static final Set<String> EXPECTED_EXTRACTOR_FAILURES = new HashSet<>();
     static {
         // password protected files without password
        // ... currently none ...
index d726e2647f9aa45761bfcb7cecf855f71c6785e4..2bad961bdbaf397516dca809aae55816be20a0b8 100644 (file)
@@ -63,7 +63,7 @@ public class HPSFFileHandler extends POIFSFileHandler {
         
     
     private static final Set<String> unmodifiableHashSet(String... a) {
-        return Collections.unmodifiableSet(new HashSet<String>(Arrays.asList(a)));
+        return Collections.unmodifiableSet(new HashSet<>(Arrays.asList(a)));
     }
 
     
index 0f6f65d0b7d030f9ad15b68dab4f99defa486549..871311f114b2ac863f072345d7c5dc5f4a63dd2f 100644 (file)
@@ -54,7 +54,7 @@ public class HSSFFileHandler extends SpreadsheetHandler {
                // TODO: still fails on some records... RecordsStresser.handleWorkbook(wb);
        }
 
-       private static final Set<String> EXPECTED_ADDITIONAL_FAILURES = new HashSet<String>();
+       private static final Set<String> EXPECTED_ADDITIONAL_FAILURES = new HashSet<>();
        static {
                // encrypted
                EXPECTED_ADDITIONAL_FAILURES.add("spreadsheet/35897-type4.xls");
index 7ba697f2318f6d8d86c07a76faa7df3b8b2fc55f..b8bb0b57b0f2af405f5b33fe9b47d1545ba24b1e 100644 (file)
@@ -157,7 +157,7 @@ public class XSSFFileHandler extends SpreadsheetHandler {
         }
     }
 
-    private static final Set<String> EXPECTED_ADDITIONAL_FAILURES = new HashSet<String>();
+    private static final Set<String> EXPECTED_ADDITIONAL_FAILURES = new HashSet<>();
     static {
         // expected sheet-id not found
         // EXPECTED_ADDITIONAL_FAILURES.add("spreadsheet/52348.xlsx");
index 41de80062ad90d75013ba07933c128aa9d906b5f..af86c3e824f82651a9ab891d51a2a8e82c5154ad 100644 (file)
@@ -70,7 +70,7 @@ public enum HyperlinkType {
         this.code = code;
     }
     
-    private static final Map<Integer, HyperlinkType> map = new HashMap<Integer, HyperlinkType>();
+    private static final Map<Integer, HyperlinkType> map = new HashMap<>();
     static {
         for (HyperlinkType type : values()) {
             map.put(type.getCode(), type);
index 671f84dff327387bb589d3569f2bab66845fc3a0..191b4e0041640abcccc0709240703ccb6d6a6e4a 100644 (file)
@@ -66,7 +66,7 @@ public enum FontGroup {
     private static NavigableMap<Integer,Range> UCS_RANGES;
 
     static {
-        UCS_RANGES = new TreeMap<Integer,Range>();
+        UCS_RANGES = new TreeMap<>();
         UCS_RANGES.put(0x0000,  new Range(0x007F, LATIN));
         UCS_RANGES.put(0x0080,  new Range(0x00A6, LATIN));
         UCS_RANGES.put(0x00A9,  new Range(0x00AF, LATIN));
@@ -111,7 +111,7 @@ public enum FontGroup {
      * @return the FontGroup
      */
     public static List<FontGroupRange> getFontGroupRanges(String runText) {
-        List<FontGroupRange> ttrList = new ArrayList<FontGroupRange>();
+        List<FontGroupRange> ttrList = new ArrayList<>();
         FontGroupRange ttrLast = null;
         final int rlen = (runText != null) ? runText.length() : 0;
         for(int cp, i = 0, charCount; i < rlen; i += charCount) {
index fa6851c5a0d4ddee480f490c1beb08c42f353225..6009b005221758c210069f45b2506a84be3326d8 100644 (file)
@@ -30,7 +30,7 @@ import org.apache.poi.util.LittleEndian;
  */
 public abstract class AbstractEscherOptRecord extends EscherRecord
 {
-    private List<EscherProperty> properties = new ArrayList<EscherProperty>();
+    private List<EscherProperty> properties = new ArrayList<>();
 
     /**
      * Add a property to this record.
@@ -176,7 +176,7 @@ public abstract class AbstractEscherOptRecord extends EscherRecord
 
     @Override
     protected Object[][] getAttributeMap() {
-        List<Object> attrList = new ArrayList<Object>(properties.size()*2+2);
+        List<Object> attrList = new ArrayList<>(properties.size() * 2 + 2);
         attrList.add("properties");
         attrList.add(properties.size());
         for ( EscherProperty property : properties ) {
index 4342708bfff7ea94062391462aed39fcb2f08019..954163cb60064e0f3073b7ddc4be536a6861538e 100644 (file)
@@ -108,7 +108,7 @@ public class DefaultEscherRecordFactory implements EscherRecordFactory {
      * @return The map containing the id/constructor pairs.
      */
     protected static Map<Short, Constructor<? extends EscherRecord>> recordsToMap(Class<?>[] recClasses) {
-        Map<Short, Constructor<? extends EscherRecord>> result = new HashMap<Short, Constructor<? extends EscherRecord>>();
+        Map<Short, Constructor<? extends EscherRecord>> result = new HashMap<>();
         final Class<?>[] EMPTY_CLASS_ARRAY = new Class[0];
 
         for (Class<?> recClass : recClasses) {
index 82ae37481c1a1f168da7a3ca41b4564d4238e599..d7889015d5b491c50a247f5831545db7ad7b5772 100644 (file)
@@ -68,7 +68,7 @@ public final class EscherContainerRecord extends EscherRecord implements Iterabl
      */
     private int _remainingLength;
 
-    private final List<EscherRecord> _childRecords = new ArrayList<EscherRecord>();
+    private final List<EscherRecord> _childRecords = new ArrayList<>();
 
     @Override
     public int fillFields(byte[] data, int pOffset, EscherRecordFactory recordFactory) {
@@ -148,7 +148,7 @@ public final class EscherContainerRecord extends EscherRecord implements Iterabl
      */
     @Override
     public List<EscherRecord> getChildRecords() {
-        return new ArrayList<EscherRecord>(_childRecords);
+        return new ArrayList<>(_childRecords);
     }
 
     /**
@@ -190,7 +190,7 @@ public final class EscherContainerRecord extends EscherRecord implements Iterabl
      * @return EscherContainer children
      */
     public List<EscherContainerRecord> getChildContainers() {
-        List<EscherContainerRecord> containers = new ArrayList<EscherContainerRecord>();
+        List<EscherContainerRecord> containers = new ArrayList<>();
         for (EscherRecord r : this) {
             if(r instanceof EscherContainerRecord) {
                 containers.add((EscherContainerRecord) r);
@@ -284,7 +284,7 @@ public final class EscherContainerRecord extends EscherRecord implements Iterabl
 
     @Override
     protected Object[][] getAttributeMap() {
-        List<Object> chList = new ArrayList<Object>(_childRecords.size()*2+2);
+        List<Object> chList = new ArrayList<>(_childRecords.size() * 2 + 2);
         chList.add("children");
         chList.add(_childRecords.size());
         int count = 0;
index 7ab5ea9d430d3918ace2ba240b6a2990cbaefe04..46e1aa8fcfae0ddbf13a5d4416b4a054c3891ab3 100644 (file)
@@ -39,7 +39,7 @@ public final class EscherDggRecord extends EscherRecord {
     // private int field_2_numIdClusters;
     private int field_3_numShapesSaved;
     private int field_4_drawingsSaved;
-    private final List<FileIdCluster> field_5_fileIdClusters = new ArrayList<FileIdCluster>();
+    private final List<FileIdCluster> field_5_fileIdClusters = new ArrayList<>();
     private int maxDgId;
 
     public static class FileIdCluster {
@@ -329,7 +329,7 @@ public final class EscherDggRecord extends EscherRecord {
     
     @Override
     protected Object[][] getAttributeMap() {
-        List<Object> fldIds = new ArrayList<Object>();
+        List<Object> fldIds = new ArrayList<>();
         fldIds.add("FileId Clusters");
         fldIds.add(field_5_fileIdClusters.size());
         for (FileIdCluster fic : field_5_fileIdClusters) {
index 955db365fa5f684eeb6a8c0b2f3c49f6636f5c5e..acff6241c2ee4100a03d9f6310005757c38464a3 100644 (file)
@@ -334,7 +334,7 @@ public final class EscherProperties {
        private static final Map<Short, EscherPropertyMetaData> properties = initProps();
 
        private static Map<Short, EscherPropertyMetaData> initProps() {
-               Map<Short, EscherPropertyMetaData> m = new HashMap<Short, EscherPropertyMetaData>();
+               Map<Short, EscherPropertyMetaData> m = new HashMap<>();
                addProp(m, TRANSFORM__ROTATION, "transform.rotation");
                addProp(m, PROTECTION__LOCKROTATION, "protection.lockrotation");
                addProp(m, PROTECTION__LOCKASPECTRATIO, "protection.lockaspectratio");
index 642c3056d17f48d2676905cd53133c6500f465bd..3b05034caf8b220e65cedc3b1b6384cdab31c602 100644 (file)
@@ -35,7 +35,7 @@ public final class EscherPropertyFactory {
      * @return                  The new properties
      */
     public List<EscherProperty> createProperties(byte[] data, int offset, short numProperties) {
-        List<EscherProperty> results = new ArrayList<EscherProperty>();
+        List<EscherProperty> results = new ArrayList<>();
 
         int pos = offset;
 
index f869d4a9e79315e3172e8308f8dc98386c0be358..07527cb960bb9b033b13cd45cdf87592b85c29cb 100644 (file)
@@ -135,7 +135,7 @@ public final class EscherTextboxRecord extends EscherRecord implements Cloneable
     @Override
     protected Object[][] getAttributeMap() {
         int numCh = getChildRecords().size();
-        List<Object> chLst = new ArrayList<Object>(numCh*2+2);
+        List<Object> chLst = new ArrayList<>(numCh * 2 + 2);
         chLst.add("children");
         chLst.add(numCh);
         for (EscherRecord er : getChildRecords()) {
index 55689e2a42988bddd8ee8941800cfd258f47f728..f722f87b65b4c8c63c464f5f3181abe9cfeb15ae 100644 (file)
@@ -35,7 +35,7 @@ public final class UnknownEscherRecord extends EscherRecord implements Cloneable
     private List<EscherRecord> _childRecords;
 
     public UnknownEscherRecord() {
-        _childRecords = new ArrayList<EscherRecord>();
+        _childRecords = new ArrayList<>();
     }
 
     @Override
@@ -139,7 +139,7 @@ public final class UnknownEscherRecord extends EscherRecord implements Cloneable
     @Override
     protected Object[][] getAttributeMap() {
         int numCh = getChildRecords().size();
-        List<Object> chLst = new ArrayList<Object>(numCh*2+2);
+        List<Object> chLst = new ArrayList<>(numCh * 2 + 2);
         chLst.add("children");
         chLst.add(numCh);
         for (EscherRecord er : _childRecords) {
index 6c96181e5f85862e30cd11954d516015c54fbdc8..5f895dc3752896ff1b9e99fc3e778816c2eb6f0c 100644 (file)
@@ -214,9 +214,9 @@ public class OLE2ExtractorFactory {
             throws IOException
     {
         // All the embedded directories we spotted
-        List<Entry> dirs = new ArrayList<Entry>();
+        List<Entry> dirs = new ArrayList<>();
         // For anything else not directly held in as a POIFS directory
-        List<InputStream> nonPOIFS = new ArrayList<InputStream>();
+        List<InputStream> nonPOIFS = new ArrayList<>();
 
         // Find all the embedded directories
         DirectoryEntry root = ext.getRoot();
@@ -250,7 +250,7 @@ public class OLE2ExtractorFactory {
             return new POITextExtractor[0];
         }
 
-        ArrayList<POITextExtractor> e = new ArrayList<POITextExtractor>();
+        ArrayList<POITextExtractor> e = new ArrayList<>();
         for (Entry dir : dirs) {
             e.add(createExtractor(
                     (DirectoryNode) dir
index 8652c3a44688af14633f2db756aac5e6521e596e..295251b8c2a3d4bf6a61d6f8ec9f9638523c4362 100644 (file)
@@ -70,12 +70,12 @@ public class CustomProperties implements Map<String,Object> {
     /**
      * The custom properties
      */
-    private final HashMap<Long,CustomProperty> props = new HashMap<Long,CustomProperty>();
+    private final HashMap<Long,CustomProperty> props = new HashMap<>();
     
     /**
      * Maps property IDs to property names and vice versa.
      */
-    private final TreeBidiMap<Long,String> dictionary = new TreeBidiMap<Long,String>();
+    private final TreeBidiMap<Long,String> dictionary = new TreeBidiMap<>();
 
     /**
      * Tells whether this object is pure or not.
@@ -219,7 +219,7 @@ public class CustomProperties implements Map<String,Object> {
      * @return the list of properties
      */
     public List<CustomProperty> properties() {
-        List<CustomProperty> list = new ArrayList<CustomProperty>(props.size());
+        List<CustomProperty> list = new ArrayList<>(props.size());
         for (Long l : dictionary.keySet()) {
             list.add(props.get(l));
         }
@@ -231,7 +231,7 @@ public class CustomProperties implements Map<String,Object> {
      */
     @Override
     public Collection<Object> values() {
-        List<Object> list = new ArrayList<Object>(props.size());
+        List<Object> list = new ArrayList<>(props.size());
         for (Long l : dictionary.keySet()) {
             list.add(props.get(l).getValue());
         }
@@ -240,7 +240,7 @@ public class CustomProperties implements Map<String,Object> {
 
     @Override
     public Set<Entry<String, Object>> entrySet() {
-        Map<String,Object> set = new LinkedHashMap<String,Object>(props.size());
+        Map<String,Object> set = new LinkedHashMap<>(props.size());
         for (Entry<Long,String> se : dictionary.entrySet()) {
             set.put(se.getValue(), props.get(se.getKey()).getValue());
         }
index 7d86a2b0f3ee7cf8d873d623f4f18810078c01a4..f10dcc938f77e845e57abbe75e3b7550f9b6e3ff 100644 (file)
@@ -825,7 +825,7 @@ public class DocumentSummaryInformation extends PropertySet {
             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) {
index 1097b71e48f2189bce0d0127eb3cbd7ac65c0838..3f6731c51d0b605e64708b80bdd6578bbca409af 100644 (file)
@@ -83,7 +83,7 @@ public class HPSFPropertiesOnlyDocument extends POIDocument {
     
     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);
index dd6d7e737fcfe89d200f5d59c03be4177c9befd6..0f5fbdbf6c7d352659022b2d21696ab3ac76da9c 100644 (file)
@@ -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<>();
 
     
     /**
index 4f62eab80c7ffa50a2a4c4b3714dacdde811d538..8ffa541e4d00c84d8dfd5fc1cabd95e9edd487e2 100644 (file)
@@ -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);
 
index ba67252d63b08f632670ddbe0e6e807244a32bbd..32fc8aba8956155906b7c60d327ef35de4b96ce0 100644 (file)
@@ -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]);
index 373d5df392bf435cbe425a92e9305597e97cfba7..cf5cadb0b8a67934e17e52a7f1c6587063b6c6d4 100644 (file)
@@ -105,7 +105,7 @@ public class VariantSupport extends Variant {
         if (isLogUnsupportedTypes())
         {
             if (unsupportedMessage == null) {
-                unsupportedMessage = new LinkedList<Long>();
+                unsupportedMessage = new LinkedList<>();
             }
             Long vt = Long.valueOf(ex.getVariantType());
             if (!unsupportedMessage.contains(vt))
index 80c856563129d3d08b9e99a11a595cdf0b792ecd..889c378f0b5c462fb2fad8b6851b6aa676a7d3ea 100644 (file)
@@ -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);
index b3aaa87a3c8a09bb6663b5a4538b124633616f6b..c103a40678fb7006cf182388fb65897a116a2ce0 100644 (file)
@@ -420,7 +420,7 @@ public class PropertyIDMap implements Map<Long,String> {
      * @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]);
         }
index d8e660f31c70e5e0676ddea8cbfd0b5fd6524e38..07fb6af4eae96319db626f30ac14b7cff1df1abe 100644 (file)
@@ -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);
index 9af5104430b51684ee1f15ba7b1ed068ec1cd00e..0a9f78b0c369f25513aaca86cddbd0878c44a436 100644 (file)
@@ -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()) {
index e7671e3f846f05b49735c345026a2a6255d5b3f9..09b57dedb88c938e39f58180928dedc657049c84 100644 (file)
@@ -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) {
index ed0f8f2469cd07c4bcf09c8431cb00dbc4aea6c5..f55189ea7d8f861a0cd95e5632301fec8b637039 100644 (file)
@@ -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) {
index de9814e3a2a6cfc53b6a61471aa59a1cd18e14be..3fef4d1e7ef304d56ea0f8703a8ee66637188797 100644 (file)
@@ -45,8 +45,8 @@ public class FormatTrackingHSSFListener implements HSSFListener {
        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
index 64c11aa65e772f90fc060d099702fa4c419df355..62c656ed088e52391dac77b13c496273a5d9ef7d 100644 (file)
@@ -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);
index 1b6b93434b75f2317cae67f75e2e4e4a8e136b1e..f83cc9c47c093b83b435105348de7e3708b05b1b 100644 (file)
@@ -171,7 +171,7 @@ public class EventBasedExcelExtractor extends POIOLE2TextExtractor implements or
        private int nextRow = -1;
 
        public TextListener() {
-           sheetNames = new ArrayList<String>();
+           sheetNames = new ArrayList<>();
        }
        public void processRecord(Record record) {
            String thisText = null;
index f8a66f71a42be79e01ae1c86d0ebe22bf1119191..48356442bbb59efecdc02cd1483af9849b0513f7 100644 (file)
@@ -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 ) {
index be21dff69512cf33a30d36681b61711e58adc0c8..650b4de2704c14eb67169cb7cc96ec089ef950f9 100644 (file)
@@ -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) {
index 72aa94696c57c376e5c2555a4791497f738398a8..44c5fb009dc3da67f8aaaa2f01df2e70c41cd8b5 100644 (file)
@@ -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;
 
index 3e12384e9d93f8a95b7481ecefc73fbc9004b21e..0dc7f53eb971ae294894fae51ceadfdcc41947d0 100644 (file)
@@ -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),
                };
index 0bc7e2919a32a44231a2f79ff221d59a002e9e79..cf8becadc56ce40a3c3309ef6ad3c2701207ae2c 100644 (file)
@@ -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())) {
index 28c1e519b5a603ab37fddad1e4c707bd6028db72..9171dba68b80ecd2497478525170b9364d3a0884 100644 (file)
@@ -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;
index 65ed15d7099e2c68fa30018f1dee0a265b4d0988..f97e60e1957203f4095df406b63db6f655a229b6 100644 (file)
@@ -47,12 +47,12 @@ public abstract class AbstractEscherHolderRecord extends Record implements Clone
 
     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 {
index 033b4a25a618de8c123aad9c31bd20db54d570d5..7fdf83f55af125e146625184c49c2860505600de 100644 (file)
@@ -295,12 +295,12 @@ public final class EscherAggregate extends AbstractEscherHolderRecord {
     /**
      * 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 extends AbstractEscherHolderRecord {
     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 extends AbstractEscherHolderRecord {
         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 extends AbstractEscherHolderRecord {
         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() {
index 3732fd52a5f27f0e92ae3684098ae926faf64b84..8660d978957b661919b1ff030f8eb592822c9c34 100644 (file)
@@ -93,7 +93,7 @@ public final class ExtSSTRecord extends ContinuableRecord {
         _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);
index 0a75e9c896f2e7ca5423718b3123543585df2afb..ae429bd87c1d2f0d2b576320ded8058b2370873b 100644 (file)
@@ -87,11 +87,11 @@ public class ExternSheetRecord extends StandardRecord {
        
        
        public ExternSheetRecord() {
-               _list = new ArrayList<RefSubRecord>();
+               _list = new ArrayList<>();
        }
 
        public ExternSheetRecord(RecordInputStream in) {
-               _list = new ArrayList<RefSubRecord>();
+               _list = new ArrayList<>();
                
                int nItems  = in.readShort();
                
index da310f415bf1e9c75821c4e8558e1c072c4153b9..e41e6cbc27649546ee4d94f0c28469b734f982a3 100644 (file)
@@ -51,7 +51,7 @@ public final class ObjRecord extends Record implements Cloneable {
 
 
        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 Record implements Cloneable {
                }
         */
 
-               subrecords = new ArrayList<SubRecord>();
+               subrecords = new ArrayList<>();
                ByteArrayInputStream bais = new ByteArrayInputStream(subRecordData);
                LittleEndianInputStream subRecStream = new LittleEndianInputStream(bais);
                CommonObjectDataSubRecord cmo = (CommonObjectDataSubRecord)SubRecord.createSubRecord(subRecStream, 0);
index fe182d05c083efa0d316e4ee2606f6f2b038c187..9e053918bd90960529aa517939a1be403a153a5b 100644 (file)
@@ -77,15 +77,15 @@ public abstract class PageBreakRecord extends StandardRecord {
     }
 
     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);
index 0741bb27a6c7f7ad3e510b28a762247f9b0787e6..162c67c514adc883bd0ade25ef25211db1f10594 100644 (file)
@@ -39,7 +39,7 @@ public final class PaletteRecord extends StandardRecord {
 
     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 StandardRecord {
 
     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));
        }
index 8e994d8dd475a16f1e60492128ce3b7515d9a53f..8b5c0224c121dc834706b93117ad200bdfff0b0a 100644 (file)
@@ -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);
 
index 7ec0c83dc19929f427de2d53a5f928707ecd2cfc..2bd79d642776619db29498209053fc3a82be2154 100644 (file)
@@ -183,7 +183,7 @@ public final class RecordFactoryInputStream {
         */
        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);
index 43f42defd18eab76fce51cfbb61597b3e4d04c8c..20d99319d664ad9fc78d801aa3a06f128624161f 100644 (file)
@@ -68,7 +68,7 @@ public final class SSTRecord extends ContinuableRecord {
     {
         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 ContinuableRecord {
         // 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,
index 1a516f31794626ff30bd245dcf40f44cea812a71..87cb834633c5be6729ee7c4724815764cc371cf3 100644 (file)
@@ -72,7 +72,7 @@ public final class CFRecordsAggregate extends RecordAggregate {
             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 extends RecordAggregate {
     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) {
index 5df1993e4cc28f0399342c698299395d71904618..2196c89d4b471419e0b5399fde15ea9f92731dde 100644 (file)
@@ -38,7 +38,7 @@ public final class ChartSubstreamRecordAggregate extends RecordAggregate {
 
        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) {
index 7c02b8bb10192c5fd57423d628ac97f356cfe393..4e9a2991864d1d0e57d2ae5b250a2c23dcd2de53 100644 (file)
@@ -52,7 +52,7 @@ public final class ColumnInfoRecordsAggregate extends RecordAggregate implements
         * Creates an empty aggregate
         */
        public ColumnInfoRecordsAggregate() {
-               records = new ArrayList<ColumnInfoRecord>();
+               records = new ArrayList<>();
        }
        public ColumnInfoRecordsAggregate(RecordStream rs) {
                this();
index cfbd36995dfbf799bee9589ae6d942cc18e18993..625cc9a6ac0be29454a19b0dd462b6e68b7fc032 100644 (file)
@@ -37,12 +37,12 @@ public final class ConditionalFormattingTable extends RecordAggregate {
         * 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));
index 7018eec63f85c53758dfee6da643d5e68593c080..85758fc84588ba90ed45255634346269d03fbaee 100644 (file)
@@ -42,7 +42,7 @@ public final class CustomViewSettingsRecordAggregate extends RecordAggregate {
                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) {
index a4bb38adad3f0710603f4b7626718eb547cbfa0d..654abaf41fefaffbb021897bc03ac37743d0a3ac 100644 (file)
@@ -39,7 +39,7 @@ public final class DataValidityTable extends RecordAggregate {
 
        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 extends RecordAggregate {
 
        public DataValidityTable() {
                _headerRec = new DVALRecord();
-               _validationList = new ArrayList<DVRecord>();
+               _validationList = new ArrayList<>();
        }
 
        public void visitContainedRecords(RecordVisitor rv) {
index cc59338a5e109ff851a15bb7706568e45bf430bc..e7859a087a08f916ac63960f66361b225073e929 100644 (file)
@@ -38,7 +38,7 @@ public final class MergedCellsTable extends RecordAggregate {
         * Creates an empty aggregate
         */
        public MergedCellsTable() {
-               _mergedRegions = new ArrayList<CellRangeAddress>();
+               _mergedRegions = new ArrayList<>();
        }
 
        /**
index 73531fe48aefe5fedc33d0a0be5815de4e620964..0c4d5b421464a2c76fe8fb7f12062a174d45c8dc 100644 (file)
@@ -52,7 +52,7 @@ public final class PageSettingsBlock extends RecordAggregate {
         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 extends RecordAggregate {
      * 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 extends RecordAggregate {
      * 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 extends RecordAggregate {
     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 extends RecordAggregate {
     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);
index d1c12e0fceca60e7170cd36e8c68cabcc8c998ed..e32a74ba42228d678029e7d83c7d284842975f45 100644 (file)
@@ -53,9 +53,9 @@ public final class RowRecordsAggregate extends RecordAggregate {
         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;
     }
 
index 5d36fdfb6b921b8413fc5327a373681cf7b849b9..ed5b7ecb3acc1500e7ac097a8140c406d7bcf1ed 100644 (file)
@@ -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);
             }
index 0bfa6b406e5530e6b30168882296dd18a29b699b..818e65087b340bcaf47a5f1e799bb2303172c51a 100644 (file)
@@ -464,7 +464,7 @@ public class UnicodeString implements Comparable<UnicodeString> {
         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 Comparable<UnicodeString> {
      */
     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 Comparable<UnicodeString> {
         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));
           }
index f589f02cb93d8bea5fa978281a6974de360c95d7..23cd17a823f243f8e4e94dfadd4341a00238c5e2 100644 (file)
@@ -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.
index 29bcf5ac4ba069507cd80ee8d9861396d6469d43..dd049d2933b317f6afb2ced22218c76f3416bb5a 100644 (file)
@@ -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.
index 03f444751a84ac5c9651574d18e0a287535be627..120af40ea9a0d6cdb72316ff081199ff006e3292 100644 (file)
@@ -116,8 +116,8 @@ public final class HSSFCellStyle implements CellStyle {
             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
index b6276f0ba0d85715db5eaa14f9d2e5911f2f00f7..09284dcb903705f153805d4eac9144f78dc6ebb7 100644 (file)
@@ -42,7 +42,7 @@ import org.apache.poi.ss.usermodel.DataFormat;
 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
index d28b7fd7ea47094fbb7dcf4347a55fd0b0991d8e..be1f3044f290fdf1735487a893ece0d4b913d9ab 100644 (file)
@@ -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) {
index 0b916aa87a8dbf96dd36a381de558b40d7f16ba6..3c4385ab605165629fe91f817c3e8787d905ab6d 100644 (file)
@@ -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 implements HSSFShapeContainer, Drawing<HSSFShap
         /**
          * 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 implements HSSFShapeContainer, Drawing<HSSFShap
      */
     @Override
     public void clear() {
-        ArrayList <HSSFShape> copy = new ArrayList<HSSFShape>(_shapes);
+        ArrayList <HSSFShape> copy = new ArrayList<>(_shapes);
         for (HSSFShape shape: copy){
             removeShape(shape);
         }
index 4c97d6f0cd78ed6b899047c90381c657a6672faf..69036df6f1cccee2c76d20986434f9ab792b3f95 100644 (file)
@@ -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 HSSFShape implements HSSFShapeContainer {
     }
 
     public void clear() {
-        ArrayList <HSSFShape> copy = new ArrayList<HSSFShape>(shapes);
+        ArrayList <HSSFShape> copy = new ArrayList<>(shapes);
         for (HSSFShape shape: copy){
             removeShape(shape);
         }
index 3a01126d433163dbf5214934218f6bef72152aec..4f886d299fa66766f69d6d3cba4023a3c114f67d 100644 (file)
@@ -124,7 +124,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
      */
     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 org.apache.poi.ss.usermodel.Sheet {
      */
     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 org.apache.poi.ss.usermodel.Sheet {
     @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 org.apache.poi.ss.usermodel.Sheet {
      */
     @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 org.apache.poi.ss.usermodel.Sheet {
      */
     @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 org.apache.poi.ss.usermodel.Sheet {
      */
     @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 org.apache.poi.ss.usermodel.Sheet {
         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 org.apache.poi.ss.usermodel.Sheet {
             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 org.apache.poi.ss.usermodel.Sheet {
                     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));
index 69610c5a739b213ce1f8d88eda9e8b879e42ffa0..861f3fff5f4f32ef5326d9d1559cc009e5a0a0f8 100644 (file)
@@ -217,8 +217,8 @@ public final class HSSFWorkbook extends POIDocument implements org.apache.poi.ss
     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 POIDocument implements org.apache.poi.ss
             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 POIDocument implements org.apache.poi.ss
      * @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 POIDocument implements org.apache.poi.ss
             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 POIDocument implements org.apache.poi.ss
      * @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 POIDocument implements org.apache.poi.ss
      */
     @Override
     public Iterator<Sheet> sheetIterator() {
-        return new SheetIterator<Sheet>();
+        return new SheetIterator<>();
     }
 
     /**
@@ -1235,7 +1235,7 @@ public final class HSSFWorkbook extends POIDocument implements org.apache.poi.ss
     @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 POIDocument implements org.apache.poi.ss
      *  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 POIDocument implements org.apache.poi.ss
     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 POIDocument implements org.apache.poi.ss
 
         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 POIDocument implements org.apache.poi.ss
 
     @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 POIDocument implements org.apache.poi.ss
     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 POIDocument implements org.apache.poi.ss
     }
 
     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 POIDocument implements org.apache.poi.ss
      */
     public List<HSSFObjectData> getAllEmbeddedObjects()
     {
-        List<HSSFObjectData> objects = new ArrayList<HSSFObjectData>();
+        List<HSSFObjectData> objects = new ArrayList<>();
         for (HSSFSheet sheet : _sheets)
         {
             getAllEmbeddedObjects(sheet, objects);
index fcfd23f17804d2db63402731de7745cad5e3203f..361d8a8c1c209035a6465831f962eceffe05a51d 100644 (file)
@@ -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() {}
        
index b2f3c9c1b071d9d9c5c27a3a6d9375e35d3ea02f..1490abf791f33ea540d23a587b91e51cc6ba05f1 100644 (file)
@@ -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);
index e7ca949e798be21d711805a734d0ec5843d854e4..d7bb427cba4778e4f19d4729c5d24ab4d9705eff 100644 (file)
@@ -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.
index 2dec4160347923474ac84d2bcd53164855cc3180..21059970683ecf33f83250c060474875947cbf24 100644 (file)
@@ -128,7 +128,7 @@ public class CryptoAPIEncryptor extends Encryptor implements Cloneable {
         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()) {
index 84f2a54632d979d1e8d3fc9f162557e7635717e0..dc4dd547ccebab4fddef085671c2607a93e41d72 100644 (file)
@@ -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)
         {
index 1ea85f7c81f12f81a35d65b2e78f4df2bfdbc5fd..0a6c29bd9ffcbfa12e138fb5baa92032031a5bc9 100644 (file)
@@ -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));
 
index b38881021b0e90c89934aaa86fd50a79d1c51d34..9497711e703a4394b7e77c91748703561b2268cf 100644 (file)
@@ -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();
index fa49ae490081bb018e4d76fdfd1cf051896209b9..19143fd745c7e0ae1d0f7e1a620d0bd6558e9a3d 100644 (file)
@@ -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) {
index 3d9b9c6615640545b36dec7bc51ffc056db7cb82..e2ba3dc3bd7d85443aa315e9750f67a88fd15b2b 100644 (file)
@@ -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();
index 3296ddb8888df6b85f1829f8414e36bb4feb5918..9d621dd8b141632c645982b99c9b336c9baf863b 100644 (file)
@@ -64,8 +64,8 @@ public class FilteringDirectoryNode implements DirectoryEntry
       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 implements DirectoryEntry
             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 implements DirectoryEntry
    }
    
    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);
index fdd8647a72ae3521435985c15ea8647d7f02bee6..7429fb58d550481d552067123211439810202f14 100644 (file)
@@ -97,9 +97,9 @@ public class NPOIFSFileSystem extends BlockStore
     {
         _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 BlockStore
        
        // 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++) {
index a7479f319405c7fa8869b43d8d2d4a5b72d52bd1..8ad74a016317a0f611bedabe02b47e05080c2d62 100644 (file)
@@ -149,7 +149,7 @@ public final class OPOIFSDocument implements BATManaged, BlockWritable, POIFSVie
         * @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;
index 071288c2ac062cf5884c13e519f38c71fcf8e0ae..925fcbaefd77c9ca3a3474abd7ed3dd5597c5cdb 100644 (file)
@@ -88,7 +88,7 @@ public class OPOIFSFileSystem
     {
         HeaderBlock header_block = new HeaderBlock(bigBlockSize);
         _property_table = new PropertyTable(header_block);
-        _documents      = new ArrayList<OPOIFSDocument>();
+        _documents      = new ArrayList<>();
         _root           = null;
     }
 
@@ -309,7 +309,7 @@ public class OPOIFSFileSystem
 
         // create a list of BATManaged objects: the documents plus the
         // property table and the small block table
-        List<Object> bm_objects = new ArrayList<Object>();
+        List<Object> bm_objects = new ArrayList<>();
 
         bm_objects.addAll(_documents);
         bm_objects.add(_property_table);
@@ -362,7 +362,7 @@ public class OPOIFSFileSystem
         // property table, the small block store, the small block
         // allocation table, the block allocation table, and the
         // extended block allocation table blocks)
-        List<Object> writers = new ArrayList<Object>();
+        List<Object> writers = new ArrayList<>();
 
         writers.add(header_block_writer);
         writers.addAll(_documents);
index a0a19908957fb8ee4ab222e9c09cc26153511c7e..bdcd838313a4566f29c58c413372436bb3fc1e43 100644 (file)
@@ -125,7 +125,7 @@ public class VBAMacroReader implements Closeable {
         final ModuleMap modules = new ModuleMap();
         findMacros(fs.getRoot(), modules);
         
-        Map<String, String> moduleSources = new HashMap<String, String>();
+        Map<String, String> moduleSources = new HashMap<>();
         for (Map.Entry<String, Module> entry : modules.entrySet()) {
             Module module = entry.getValue();
             if (module.buf != null && module.buf.length > 0) { // Skip empty modules
index 69f361791014d512fc87f8c3ded152903758c219..88094f2e62342a3c242495b30f55652795e29ccb 100644 (file)
@@ -54,7 +54,7 @@ public class FileBackedDataSource extends DataSource {
    // See https://bz.apache.org/bugzilla/show_bug.cgi?id=58480, 
    // http://stackoverflow.com/questions/3602783/file-access-synchronized-on-java-object and
    // http://bugs.java.com/view_bug.do?bug_id=4724038 for related discussions
-   private List<ByteBuffer> buffersToClean = new ArrayList<ByteBuffer>();
+   private List<ByteBuffer> buffersToClean = new ArrayList<>();
 
    public FileBackedDataSource(File file) throws FileNotFoundException {
        this(newSrcFile(file, "r"), true);
index ef4ff3499c8fa3aa528fc4af36db7e9a5d912ad0..12d0cc855dd00ed473be4033f51007a7d5c9c1b0 100644 (file)
@@ -46,8 +46,8 @@ public class DirectoryProperty extends Property implements Parent, Iterable<Prop
     public DirectoryProperty(String name)
     {
         super();
-        _children       = new ArrayList<Property>();
-        _children_names = new HashSet<String>();
+        _children       = new ArrayList<>();
+        _children_names = new HashSet<>();
         setName(name);
         setSize(0);
         setPropertyType(PropertyConstants.DIRECTORY_TYPE);
@@ -66,8 +66,8 @@ public class DirectoryProperty extends Property implements Parent, Iterable<Prop
                                 final int offset)
     {
         super(index, array, offset);
-        _children       = new ArrayList<Property>();
-        _children_names = new HashSet<String>();
+        _children       = new ArrayList<>();
+        _children_names = new HashSet<>();
     }
 
     /**
index 12b4ffe194e3022d54c19df03f6c5725c5a0e422..fe948baf2c6c3a411c7faea23ff7b7548e71b341 100644 (file)
@@ -76,7 +76,7 @@ public final class NPropertyTable extends PropertyTableBase {
     private static List<Property> buildProperties(final Iterator<ByteBuffer> dataSource,
           final POIFSBigBlockSize bigBlockSize) throws IOException
     {
-       List<Property> properties = new ArrayList<Property>();
+       List<Property> properties = new ArrayList<>();
        while(dataSource.hasNext()) {
           ByteBuffer bb = dataSource.next();
           
@@ -126,7 +126,7 @@ public final class NPropertyTable extends PropertyTableBase {
      * Prepare to be written
      */
     public void preWrite() {
-        List<Property> pList = new ArrayList<Property>();
+        List<Property> pList = new ArrayList<>();
         // give each property its index
         int i=0;
         for (Property p : _properties) {
index df3dcba294e9cd03d49c450156bc0196200fce5e..1fdf9246823875d0303e1d3c389c7cc6fe07b451 100644 (file)
@@ -57,7 +57,7 @@ class PropertyFactory {
     static List<Property> convertToProperties(ListManagedBlock [] blocks)
         throws IOException
     {
-        List<Property> properties = new ArrayList<Property>();
+        List<Property> properties = new ArrayList<>();
 
         for (ListManagedBlock block : blocks) {
             byte[] data = block.getData();
index 82f57bf724849a256adabbaaee85549034e52d0f..a4ed5ace9012048e549a5fdb4511a600952386f6 100644 (file)
@@ -44,7 +44,7 @@ public abstract class PropertyTableBase implements BATManaged {
     public PropertyTableBase(final HeaderBlock header_block)
     {
         _header_block = header_block;
-        _properties  = new ArrayList<Property>();
+        _properties  = new ArrayList<>();
         addProperty(new RootProperty());
     }
 
@@ -110,7 +110,7 @@ public abstract class PropertyTableBase implements BATManaged {
             // property has no children
             return;
         }
-        Stack<Property> children = new Stack<Property>();
+        Stack<Property> children = new Stack<>();
 
         children.push(_properties.get(index));
         while (!children.empty())
index b96ec2088608d06a8eb997410e29e710f9e51ef0..50341b33c8f59c65727e5e7afb538d25740b4172 100644 (file)
@@ -206,7 +206,7 @@ public final class BlockAllocationTableReader {
      */
     ListManagedBlock[] fetchBlocks(int startBlock, int headerPropertiesStartBlock,
             BlockList blockList) throws IOException {
-        List<ListManagedBlock> blocks = new ArrayList<ListManagedBlock>();
+        List<ListManagedBlock> blocks = new ArrayList<>();
         int  currentBlock = startBlock;
         boolean firstPass = true;
         ListManagedBlock dataBlock = null;
index eb8bcc085c40ca7d7acfde0ffef4236015967c49..fd468b648691eba67fc569019d1d7b86e295ce99 100644 (file)
@@ -48,7 +48,7 @@ public class RawDataBlockList
     public RawDataBlockList(final InputStream stream, POIFSBigBlockSize bigBlockSize)
         throws IOException
     {
-        List<RawDataBlock> blocks = new ArrayList<RawDataBlock>();
+        List<RawDataBlock> blocks = new ArrayList<>();
 
         while (true)
         {
index 9c98bb45955bb8a0e08fef22206300c7ff53ef95..3d2b16fe5b07c05d706d27c7987f49001c812a2d 100644 (file)
@@ -55,7 +55,7 @@ public class SmallBlockTableWriter
                                  final RootProperty root)
     {
         _sbat         = new BlockAllocationTableWriter(bigBlockSize);
-        _small_blocks = new ArrayList<SmallDocumentBlock>();
+        _small_blocks = new ArrayList<>();
         _root         = root;
 
         for (OPOIFSDocument doc : documents)
index d09bf9ecf5e59168bc0e8a0bfbc94bd07e7c087e..711a2d56a300debcbe7b798097873b072b4d7351 100644 (file)
@@ -171,7 +171,7 @@ public final class SmallDocumentBlock implements BlockWritable, ListManagedBlock
     {
         int _blocks_per_big_block = getBlocksPerBigBlock(bigBlockSize);
         
-        List<SmallDocumentBlock> sdbs = new ArrayList<SmallDocumentBlock>();
+        List<SmallDocumentBlock> sdbs = new ArrayList<>();
 
         for (int j = 0; j < blocks.length; j++)
         {
index 631b51e0c3c1e217e9f6706e48593ab481364b61..98c41ed993c697800e04c1dd67b001926d5a12b0 100644 (file)
@@ -43,7 +43,7 @@ import org.apache.poi.sl.usermodel.TextShape;
 import org.apache.poi.util.JvmBugs;
 
 public class DrawFactory {
-    protected static final ThreadLocal<DrawFactory> defaultFactory = new ThreadLocal<DrawFactory>();
+    protected static final ThreadLocal<DrawFactory> defaultFactory = new ThreadLocal<>();
 
     /**
      * Set a custom draw factory for the current thread.
@@ -224,7 +224,7 @@ public class DrawFactory {
         @SuppressWarnings("unchecked")
         Map<String,String> fontMap = (Map<String,String>)graphics.getRenderingHint(Drawable.FONT_MAP);
         if (fontMap == null) {
-            fontMap = new HashMap<String,String>();
+            fontMap = new HashMap<>();
             graphics.setRenderingHint(Drawable.FONT_MAP, fontMap);
         }
         
index cecf2e9c668fdeb7629ae8dc8044b0837d49e04b..6eb60dfb52e24e55f6bbf49040655ab4fef84869 100644 (file)
@@ -34,7 +34,7 @@ public class DrawFreeformShape extends DrawAutoShape {
     }
 
     protected Collection<Outline> computeOutlines(Graphics2D graphics) {
-        List<Outline> lst = new ArrayList<Outline>();
+        List<Outline> lst = new ArrayList<>();
         FreeformShape<?,?> fsh = (FreeformShape<?, ?>) getShape();
         Path2D sh = fsh.getPath();
 
index 912cf3e7a09e56725f164b2e5c50bd1d617b4567..c5abefa4c593dc26ec86e22db658b7f88f536b22 100644 (file)
@@ -119,7 +119,7 @@ public class DrawSimpleShape extends DrawShape {
         }
         graphics.setPaint(line);
 
-        List<Outline> lst = new ArrayList<Outline>();
+        List<Outline> lst = new ArrayList<>();
         LineDecoration deco = getShape().getLineDecoration();
         Outline head = getHeadDecoration(graphics, deco, stroke);
         if (head != null) {
@@ -347,7 +347,7 @@ public class DrawSimpleShape extends DrawShape {
             : (Map<String, CustomGeometry>)graphics.getRenderingHint(Drawable.PRESET_GEOMETRY_CACHE);
 
         if (presets == null) {
-            presets = new HashMap<String,CustomGeometry>();
+            presets = new HashMap<>();
             if (graphics != null) {
                 graphics.setRenderingHint(Drawable.PRESET_GEOMETRY_CACHE, presets);
             }
@@ -398,7 +398,7 @@ public class DrawSimpleShape extends DrawShape {
     protected Collection<Outline> computeOutlines(Graphics2D graphics) {
         final SimpleShape<?,?> sh = getShape();
 
-        List<Outline> lst = new ArrayList<Outline>();
+        List<Outline> lst = new ArrayList<>();
         CustomGeometry geom = sh.getGeometry();
         if(geom == null) {
             return lst;
index c3c13288670193c366933c59262006cb9272f307..bec5d898f4eff383d0b4d51b7a9a97702806decb 100644 (file)
@@ -67,7 +67,7 @@ public class DrawTextParagraph implements Drawable {
 
     protected TextParagraph<?,?,?> paragraph;
     double x, y;
-    protected List<DrawTextFragment> lines = new ArrayList<DrawTextFragment>();
+    protected List<DrawTextFragment> lines = new ArrayList<>();
     protected String rawText;
     protected DrawTextFragment bullet;
     protected int autoNbrIdx;
@@ -563,7 +563,7 @@ public class DrawTextParagraph implements Drawable {
     }
 
     protected AttributedString getAttributedString(Graphics2D graphics, StringBuilder text){
-        List<AttributedStringData> attList = new ArrayList<AttributedStringData>();
+        List<AttributedStringData> attList = new ArrayList<>();
         if (text == null) {
             text = new StringBuilder();
         }
index 0ca4ce53713e6a349318812d85bdc6f80a478275..e86e38e7632064a2882b50f3dd652d38757cf1b6 100644 (file)
@@ -83,7 +83,7 @@ public class CTAdjustHandleList {
      */
     public List<Object> getAhXYOrAhPolar() {
         if (ahXYOrAhPolar == null) {
-            ahXYOrAhPolar = new ArrayList<Object>();
+            ahXYOrAhPolar = new ArrayList<>();
         }
         return this.ahXYOrAhPolar;
     }
index e0d281e28c86fe02917331f4ff4fc83bddba803e..7746d2c685a55535e3fbcba3eccc11974e19db17 100644 (file)
@@ -90,7 +90,7 @@ public class CTColorMRU {
      */
     public List<Object> getEGColorChoice() {
         if (egColorChoice == null) {
-            egColorChoice = new ArrayList<Object>();
+            egColorChoice = new ArrayList<>();
         }
         return this.egColorChoice;
     }
index 0ae1ee14e611b49b1ca8d81bac33cbcbb8a84909..067bd1185cf5cc244cabb8a20915a68b92c32fbe 100644 (file)
@@ -77,7 +77,7 @@ public class CTConnectionSiteList {
      */
     public List<CTConnectionSite> getCxn() {
         if (cxn == null) {
-            cxn = new ArrayList<CTConnectionSite>();
+            cxn = new ArrayList<>();
         }
         return this.cxn;
     }
index 96886d49bb5bbfd70c243c318029163a4257e0b1..8e9df371e11208454438f548e1c892804020a815 100644 (file)
@@ -77,7 +77,7 @@ public class CTGeomGuideList {
      */
     public List<CTGeomGuide> getGd() {
         if (gd == null) {
-            gd = new ArrayList<CTGeomGuide>();
+            gd = new ArrayList<>();
         }
         return this.gd;
     }
index 3d9f376072826709b6a1f147e7efbbe175af68d9..ee9033cdca1a2eb5f7375b742c33e0e40eb9c8b9 100644 (file)
@@ -145,7 +145,7 @@ public class CTHslColor {
      */
     public List<JAXBElement<?>> getEGColorTransform() {
         if (egColorTransform == null) {
-            egColorTransform = new ArrayList<JAXBElement<?>>();
+            egColorTransform = new ArrayList<>();
         }
         return this.egColorTransform;
     }
index 4dd5021adc5eab04072ecea88d5fd6b8dc272bea..f0d970f43bc98e6f23d6936f654d5b00e3e6e124 100644 (file)
@@ -77,7 +77,7 @@ public class CTOfficeArtExtensionList {
      */
     public List<CTOfficeArtExtension> getExt() {
         if (ext == null) {
-            ext = new ArrayList<CTOfficeArtExtension>();
+            ext = new ArrayList<>();
         }
         return this.ext;
     }
index 6b1ba0272928e1b89c3e4b046d59f2d7a1851727..740e9d8907b81eeebb3f5cba532bb571f143ad51 100644 (file)
@@ -111,7 +111,7 @@ public class CTPath2D {
      */
     public List<Object> getCloseOrMoveToOrLnTo() {
         if (closeOrMoveToOrLnTo == null) {
-            closeOrMoveToOrLnTo = new ArrayList<Object>();
+            closeOrMoveToOrLnTo = new ArrayList<>();
         }
         return this.closeOrMoveToOrLnTo;
     }
index b6042366fbe4647a70cb1022643f7bf47467a47f..603f26f00880c5686f3d1bf488a6ec4c2e4eedac 100644 (file)
@@ -77,7 +77,7 @@ public class CTPath2DCubicBezierTo {
      */
     public List<CTAdjPoint2D> getPt() {
         if (pt == null) {
-            pt = new ArrayList<CTAdjPoint2D>();
+            pt = new ArrayList<>();
         }
         return this.pt;
     }
index 4abc906eb0d27d4fcf8546796b49bacab9b511e6..2ff060ac0575a92c641e0d1a9a753d9ec470261e 100644 (file)
@@ -77,7 +77,7 @@ public class CTPath2DList {
      */
     public List<CTPath2D> getPath() {
         if (path == null) {
-            path = new ArrayList<CTPath2D>();
+            path = new ArrayList<>();
         }
         return this.path;
     }
index 06f308204775089813796599dc89f8be1b675348..220e0aa05a605b068e1de97fc1eaeb112aa38ba0 100644 (file)
@@ -77,7 +77,7 @@ public class CTPath2DQuadBezierTo {
      */
     public List<CTAdjPoint2D> getPt() {
         if (pt == null) {
-            pt = new ArrayList<CTAdjPoint2D>();
+            pt = new ArrayList<>();
         }
         return this.pt;
     }
index b1bc857f53660e22b8982647d2a75d012ecd08a0..aa88ff03a1ff6b3610f4046dec3e65960048009f 100644 (file)
@@ -139,7 +139,7 @@ public class CTPresetColor {
      */
     public List<JAXBElement<?>> getEGColorTransform() {
         if (egColorTransform == null) {
-            egColorTransform = new ArrayList<JAXBElement<?>>();
+            egColorTransform = new ArrayList<>();
         }
         return this.egColorTransform;
     }
index be4d49b276f88a23733d0b25f45fd20a6172c77f..71909e6625d08362b4ad45fb5b37a1a8925a0f1b 100644 (file)
@@ -142,7 +142,7 @@ public class CTSRgbColor {
      */
     public List<JAXBElement<?>> getEGColorTransform() {
         if (egColorTransform == null) {
-            egColorTransform = new ArrayList<JAXBElement<?>>();
+            egColorTransform = new ArrayList<>();
         }
         return this.egColorTransform;
     }
index 7e8292149fa4e332de9328e05002b72c03fcf71a..e95fb91e0575ac2acf46b33ccc08a2dc7785c072 100644 (file)
@@ -145,7 +145,7 @@ public class CTScRgbColor {
      */
     public List<JAXBElement<?>> getEGColorTransform() {
         if (egColorTransform == null) {
-            egColorTransform = new ArrayList<JAXBElement<?>>();
+            egColorTransform = new ArrayList<>();
         }
         return this.egColorTransform;
     }
index fcafd606fc67ab02529dfcfa0d43fa636b1a0aa8..063f74d1e38c3bd8e5494ee886d72756113e6ea2 100644 (file)
@@ -139,7 +139,7 @@ public class CTSchemeColor {
      */
     public List<JAXBElement<?>> getEGColorTransform() {
         if (egColorTransform == null) {
-            egColorTransform = new ArrayList<JAXBElement<?>>();
+            egColorTransform = new ArrayList<>();
         }
         return this.egColorTransform;
     }
index b5657ff21b06fa2df3491e5125159ec478315d11..7e9f33a354456198ca580952cf53bde572e18b64 100644 (file)
@@ -147,7 +147,7 @@ public class CTSystemColor {
      */
     public List<JAXBElement<?>> getEGColorTransform() {
         if (egColorTransform == null) {
-            egColorTransform = new ArrayList<JAXBElement<?>>();
+            egColorTransform = new ArrayList<>();
         }
         return this.egColorTransform;
     }
index 1a2e14db3ac8ada77c6fdc1cea33b9f2437ade3b..3ea6e38d5a2af9a3c60f92b7219192e36901d5ab 100644 (file)
@@ -514,7 +514,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "alpha", scope = CTSRgbColor.class)
     public JAXBElement<CTPositiveFixedPercentage> createCTSRgbColorAlpha(CTPositiveFixedPercentage value) {
-        return new JAXBElement<CTPositiveFixedPercentage>(_CTSRgbColorAlpha_QNAME, CTPositiveFixedPercentage.class, CTSRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorAlpha_QNAME, CTPositiveFixedPercentage.class, CTSRgbColor.class, value);
     }
 
     /**
@@ -523,7 +523,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "lum", scope = CTSRgbColor.class)
     public JAXBElement<CTPercentage> createCTSRgbColorLum(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorLum_QNAME, CTPercentage.class, CTSRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorLum_QNAME, CTPercentage.class, CTSRgbColor.class, value);
     }
 
     /**
@@ -532,7 +532,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "gamma", scope = CTSRgbColor.class)
     public JAXBElement<CTGammaTransform> createCTSRgbColorGamma(CTGammaTransform value) {
-        return new JAXBElement<CTGammaTransform>(_CTSRgbColorGamma_QNAME, CTGammaTransform.class, CTSRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorGamma_QNAME, CTGammaTransform.class, CTSRgbColor.class, value);
     }
 
     /**
@@ -541,7 +541,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "invGamma", scope = CTSRgbColor.class)
     public JAXBElement<CTInverseGammaTransform> createCTSRgbColorInvGamma(CTInverseGammaTransform value) {
-        return new JAXBElement<CTInverseGammaTransform>(_CTSRgbColorInvGamma_QNAME, CTInverseGammaTransform.class, CTSRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorInvGamma_QNAME, CTInverseGammaTransform.class, CTSRgbColor.class, value);
     }
 
     /**
@@ -550,7 +550,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "redOff", scope = CTSRgbColor.class)
     public JAXBElement<CTPercentage> createCTSRgbColorRedOff(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorRedOff_QNAME, CTPercentage.class, CTSRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorRedOff_QNAME, CTPercentage.class, CTSRgbColor.class, value);
     }
 
     /**
@@ -559,7 +559,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "alphaMod", scope = CTSRgbColor.class)
     public JAXBElement<CTPositivePercentage> createCTSRgbColorAlphaMod(CTPositivePercentage value) {
-        return new JAXBElement<CTPositivePercentage>(_CTSRgbColorAlphaMod_QNAME, CTPositivePercentage.class, CTSRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorAlphaMod_QNAME, CTPositivePercentage.class, CTSRgbColor.class, value);
     }
 
     /**
@@ -568,7 +568,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "alphaOff", scope = CTSRgbColor.class)
     public JAXBElement<CTFixedPercentage> createCTSRgbColorAlphaOff(CTFixedPercentage value) {
-        return new JAXBElement<CTFixedPercentage>(_CTSRgbColorAlphaOff_QNAME, CTFixedPercentage.class, CTSRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorAlphaOff_QNAME, CTFixedPercentage.class, CTSRgbColor.class, value);
     }
 
     /**
@@ -577,7 +577,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "greenOff", scope = CTSRgbColor.class)
     public JAXBElement<CTPercentage> createCTSRgbColorGreenOff(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorGreenOff_QNAME, CTPercentage.class, CTSRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorGreenOff_QNAME, CTPercentage.class, CTSRgbColor.class, value);
     }
 
     /**
@@ -586,7 +586,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "redMod", scope = CTSRgbColor.class)
     public JAXBElement<CTPercentage> createCTSRgbColorRedMod(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorRedMod_QNAME, CTPercentage.class, CTSRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorRedMod_QNAME, CTPercentage.class, CTSRgbColor.class, value);
     }
 
     /**
@@ -595,7 +595,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "hue", scope = CTSRgbColor.class)
     public JAXBElement<CTPositiveFixedAngle> createCTSRgbColorHue(CTPositiveFixedAngle value) {
-        return new JAXBElement<CTPositiveFixedAngle>(_CTSRgbColorHue_QNAME, CTPositiveFixedAngle.class, CTSRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorHue_QNAME, CTPositiveFixedAngle.class, CTSRgbColor.class, value);
     }
 
     /**
@@ -604,7 +604,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "satOff", scope = CTSRgbColor.class)
     public JAXBElement<CTPercentage> createCTSRgbColorSatOff(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorSatOff_QNAME, CTPercentage.class, CTSRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorSatOff_QNAME, CTPercentage.class, CTSRgbColor.class, value);
     }
 
     /**
@@ -613,7 +613,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "greenMod", scope = CTSRgbColor.class)
     public JAXBElement<CTPercentage> createCTSRgbColorGreenMod(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorGreenMod_QNAME, CTPercentage.class, CTSRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorGreenMod_QNAME, CTPercentage.class, CTSRgbColor.class, value);
     }
 
     /**
@@ -622,7 +622,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "sat", scope = CTSRgbColor.class)
     public JAXBElement<CTPercentage> createCTSRgbColorSat(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorSat_QNAME, CTPercentage.class, CTSRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorSat_QNAME, CTPercentage.class, CTSRgbColor.class, value);
     }
 
     /**
@@ -631,7 +631,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "blue", scope = CTSRgbColor.class)
     public JAXBElement<CTPercentage> createCTSRgbColorBlue(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorBlue_QNAME, CTPercentage.class, CTSRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorBlue_QNAME, CTPercentage.class, CTSRgbColor.class, value);
     }
 
     /**
@@ -640,7 +640,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "red", scope = CTSRgbColor.class)
     public JAXBElement<CTPercentage> createCTSRgbColorRed(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorRed_QNAME, CTPercentage.class, CTSRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorRed_QNAME, CTPercentage.class, CTSRgbColor.class, value);
     }
 
     /**
@@ -649,7 +649,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "satMod", scope = CTSRgbColor.class)
     public JAXBElement<CTPercentage> createCTSRgbColorSatMod(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorSatMod_QNAME, CTPercentage.class, CTSRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorSatMod_QNAME, CTPercentage.class, CTSRgbColor.class, value);
     }
 
     /**
@@ -658,7 +658,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "hueOff", scope = CTSRgbColor.class)
     public JAXBElement<CTAngle> createCTSRgbColorHueOff(CTAngle value) {
-        return new JAXBElement<CTAngle>(_CTSRgbColorHueOff_QNAME, CTAngle.class, CTSRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorHueOff_QNAME, CTAngle.class, CTSRgbColor.class, value);
     }
 
     /**
@@ -667,7 +667,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "blueMod", scope = CTSRgbColor.class)
     public JAXBElement<CTPercentage> createCTSRgbColorBlueMod(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorBlueMod_QNAME, CTPercentage.class, CTSRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorBlueMod_QNAME, CTPercentage.class, CTSRgbColor.class, value);
     }
 
     /**
@@ -676,7 +676,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "shade", scope = CTSRgbColor.class)
     public JAXBElement<CTPositiveFixedPercentage> createCTSRgbColorShade(CTPositiveFixedPercentage value) {
-        return new JAXBElement<CTPositiveFixedPercentage>(_CTSRgbColorShade_QNAME, CTPositiveFixedPercentage.class, CTSRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorShade_QNAME, CTPositiveFixedPercentage.class, CTSRgbColor.class, value);
     }
 
     /**
@@ -685,7 +685,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "lumMod", scope = CTSRgbColor.class)
     public JAXBElement<CTPercentage> createCTSRgbColorLumMod(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorLumMod_QNAME, CTPercentage.class, CTSRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorLumMod_QNAME, CTPercentage.class, CTSRgbColor.class, value);
     }
 
     /**
@@ -694,7 +694,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "inv", scope = CTSRgbColor.class)
     public JAXBElement<CTInverseTransform> createCTSRgbColorInv(CTInverseTransform value) {
-        return new JAXBElement<CTInverseTransform>(_CTSRgbColorInv_QNAME, CTInverseTransform.class, CTSRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorInv_QNAME, CTInverseTransform.class, CTSRgbColor.class, value);
     }
 
     /**
@@ -703,7 +703,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "lumOff", scope = CTSRgbColor.class)
     public JAXBElement<CTPercentage> createCTSRgbColorLumOff(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorLumOff_QNAME, CTPercentage.class, CTSRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorLumOff_QNAME, CTPercentage.class, CTSRgbColor.class, value);
     }
 
     /**
@@ -712,7 +712,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "tint", scope = CTSRgbColor.class)
     public JAXBElement<CTPositiveFixedPercentage> createCTSRgbColorTint(CTPositiveFixedPercentage value) {
-        return new JAXBElement<CTPositiveFixedPercentage>(_CTSRgbColorTint_QNAME, CTPositiveFixedPercentage.class, CTSRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorTint_QNAME, CTPositiveFixedPercentage.class, CTSRgbColor.class, value);
     }
 
     /**
@@ -721,7 +721,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "green", scope = CTSRgbColor.class)
     public JAXBElement<CTPercentage> createCTSRgbColorGreen(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorGreen_QNAME, CTPercentage.class, CTSRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorGreen_QNAME, CTPercentage.class, CTSRgbColor.class, value);
     }
 
     /**
@@ -730,7 +730,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "comp", scope = CTSRgbColor.class)
     public JAXBElement<CTComplementTransform> createCTSRgbColorComp(CTComplementTransform value) {
-        return new JAXBElement<CTComplementTransform>(_CTSRgbColorComp_QNAME, CTComplementTransform.class, CTSRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorComp_QNAME, CTComplementTransform.class, CTSRgbColor.class, value);
     }
 
     /**
@@ -739,7 +739,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "blueOff", scope = CTSRgbColor.class)
     public JAXBElement<CTPercentage> createCTSRgbColorBlueOff(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorBlueOff_QNAME, CTPercentage.class, CTSRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorBlueOff_QNAME, CTPercentage.class, CTSRgbColor.class, value);
     }
 
     /**
@@ -748,7 +748,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "hueMod", scope = CTSRgbColor.class)
     public JAXBElement<CTPositivePercentage> createCTSRgbColorHueMod(CTPositivePercentage value) {
-        return new JAXBElement<CTPositivePercentage>(_CTSRgbColorHueMod_QNAME, CTPositivePercentage.class, CTSRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorHueMod_QNAME, CTPositivePercentage.class, CTSRgbColor.class, value);
     }
 
     /**
@@ -757,7 +757,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "gray", scope = CTSRgbColor.class)
     public JAXBElement<CTGrayscaleTransform> createCTSRgbColorGray(CTGrayscaleTransform value) {
-        return new JAXBElement<CTGrayscaleTransform>(_CTSRgbColorGray_QNAME, CTGrayscaleTransform.class, CTSRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorGray_QNAME, CTGrayscaleTransform.class, CTSRgbColor.class, value);
     }
 
     /**
@@ -766,7 +766,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "lum", scope = CTSystemColor.class)
     public JAXBElement<CTPercentage> createCTSystemColorLum(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorLum_QNAME, CTPercentage.class, CTSystemColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorLum_QNAME, CTPercentage.class, CTSystemColor.class, value);
     }
 
     /**
@@ -775,7 +775,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "alpha", scope = CTSystemColor.class)
     public JAXBElement<CTPositiveFixedPercentage> createCTSystemColorAlpha(CTPositiveFixedPercentage value) {
-        return new JAXBElement<CTPositiveFixedPercentage>(_CTSRgbColorAlpha_QNAME, CTPositiveFixedPercentage.class, CTSystemColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorAlpha_QNAME, CTPositiveFixedPercentage.class, CTSystemColor.class, value);
     }
 
     /**
@@ -784,7 +784,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "gamma", scope = CTSystemColor.class)
     public JAXBElement<CTGammaTransform> createCTSystemColorGamma(CTGammaTransform value) {
-        return new JAXBElement<CTGammaTransform>(_CTSRgbColorGamma_QNAME, CTGammaTransform.class, CTSystemColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorGamma_QNAME, CTGammaTransform.class, CTSystemColor.class, value);
     }
 
     /**
@@ -793,7 +793,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "invGamma", scope = CTSystemColor.class)
     public JAXBElement<CTInverseGammaTransform> createCTSystemColorInvGamma(CTInverseGammaTransform value) {
-        return new JAXBElement<CTInverseGammaTransform>(_CTSRgbColorInvGamma_QNAME, CTInverseGammaTransform.class, CTSystemColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorInvGamma_QNAME, CTInverseGammaTransform.class, CTSystemColor.class, value);
     }
 
     /**
@@ -802,7 +802,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "alphaMod", scope = CTSystemColor.class)
     public JAXBElement<CTPositivePercentage> createCTSystemColorAlphaMod(CTPositivePercentage value) {
-        return new JAXBElement<CTPositivePercentage>(_CTSRgbColorAlphaMod_QNAME, CTPositivePercentage.class, CTSystemColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorAlphaMod_QNAME, CTPositivePercentage.class, CTSystemColor.class, value);
     }
 
     /**
@@ -811,7 +811,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "redOff", scope = CTSystemColor.class)
     public JAXBElement<CTPercentage> createCTSystemColorRedOff(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorRedOff_QNAME, CTPercentage.class, CTSystemColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorRedOff_QNAME, CTPercentage.class, CTSystemColor.class, value);
     }
 
     /**
@@ -820,7 +820,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "alphaOff", scope = CTSystemColor.class)
     public JAXBElement<CTFixedPercentage> createCTSystemColorAlphaOff(CTFixedPercentage value) {
-        return new JAXBElement<CTFixedPercentage>(_CTSRgbColorAlphaOff_QNAME, CTFixedPercentage.class, CTSystemColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorAlphaOff_QNAME, CTFixedPercentage.class, CTSystemColor.class, value);
     }
 
     /**
@@ -829,7 +829,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "greenOff", scope = CTSystemColor.class)
     public JAXBElement<CTPercentage> createCTSystemColorGreenOff(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorGreenOff_QNAME, CTPercentage.class, CTSystemColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorGreenOff_QNAME, CTPercentage.class, CTSystemColor.class, value);
     }
 
     /**
@@ -838,7 +838,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "redMod", scope = CTSystemColor.class)
     public JAXBElement<CTPercentage> createCTSystemColorRedMod(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorRedMod_QNAME, CTPercentage.class, CTSystemColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorRedMod_QNAME, CTPercentage.class, CTSystemColor.class, value);
     }
 
     /**
@@ -847,7 +847,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "hue", scope = CTSystemColor.class)
     public JAXBElement<CTPositiveFixedAngle> createCTSystemColorHue(CTPositiveFixedAngle value) {
-        return new JAXBElement<CTPositiveFixedAngle>(_CTSRgbColorHue_QNAME, CTPositiveFixedAngle.class, CTSystemColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorHue_QNAME, CTPositiveFixedAngle.class, CTSystemColor.class, value);
     }
 
     /**
@@ -856,7 +856,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "satOff", scope = CTSystemColor.class)
     public JAXBElement<CTPercentage> createCTSystemColorSatOff(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorSatOff_QNAME, CTPercentage.class, CTSystemColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorSatOff_QNAME, CTPercentage.class, CTSystemColor.class, value);
     }
 
     /**
@@ -865,7 +865,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "greenMod", scope = CTSystemColor.class)
     public JAXBElement<CTPercentage> createCTSystemColorGreenMod(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorGreenMod_QNAME, CTPercentage.class, CTSystemColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorGreenMod_QNAME, CTPercentage.class, CTSystemColor.class, value);
     }
 
     /**
@@ -874,7 +874,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "blue", scope = CTSystemColor.class)
     public JAXBElement<CTPercentage> createCTSystemColorBlue(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorBlue_QNAME, CTPercentage.class, CTSystemColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorBlue_QNAME, CTPercentage.class, CTSystemColor.class, value);
     }
 
     /**
@@ -883,7 +883,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "sat", scope = CTSystemColor.class)
     public JAXBElement<CTPercentage> createCTSystemColorSat(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorSat_QNAME, CTPercentage.class, CTSystemColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorSat_QNAME, CTPercentage.class, CTSystemColor.class, value);
     }
 
     /**
@@ -892,7 +892,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "red", scope = CTSystemColor.class)
     public JAXBElement<CTPercentage> createCTSystemColorRed(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorRed_QNAME, CTPercentage.class, CTSystemColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorRed_QNAME, CTPercentage.class, CTSystemColor.class, value);
     }
 
     /**
@@ -901,7 +901,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "satMod", scope = CTSystemColor.class)
     public JAXBElement<CTPercentage> createCTSystemColorSatMod(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorSatMod_QNAME, CTPercentage.class, CTSystemColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorSatMod_QNAME, CTPercentage.class, CTSystemColor.class, value);
     }
 
     /**
@@ -910,7 +910,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "blueMod", scope = CTSystemColor.class)
     public JAXBElement<CTPercentage> createCTSystemColorBlueMod(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorBlueMod_QNAME, CTPercentage.class, CTSystemColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorBlueMod_QNAME, CTPercentage.class, CTSystemColor.class, value);
     }
 
     /**
@@ -919,7 +919,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "hueOff", scope = CTSystemColor.class)
     public JAXBElement<CTAngle> createCTSystemColorHueOff(CTAngle value) {
-        return new JAXBElement<CTAngle>(_CTSRgbColorHueOff_QNAME, CTAngle.class, CTSystemColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorHueOff_QNAME, CTAngle.class, CTSystemColor.class, value);
     }
 
     /**
@@ -928,7 +928,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "shade", scope = CTSystemColor.class)
     public JAXBElement<CTPositiveFixedPercentage> createCTSystemColorShade(CTPositiveFixedPercentage value) {
-        return new JAXBElement<CTPositiveFixedPercentage>(_CTSRgbColorShade_QNAME, CTPositiveFixedPercentage.class, CTSystemColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorShade_QNAME, CTPositiveFixedPercentage.class, CTSystemColor.class, value);
     }
 
     /**
@@ -937,7 +937,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "lumMod", scope = CTSystemColor.class)
     public JAXBElement<CTPercentage> createCTSystemColorLumMod(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorLumMod_QNAME, CTPercentage.class, CTSystemColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorLumMod_QNAME, CTPercentage.class, CTSystemColor.class, value);
     }
 
     /**
@@ -946,7 +946,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "inv", scope = CTSystemColor.class)
     public JAXBElement<CTInverseTransform> createCTSystemColorInv(CTInverseTransform value) {
-        return new JAXBElement<CTInverseTransform>(_CTSRgbColorInv_QNAME, CTInverseTransform.class, CTSystemColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorInv_QNAME, CTInverseTransform.class, CTSystemColor.class, value);
     }
 
     /**
@@ -955,7 +955,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "lumOff", scope = CTSystemColor.class)
     public JAXBElement<CTPercentage> createCTSystemColorLumOff(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorLumOff_QNAME, CTPercentage.class, CTSystemColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorLumOff_QNAME, CTPercentage.class, CTSystemColor.class, value);
     }
 
     /**
@@ -964,7 +964,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "tint", scope = CTSystemColor.class)
     public JAXBElement<CTPositiveFixedPercentage> createCTSystemColorTint(CTPositiveFixedPercentage value) {
-        return new JAXBElement<CTPositiveFixedPercentage>(_CTSRgbColorTint_QNAME, CTPositiveFixedPercentage.class, CTSystemColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorTint_QNAME, CTPositiveFixedPercentage.class, CTSystemColor.class, value);
     }
 
     /**
@@ -973,7 +973,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "green", scope = CTSystemColor.class)
     public JAXBElement<CTPercentage> createCTSystemColorGreen(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorGreen_QNAME, CTPercentage.class, CTSystemColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorGreen_QNAME, CTPercentage.class, CTSystemColor.class, value);
     }
 
     /**
@@ -982,7 +982,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "comp", scope = CTSystemColor.class)
     public JAXBElement<CTComplementTransform> createCTSystemColorComp(CTComplementTransform value) {
-        return new JAXBElement<CTComplementTransform>(_CTSRgbColorComp_QNAME, CTComplementTransform.class, CTSystemColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorComp_QNAME, CTComplementTransform.class, CTSystemColor.class, value);
     }
 
     /**
@@ -991,7 +991,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "blueOff", scope = CTSystemColor.class)
     public JAXBElement<CTPercentage> createCTSystemColorBlueOff(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorBlueOff_QNAME, CTPercentage.class, CTSystemColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorBlueOff_QNAME, CTPercentage.class, CTSystemColor.class, value);
     }
 
     /**
@@ -1000,7 +1000,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "hueMod", scope = CTSystemColor.class)
     public JAXBElement<CTPositivePercentage> createCTSystemColorHueMod(CTPositivePercentage value) {
-        return new JAXBElement<CTPositivePercentage>(_CTSRgbColorHueMod_QNAME, CTPositivePercentage.class, CTSystemColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorHueMod_QNAME, CTPositivePercentage.class, CTSystemColor.class, value);
     }
 
     /**
@@ -1009,7 +1009,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "gray", scope = CTSystemColor.class)
     public JAXBElement<CTGrayscaleTransform> createCTSystemColorGray(CTGrayscaleTransform value) {
-        return new JAXBElement<CTGrayscaleTransform>(_CTSRgbColorGray_QNAME, CTGrayscaleTransform.class, CTSystemColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorGray_QNAME, CTGrayscaleTransform.class, CTSystemColor.class, value);
     }
 
     /**
@@ -1018,7 +1018,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "lum", scope = CTSchemeColor.class)
     public JAXBElement<CTPercentage> createCTSchemeColorLum(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorLum_QNAME, CTPercentage.class, CTSchemeColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorLum_QNAME, CTPercentage.class, CTSchemeColor.class, value);
     }
 
     /**
@@ -1027,7 +1027,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "alpha", scope = CTSchemeColor.class)
     public JAXBElement<CTPositiveFixedPercentage> createCTSchemeColorAlpha(CTPositiveFixedPercentage value) {
-        return new JAXBElement<CTPositiveFixedPercentage>(_CTSRgbColorAlpha_QNAME, CTPositiveFixedPercentage.class, CTSchemeColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorAlpha_QNAME, CTPositiveFixedPercentage.class, CTSchemeColor.class, value);
     }
 
     /**
@@ -1036,7 +1036,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "gamma", scope = CTSchemeColor.class)
     public JAXBElement<CTGammaTransform> createCTSchemeColorGamma(CTGammaTransform value) {
-        return new JAXBElement<CTGammaTransform>(_CTSRgbColorGamma_QNAME, CTGammaTransform.class, CTSchemeColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorGamma_QNAME, CTGammaTransform.class, CTSchemeColor.class, value);
     }
 
     /**
@@ -1045,7 +1045,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "invGamma", scope = CTSchemeColor.class)
     public JAXBElement<CTInverseGammaTransform> createCTSchemeColorInvGamma(CTInverseGammaTransform value) {
-        return new JAXBElement<CTInverseGammaTransform>(_CTSRgbColorInvGamma_QNAME, CTInverseGammaTransform.class, CTSchemeColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorInvGamma_QNAME, CTInverseGammaTransform.class, CTSchemeColor.class, value);
     }
 
     /**
@@ -1054,7 +1054,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "redOff", scope = CTSchemeColor.class)
     public JAXBElement<CTPercentage> createCTSchemeColorRedOff(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorRedOff_QNAME, CTPercentage.class, CTSchemeColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorRedOff_QNAME, CTPercentage.class, CTSchemeColor.class, value);
     }
 
     /**
@@ -1063,7 +1063,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "alphaMod", scope = CTSchemeColor.class)
     public JAXBElement<CTPositivePercentage> createCTSchemeColorAlphaMod(CTPositivePercentage value) {
-        return new JAXBElement<CTPositivePercentage>(_CTSRgbColorAlphaMod_QNAME, CTPositivePercentage.class, CTSchemeColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorAlphaMod_QNAME, CTPositivePercentage.class, CTSchemeColor.class, value);
     }
 
     /**
@@ -1072,7 +1072,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "alphaOff", scope = CTSchemeColor.class)
     public JAXBElement<CTFixedPercentage> createCTSchemeColorAlphaOff(CTFixedPercentage value) {
-        return new JAXBElement<CTFixedPercentage>(_CTSRgbColorAlphaOff_QNAME, CTFixedPercentage.class, CTSchemeColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorAlphaOff_QNAME, CTFixedPercentage.class, CTSchemeColor.class, value);
     }
 
     /**
@@ -1081,7 +1081,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "greenOff", scope = CTSchemeColor.class)
     public JAXBElement<CTPercentage> createCTSchemeColorGreenOff(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorGreenOff_QNAME, CTPercentage.class, CTSchemeColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorGreenOff_QNAME, CTPercentage.class, CTSchemeColor.class, value);
     }
 
     /**
@@ -1090,7 +1090,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "hue", scope = CTSchemeColor.class)
     public JAXBElement<CTPositiveFixedAngle> createCTSchemeColorHue(CTPositiveFixedAngle value) {
-        return new JAXBElement<CTPositiveFixedAngle>(_CTSRgbColorHue_QNAME, CTPositiveFixedAngle.class, CTSchemeColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorHue_QNAME, CTPositiveFixedAngle.class, CTSchemeColor.class, value);
     }
 
     /**
@@ -1099,7 +1099,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "redMod", scope = CTSchemeColor.class)
     public JAXBElement<CTPercentage> createCTSchemeColorRedMod(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorRedMod_QNAME, CTPercentage.class, CTSchemeColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorRedMod_QNAME, CTPercentage.class, CTSchemeColor.class, value);
     }
 
     /**
@@ -1108,7 +1108,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "satOff", scope = CTSchemeColor.class)
     public JAXBElement<CTPercentage> createCTSchemeColorSatOff(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorSatOff_QNAME, CTPercentage.class, CTSchemeColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorSatOff_QNAME, CTPercentage.class, CTSchemeColor.class, value);
     }
 
     /**
@@ -1117,7 +1117,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "greenMod", scope = CTSchemeColor.class)
     public JAXBElement<CTPercentage> createCTSchemeColorGreenMod(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorGreenMod_QNAME, CTPercentage.class, CTSchemeColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorGreenMod_QNAME, CTPercentage.class, CTSchemeColor.class, value);
     }
 
     /**
@@ -1126,7 +1126,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "blue", scope = CTSchemeColor.class)
     public JAXBElement<CTPercentage> createCTSchemeColorBlue(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorBlue_QNAME, CTPercentage.class, CTSchemeColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorBlue_QNAME, CTPercentage.class, CTSchemeColor.class, value);
     }
 
     /**
@@ -1135,7 +1135,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "sat", scope = CTSchemeColor.class)
     public JAXBElement<CTPercentage> createCTSchemeColorSat(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorSat_QNAME, CTPercentage.class, CTSchemeColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorSat_QNAME, CTPercentage.class, CTSchemeColor.class, value);
     }
 
     /**
@@ -1144,7 +1144,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "red", scope = CTSchemeColor.class)
     public JAXBElement<CTPercentage> createCTSchemeColorRed(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorRed_QNAME, CTPercentage.class, CTSchemeColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorRed_QNAME, CTPercentage.class, CTSchemeColor.class, value);
     }
 
     /**
@@ -1153,7 +1153,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "satMod", scope = CTSchemeColor.class)
     public JAXBElement<CTPercentage> createCTSchemeColorSatMod(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorSatMod_QNAME, CTPercentage.class, CTSchemeColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorSatMod_QNAME, CTPercentage.class, CTSchemeColor.class, value);
     }
 
     /**
@@ -1162,7 +1162,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "hueOff", scope = CTSchemeColor.class)
     public JAXBElement<CTAngle> createCTSchemeColorHueOff(CTAngle value) {
-        return new JAXBElement<CTAngle>(_CTSRgbColorHueOff_QNAME, CTAngle.class, CTSchemeColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorHueOff_QNAME, CTAngle.class, CTSchemeColor.class, value);
     }
 
     /**
@@ -1171,7 +1171,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "blueMod", scope = CTSchemeColor.class)
     public JAXBElement<CTPercentage> createCTSchemeColorBlueMod(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorBlueMod_QNAME, CTPercentage.class, CTSchemeColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorBlueMod_QNAME, CTPercentage.class, CTSchemeColor.class, value);
     }
 
     /**
@@ -1180,7 +1180,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "shade", scope = CTSchemeColor.class)
     public JAXBElement<CTPositiveFixedPercentage> createCTSchemeColorShade(CTPositiveFixedPercentage value) {
-        return new JAXBElement<CTPositiveFixedPercentage>(_CTSRgbColorShade_QNAME, CTPositiveFixedPercentage.class, CTSchemeColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorShade_QNAME, CTPositiveFixedPercentage.class, CTSchemeColor.class, value);
     }
 
     /**
@@ -1189,7 +1189,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "lumMod", scope = CTSchemeColor.class)
     public JAXBElement<CTPercentage> createCTSchemeColorLumMod(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorLumMod_QNAME, CTPercentage.class, CTSchemeColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorLumMod_QNAME, CTPercentage.class, CTSchemeColor.class, value);
     }
 
     /**
@@ -1198,7 +1198,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "inv", scope = CTSchemeColor.class)
     public JAXBElement<CTInverseTransform> createCTSchemeColorInv(CTInverseTransform value) {
-        return new JAXBElement<CTInverseTransform>(_CTSRgbColorInv_QNAME, CTInverseTransform.class, CTSchemeColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorInv_QNAME, CTInverseTransform.class, CTSchemeColor.class, value);
     }
 
     /**
@@ -1207,7 +1207,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "lumOff", scope = CTSchemeColor.class)
     public JAXBElement<CTPercentage> createCTSchemeColorLumOff(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorLumOff_QNAME, CTPercentage.class, CTSchemeColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorLumOff_QNAME, CTPercentage.class, CTSchemeColor.class, value);
     }
 
     /**
@@ -1216,7 +1216,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "tint", scope = CTSchemeColor.class)
     public JAXBElement<CTPositiveFixedPercentage> createCTSchemeColorTint(CTPositiveFixedPercentage value) {
-        return new JAXBElement<CTPositiveFixedPercentage>(_CTSRgbColorTint_QNAME, CTPositiveFixedPercentage.class, CTSchemeColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorTint_QNAME, CTPositiveFixedPercentage.class, CTSchemeColor.class, value);
     }
 
     /**
@@ -1225,7 +1225,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "green", scope = CTSchemeColor.class)
     public JAXBElement<CTPercentage> createCTSchemeColorGreen(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorGreen_QNAME, CTPercentage.class, CTSchemeColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorGreen_QNAME, CTPercentage.class, CTSchemeColor.class, value);
     }
 
     /**
@@ -1234,7 +1234,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "comp", scope = CTSchemeColor.class)
     public JAXBElement<CTComplementTransform> createCTSchemeColorComp(CTComplementTransform value) {
-        return new JAXBElement<CTComplementTransform>(_CTSRgbColorComp_QNAME, CTComplementTransform.class, CTSchemeColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorComp_QNAME, CTComplementTransform.class, CTSchemeColor.class, value);
     }
 
     /**
@@ -1243,7 +1243,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "blueOff", scope = CTSchemeColor.class)
     public JAXBElement<CTPercentage> createCTSchemeColorBlueOff(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorBlueOff_QNAME, CTPercentage.class, CTSchemeColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorBlueOff_QNAME, CTPercentage.class, CTSchemeColor.class, value);
     }
 
     /**
@@ -1252,7 +1252,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "hueMod", scope = CTSchemeColor.class)
     public JAXBElement<CTPositivePercentage> createCTSchemeColorHueMod(CTPositivePercentage value) {
-        return new JAXBElement<CTPositivePercentage>(_CTSRgbColorHueMod_QNAME, CTPositivePercentage.class, CTSchemeColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorHueMod_QNAME, CTPositivePercentage.class, CTSchemeColor.class, value);
     }
 
     /**
@@ -1261,7 +1261,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "gray", scope = CTSchemeColor.class)
     public JAXBElement<CTGrayscaleTransform> createCTSchemeColorGray(CTGrayscaleTransform value) {
-        return new JAXBElement<CTGrayscaleTransform>(_CTSRgbColorGray_QNAME, CTGrayscaleTransform.class, CTSchemeColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorGray_QNAME, CTGrayscaleTransform.class, CTSchemeColor.class, value);
     }
 
     /**
@@ -1270,7 +1270,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "lum", scope = CTScRgbColor.class)
     public JAXBElement<CTPercentage> createCTScRgbColorLum(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorLum_QNAME, CTPercentage.class, CTScRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorLum_QNAME, CTPercentage.class, CTScRgbColor.class, value);
     }
 
     /**
@@ -1279,7 +1279,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "alpha", scope = CTScRgbColor.class)
     public JAXBElement<CTPositiveFixedPercentage> createCTScRgbColorAlpha(CTPositiveFixedPercentage value) {
-        return new JAXBElement<CTPositiveFixedPercentage>(_CTSRgbColorAlpha_QNAME, CTPositiveFixedPercentage.class, CTScRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorAlpha_QNAME, CTPositiveFixedPercentage.class, CTScRgbColor.class, value);
     }
 
     /**
@@ -1288,7 +1288,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "gamma", scope = CTScRgbColor.class)
     public JAXBElement<CTGammaTransform> createCTScRgbColorGamma(CTGammaTransform value) {
-        return new JAXBElement<CTGammaTransform>(_CTSRgbColorGamma_QNAME, CTGammaTransform.class, CTScRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorGamma_QNAME, CTGammaTransform.class, CTScRgbColor.class, value);
     }
 
     /**
@@ -1297,7 +1297,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "invGamma", scope = CTScRgbColor.class)
     public JAXBElement<CTInverseGammaTransform> createCTScRgbColorInvGamma(CTInverseGammaTransform value) {
-        return new JAXBElement<CTInverseGammaTransform>(_CTSRgbColorInvGamma_QNAME, CTInverseGammaTransform.class, CTScRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorInvGamma_QNAME, CTInverseGammaTransform.class, CTScRgbColor.class, value);
     }
 
     /**
@@ -1306,7 +1306,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "redOff", scope = CTScRgbColor.class)
     public JAXBElement<CTPercentage> createCTScRgbColorRedOff(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorRedOff_QNAME, CTPercentage.class, CTScRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorRedOff_QNAME, CTPercentage.class, CTScRgbColor.class, value);
     }
 
     /**
@@ -1315,7 +1315,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "alphaMod", scope = CTScRgbColor.class)
     public JAXBElement<CTPositivePercentage> createCTScRgbColorAlphaMod(CTPositivePercentage value) {
-        return new JAXBElement<CTPositivePercentage>(_CTSRgbColorAlphaMod_QNAME, CTPositivePercentage.class, CTScRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorAlphaMod_QNAME, CTPositivePercentage.class, CTScRgbColor.class, value);
     }
 
     /**
@@ -1324,7 +1324,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "alphaOff", scope = CTScRgbColor.class)
     public JAXBElement<CTFixedPercentage> createCTScRgbColorAlphaOff(CTFixedPercentage value) {
-        return new JAXBElement<CTFixedPercentage>(_CTSRgbColorAlphaOff_QNAME, CTFixedPercentage.class, CTScRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorAlphaOff_QNAME, CTFixedPercentage.class, CTScRgbColor.class, value);
     }
 
     /**
@@ -1333,7 +1333,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "greenOff", scope = CTScRgbColor.class)
     public JAXBElement<CTPercentage> createCTScRgbColorGreenOff(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorGreenOff_QNAME, CTPercentage.class, CTScRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorGreenOff_QNAME, CTPercentage.class, CTScRgbColor.class, value);
     }
 
     /**
@@ -1342,7 +1342,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "hue", scope = CTScRgbColor.class)
     public JAXBElement<CTPositiveFixedAngle> createCTScRgbColorHue(CTPositiveFixedAngle value) {
-        return new JAXBElement<CTPositiveFixedAngle>(_CTSRgbColorHue_QNAME, CTPositiveFixedAngle.class, CTScRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorHue_QNAME, CTPositiveFixedAngle.class, CTScRgbColor.class, value);
     }
 
     /**
@@ -1351,7 +1351,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "redMod", scope = CTScRgbColor.class)
     public JAXBElement<CTPercentage> createCTScRgbColorRedMod(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorRedMod_QNAME, CTPercentage.class, CTScRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorRedMod_QNAME, CTPercentage.class, CTScRgbColor.class, value);
     }
 
     /**
@@ -1360,7 +1360,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "satOff", scope = CTScRgbColor.class)
     public JAXBElement<CTPercentage> createCTScRgbColorSatOff(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorSatOff_QNAME, CTPercentage.class, CTScRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorSatOff_QNAME, CTPercentage.class, CTScRgbColor.class, value);
     }
 
     /**
@@ -1369,7 +1369,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "greenMod", scope = CTScRgbColor.class)
     public JAXBElement<CTPercentage> createCTScRgbColorGreenMod(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorGreenMod_QNAME, CTPercentage.class, CTScRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorGreenMod_QNAME, CTPercentage.class, CTScRgbColor.class, value);
     }
 
     /**
@@ -1378,7 +1378,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "sat", scope = CTScRgbColor.class)
     public JAXBElement<CTPercentage> createCTScRgbColorSat(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorSat_QNAME, CTPercentage.class, CTScRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorSat_QNAME, CTPercentage.class, CTScRgbColor.class, value);
     }
 
     /**
@@ -1387,7 +1387,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "blue", scope = CTScRgbColor.class)
     public JAXBElement<CTPercentage> createCTScRgbColorBlue(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorBlue_QNAME, CTPercentage.class, CTScRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorBlue_QNAME, CTPercentage.class, CTScRgbColor.class, value);
     }
 
     /**
@@ -1396,7 +1396,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "red", scope = CTScRgbColor.class)
     public JAXBElement<CTPercentage> createCTScRgbColorRed(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorRed_QNAME, CTPercentage.class, CTScRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorRed_QNAME, CTPercentage.class, CTScRgbColor.class, value);
     }
 
     /**
@@ -1405,7 +1405,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "satMod", scope = CTScRgbColor.class)
     public JAXBElement<CTPercentage> createCTScRgbColorSatMod(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorSatMod_QNAME, CTPercentage.class, CTScRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorSatMod_QNAME, CTPercentage.class, CTScRgbColor.class, value);
     }
 
     /**
@@ -1414,7 +1414,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "hueOff", scope = CTScRgbColor.class)
     public JAXBElement<CTAngle> createCTScRgbColorHueOff(CTAngle value) {
-        return new JAXBElement<CTAngle>(_CTSRgbColorHueOff_QNAME, CTAngle.class, CTScRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorHueOff_QNAME, CTAngle.class, CTScRgbColor.class, value);
     }
 
     /**
@@ -1423,7 +1423,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "blueMod", scope = CTScRgbColor.class)
     public JAXBElement<CTPercentage> createCTScRgbColorBlueMod(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorBlueMod_QNAME, CTPercentage.class, CTScRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorBlueMod_QNAME, CTPercentage.class, CTScRgbColor.class, value);
     }
 
     /**
@@ -1432,7 +1432,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "shade", scope = CTScRgbColor.class)
     public JAXBElement<CTPositiveFixedPercentage> createCTScRgbColorShade(CTPositiveFixedPercentage value) {
-        return new JAXBElement<CTPositiveFixedPercentage>(_CTSRgbColorShade_QNAME, CTPositiveFixedPercentage.class, CTScRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorShade_QNAME, CTPositiveFixedPercentage.class, CTScRgbColor.class, value);
     }
 
     /**
@@ -1441,7 +1441,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "lumMod", scope = CTScRgbColor.class)
     public JAXBElement<CTPercentage> createCTScRgbColorLumMod(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorLumMod_QNAME, CTPercentage.class, CTScRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorLumMod_QNAME, CTPercentage.class, CTScRgbColor.class, value);
     }
 
     /**
@@ -1450,7 +1450,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "inv", scope = CTScRgbColor.class)
     public JAXBElement<CTInverseTransform> createCTScRgbColorInv(CTInverseTransform value) {
-        return new JAXBElement<CTInverseTransform>(_CTSRgbColorInv_QNAME, CTInverseTransform.class, CTScRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorInv_QNAME, CTInverseTransform.class, CTScRgbColor.class, value);
     }
 
     /**
@@ -1459,7 +1459,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "lumOff", scope = CTScRgbColor.class)
     public JAXBElement<CTPercentage> createCTScRgbColorLumOff(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorLumOff_QNAME, CTPercentage.class, CTScRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorLumOff_QNAME, CTPercentage.class, CTScRgbColor.class, value);
     }
 
     /**
@@ -1468,7 +1468,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "tint", scope = CTScRgbColor.class)
     public JAXBElement<CTPositiveFixedPercentage> createCTScRgbColorTint(CTPositiveFixedPercentage value) {
-        return new JAXBElement<CTPositiveFixedPercentage>(_CTSRgbColorTint_QNAME, CTPositiveFixedPercentage.class, CTScRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorTint_QNAME, CTPositiveFixedPercentage.class, CTScRgbColor.class, value);
     }
 
     /**
@@ -1477,7 +1477,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "green", scope = CTScRgbColor.class)
     public JAXBElement<CTPercentage> createCTScRgbColorGreen(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorGreen_QNAME, CTPercentage.class, CTScRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorGreen_QNAME, CTPercentage.class, CTScRgbColor.class, value);
     }
 
     /**
@@ -1486,7 +1486,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "comp", scope = CTScRgbColor.class)
     public JAXBElement<CTComplementTransform> createCTScRgbColorComp(CTComplementTransform value) {
-        return new JAXBElement<CTComplementTransform>(_CTSRgbColorComp_QNAME, CTComplementTransform.class, CTScRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorComp_QNAME, CTComplementTransform.class, CTScRgbColor.class, value);
     }
 
     /**
@@ -1495,7 +1495,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "blueOff", scope = CTScRgbColor.class)
     public JAXBElement<CTPercentage> createCTScRgbColorBlueOff(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorBlueOff_QNAME, CTPercentage.class, CTScRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorBlueOff_QNAME, CTPercentage.class, CTScRgbColor.class, value);
     }
 
     /**
@@ -1504,7 +1504,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "hueMod", scope = CTScRgbColor.class)
     public JAXBElement<CTPositivePercentage> createCTScRgbColorHueMod(CTPositivePercentage value) {
-        return new JAXBElement<CTPositivePercentage>(_CTSRgbColorHueMod_QNAME, CTPositivePercentage.class, CTScRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorHueMod_QNAME, CTPositivePercentage.class, CTScRgbColor.class, value);
     }
 
     /**
@@ -1513,7 +1513,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "gray", scope = CTScRgbColor.class)
     public JAXBElement<CTGrayscaleTransform> createCTScRgbColorGray(CTGrayscaleTransform value) {
-        return new JAXBElement<CTGrayscaleTransform>(_CTSRgbColorGray_QNAME, CTGrayscaleTransform.class, CTScRgbColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorGray_QNAME, CTGrayscaleTransform.class, CTScRgbColor.class, value);
     }
 
     /**
@@ -1522,7 +1522,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "alpha", scope = CTHslColor.class)
     public JAXBElement<CTPositiveFixedPercentage> createCTHslColorAlpha(CTPositiveFixedPercentage value) {
-        return new JAXBElement<CTPositiveFixedPercentage>(_CTSRgbColorAlpha_QNAME, CTPositiveFixedPercentage.class, CTHslColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorAlpha_QNAME, CTPositiveFixedPercentage.class, CTHslColor.class, value);
     }
 
     /**
@@ -1531,7 +1531,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "lum", scope = CTHslColor.class)
     public JAXBElement<CTPercentage> createCTHslColorLum(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorLum_QNAME, CTPercentage.class, CTHslColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorLum_QNAME, CTPercentage.class, CTHslColor.class, value);
     }
 
     /**
@@ -1540,7 +1540,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "gamma", scope = CTHslColor.class)
     public JAXBElement<CTGammaTransform> createCTHslColorGamma(CTGammaTransform value) {
-        return new JAXBElement<CTGammaTransform>(_CTSRgbColorGamma_QNAME, CTGammaTransform.class, CTHslColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorGamma_QNAME, CTGammaTransform.class, CTHslColor.class, value);
     }
 
     /**
@@ -1549,7 +1549,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "invGamma", scope = CTHslColor.class)
     public JAXBElement<CTInverseGammaTransform> createCTHslColorInvGamma(CTInverseGammaTransform value) {
-        return new JAXBElement<CTInverseGammaTransform>(_CTSRgbColorInvGamma_QNAME, CTInverseGammaTransform.class, CTHslColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorInvGamma_QNAME, CTInverseGammaTransform.class, CTHslColor.class, value);
     }
 
     /**
@@ -1558,7 +1558,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "alphaMod", scope = CTHslColor.class)
     public JAXBElement<CTPositivePercentage> createCTHslColorAlphaMod(CTPositivePercentage value) {
-        return new JAXBElement<CTPositivePercentage>(_CTSRgbColorAlphaMod_QNAME, CTPositivePercentage.class, CTHslColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorAlphaMod_QNAME, CTPositivePercentage.class, CTHslColor.class, value);
     }
 
     /**
@@ -1567,7 +1567,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "redOff", scope = CTHslColor.class)
     public JAXBElement<CTPercentage> createCTHslColorRedOff(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorRedOff_QNAME, CTPercentage.class, CTHslColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorRedOff_QNAME, CTPercentage.class, CTHslColor.class, value);
     }
 
     /**
@@ -1576,7 +1576,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "alphaOff", scope = CTHslColor.class)
     public JAXBElement<CTFixedPercentage> createCTHslColorAlphaOff(CTFixedPercentage value) {
-        return new JAXBElement<CTFixedPercentage>(_CTSRgbColorAlphaOff_QNAME, CTFixedPercentage.class, CTHslColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorAlphaOff_QNAME, CTFixedPercentage.class, CTHslColor.class, value);
     }
 
     /**
@@ -1585,7 +1585,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "greenOff", scope = CTHslColor.class)
     public JAXBElement<CTPercentage> createCTHslColorGreenOff(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorGreenOff_QNAME, CTPercentage.class, CTHslColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorGreenOff_QNAME, CTPercentage.class, CTHslColor.class, value);
     }
 
     /**
@@ -1594,7 +1594,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "hue", scope = CTHslColor.class)
     public JAXBElement<CTPositiveFixedAngle> createCTHslColorHue(CTPositiveFixedAngle value) {
-        return new JAXBElement<CTPositiveFixedAngle>(_CTSRgbColorHue_QNAME, CTPositiveFixedAngle.class, CTHslColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorHue_QNAME, CTPositiveFixedAngle.class, CTHslColor.class, value);
     }
 
     /**
@@ -1603,7 +1603,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "redMod", scope = CTHslColor.class)
     public JAXBElement<CTPercentage> createCTHslColorRedMod(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorRedMod_QNAME, CTPercentage.class, CTHslColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorRedMod_QNAME, CTPercentage.class, CTHslColor.class, value);
     }
 
     /**
@@ -1612,7 +1612,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "satOff", scope = CTHslColor.class)
     public JAXBElement<CTPercentage> createCTHslColorSatOff(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorSatOff_QNAME, CTPercentage.class, CTHslColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorSatOff_QNAME, CTPercentage.class, CTHslColor.class, value);
     }
 
     /**
@@ -1621,7 +1621,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "greenMod", scope = CTHslColor.class)
     public JAXBElement<CTPercentage> createCTHslColorGreenMod(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorGreenMod_QNAME, CTPercentage.class, CTHslColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorGreenMod_QNAME, CTPercentage.class, CTHslColor.class, value);
     }
 
     /**
@@ -1630,7 +1630,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "blue", scope = CTHslColor.class)
     public JAXBElement<CTPercentage> createCTHslColorBlue(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorBlue_QNAME, CTPercentage.class, CTHslColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorBlue_QNAME, CTPercentage.class, CTHslColor.class, value);
     }
 
     /**
@@ -1639,7 +1639,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "sat", scope = CTHslColor.class)
     public JAXBElement<CTPercentage> createCTHslColorSat(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorSat_QNAME, CTPercentage.class, CTHslColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorSat_QNAME, CTPercentage.class, CTHslColor.class, value);
     }
 
     /**
@@ -1648,7 +1648,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "red", scope = CTHslColor.class)
     public JAXBElement<CTPercentage> createCTHslColorRed(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorRed_QNAME, CTPercentage.class, CTHslColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorRed_QNAME, CTPercentage.class, CTHslColor.class, value);
     }
 
     /**
@@ -1657,7 +1657,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "satMod", scope = CTHslColor.class)
     public JAXBElement<CTPercentage> createCTHslColorSatMod(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorSatMod_QNAME, CTPercentage.class, CTHslColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorSatMod_QNAME, CTPercentage.class, CTHslColor.class, value);
     }
 
     /**
@@ -1666,7 +1666,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "blueMod", scope = CTHslColor.class)
     public JAXBElement<CTPercentage> createCTHslColorBlueMod(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorBlueMod_QNAME, CTPercentage.class, CTHslColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorBlueMod_QNAME, CTPercentage.class, CTHslColor.class, value);
     }
 
     /**
@@ -1675,7 +1675,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "hueOff", scope = CTHslColor.class)
     public JAXBElement<CTAngle> createCTHslColorHueOff(CTAngle value) {
-        return new JAXBElement<CTAngle>(_CTSRgbColorHueOff_QNAME, CTAngle.class, CTHslColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorHueOff_QNAME, CTAngle.class, CTHslColor.class, value);
     }
 
     /**
@@ -1684,7 +1684,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "shade", scope = CTHslColor.class)
     public JAXBElement<CTPositiveFixedPercentage> createCTHslColorShade(CTPositiveFixedPercentage value) {
-        return new JAXBElement<CTPositiveFixedPercentage>(_CTSRgbColorShade_QNAME, CTPositiveFixedPercentage.class, CTHslColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorShade_QNAME, CTPositiveFixedPercentage.class, CTHslColor.class, value);
     }
 
     /**
@@ -1693,7 +1693,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "lumMod", scope = CTHslColor.class)
     public JAXBElement<CTPercentage> createCTHslColorLumMod(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorLumMod_QNAME, CTPercentage.class, CTHslColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorLumMod_QNAME, CTPercentage.class, CTHslColor.class, value);
     }
 
     /**
@@ -1702,7 +1702,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "inv", scope = CTHslColor.class)
     public JAXBElement<CTInverseTransform> createCTHslColorInv(CTInverseTransform value) {
-        return new JAXBElement<CTInverseTransform>(_CTSRgbColorInv_QNAME, CTInverseTransform.class, CTHslColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorInv_QNAME, CTInverseTransform.class, CTHslColor.class, value);
     }
 
     /**
@@ -1711,7 +1711,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "lumOff", scope = CTHslColor.class)
     public JAXBElement<CTPercentage> createCTHslColorLumOff(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorLumOff_QNAME, CTPercentage.class, CTHslColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorLumOff_QNAME, CTPercentage.class, CTHslColor.class, value);
     }
 
     /**
@@ -1720,7 +1720,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "tint", scope = CTHslColor.class)
     public JAXBElement<CTPositiveFixedPercentage> createCTHslColorTint(CTPositiveFixedPercentage value) {
-        return new JAXBElement<CTPositiveFixedPercentage>(_CTSRgbColorTint_QNAME, CTPositiveFixedPercentage.class, CTHslColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorTint_QNAME, CTPositiveFixedPercentage.class, CTHslColor.class, value);
     }
 
     /**
@@ -1729,7 +1729,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "green", scope = CTHslColor.class)
     public JAXBElement<CTPercentage> createCTHslColorGreen(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorGreen_QNAME, CTPercentage.class, CTHslColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorGreen_QNAME, CTPercentage.class, CTHslColor.class, value);
     }
 
     /**
@@ -1738,7 +1738,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "comp", scope = CTHslColor.class)
     public JAXBElement<CTComplementTransform> createCTHslColorComp(CTComplementTransform value) {
-        return new JAXBElement<CTComplementTransform>(_CTSRgbColorComp_QNAME, CTComplementTransform.class, CTHslColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorComp_QNAME, CTComplementTransform.class, CTHslColor.class, value);
     }
 
     /**
@@ -1747,7 +1747,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "blueOff", scope = CTHslColor.class)
     public JAXBElement<CTPercentage> createCTHslColorBlueOff(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorBlueOff_QNAME, CTPercentage.class, CTHslColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorBlueOff_QNAME, CTPercentage.class, CTHslColor.class, value);
     }
 
     /**
@@ -1756,7 +1756,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "hueMod", scope = CTHslColor.class)
     public JAXBElement<CTPositivePercentage> createCTHslColorHueMod(CTPositivePercentage value) {
-        return new JAXBElement<CTPositivePercentage>(_CTSRgbColorHueMod_QNAME, CTPositivePercentage.class, CTHslColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorHueMod_QNAME, CTPositivePercentage.class, CTHslColor.class, value);
     }
 
     /**
@@ -1765,7 +1765,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "gray", scope = CTHslColor.class)
     public JAXBElement<CTGrayscaleTransform> createCTHslColorGray(CTGrayscaleTransform value) {
-        return new JAXBElement<CTGrayscaleTransform>(_CTSRgbColorGray_QNAME, CTGrayscaleTransform.class, CTHslColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorGray_QNAME, CTGrayscaleTransform.class, CTHslColor.class, value);
     }
 
     /**
@@ -1774,7 +1774,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "lum", scope = CTPresetColor.class)
     public JAXBElement<CTPercentage> createCTPresetColorLum(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorLum_QNAME, CTPercentage.class, CTPresetColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorLum_QNAME, CTPercentage.class, CTPresetColor.class, value);
     }
 
     /**
@@ -1783,7 +1783,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "alpha", scope = CTPresetColor.class)
     public JAXBElement<CTPositiveFixedPercentage> createCTPresetColorAlpha(CTPositiveFixedPercentage value) {
-        return new JAXBElement<CTPositiveFixedPercentage>(_CTSRgbColorAlpha_QNAME, CTPositiveFixedPercentage.class, CTPresetColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorAlpha_QNAME, CTPositiveFixedPercentage.class, CTPresetColor.class, value);
     }
 
     /**
@@ -1792,7 +1792,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "gamma", scope = CTPresetColor.class)
     public JAXBElement<CTGammaTransform> createCTPresetColorGamma(CTGammaTransform value) {
-        return new JAXBElement<CTGammaTransform>(_CTSRgbColorGamma_QNAME, CTGammaTransform.class, CTPresetColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorGamma_QNAME, CTGammaTransform.class, CTPresetColor.class, value);
     }
 
     /**
@@ -1801,7 +1801,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "invGamma", scope = CTPresetColor.class)
     public JAXBElement<CTInverseGammaTransform> createCTPresetColorInvGamma(CTInverseGammaTransform value) {
-        return new JAXBElement<CTInverseGammaTransform>(_CTSRgbColorInvGamma_QNAME, CTInverseGammaTransform.class, CTPresetColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorInvGamma_QNAME, CTInverseGammaTransform.class, CTPresetColor.class, value);
     }
 
     /**
@@ -1810,7 +1810,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "redOff", scope = CTPresetColor.class)
     public JAXBElement<CTPercentage> createCTPresetColorRedOff(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorRedOff_QNAME, CTPercentage.class, CTPresetColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorRedOff_QNAME, CTPercentage.class, CTPresetColor.class, value);
     }
 
     /**
@@ -1819,7 +1819,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "alphaMod", scope = CTPresetColor.class)
     public JAXBElement<CTPositivePercentage> createCTPresetColorAlphaMod(CTPositivePercentage value) {
-        return new JAXBElement<CTPositivePercentage>(_CTSRgbColorAlphaMod_QNAME, CTPositivePercentage.class, CTPresetColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorAlphaMod_QNAME, CTPositivePercentage.class, CTPresetColor.class, value);
     }
 
     /**
@@ -1828,7 +1828,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "alphaOff", scope = CTPresetColor.class)
     public JAXBElement<CTFixedPercentage> createCTPresetColorAlphaOff(CTFixedPercentage value) {
-        return new JAXBElement<CTFixedPercentage>(_CTSRgbColorAlphaOff_QNAME, CTFixedPercentage.class, CTPresetColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorAlphaOff_QNAME, CTFixedPercentage.class, CTPresetColor.class, value);
     }
 
     /**
@@ -1837,7 +1837,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "greenOff", scope = CTPresetColor.class)
     public JAXBElement<CTPercentage> createCTPresetColorGreenOff(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorGreenOff_QNAME, CTPercentage.class, CTPresetColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorGreenOff_QNAME, CTPercentage.class, CTPresetColor.class, value);
     }
 
     /**
@@ -1846,7 +1846,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "hue", scope = CTPresetColor.class)
     public JAXBElement<CTPositiveFixedAngle> createCTPresetColorHue(CTPositiveFixedAngle value) {
-        return new JAXBElement<CTPositiveFixedAngle>(_CTSRgbColorHue_QNAME, CTPositiveFixedAngle.class, CTPresetColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorHue_QNAME, CTPositiveFixedAngle.class, CTPresetColor.class, value);
     }
 
     /**
@@ -1855,7 +1855,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "redMod", scope = CTPresetColor.class)
     public JAXBElement<CTPercentage> createCTPresetColorRedMod(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorRedMod_QNAME, CTPercentage.class, CTPresetColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorRedMod_QNAME, CTPercentage.class, CTPresetColor.class, value);
     }
 
     /**
@@ -1864,7 +1864,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "satOff", scope = CTPresetColor.class)
     public JAXBElement<CTPercentage> createCTPresetColorSatOff(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorSatOff_QNAME, CTPercentage.class, CTPresetColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorSatOff_QNAME, CTPercentage.class, CTPresetColor.class, value);
     }
 
     /**
@@ -1873,7 +1873,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "greenMod", scope = CTPresetColor.class)
     public JAXBElement<CTPercentage> createCTPresetColorGreenMod(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorGreenMod_QNAME, CTPercentage.class, CTPresetColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorGreenMod_QNAME, CTPercentage.class, CTPresetColor.class, value);
     }
 
     /**
@@ -1882,7 +1882,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "blue", scope = CTPresetColor.class)
     public JAXBElement<CTPercentage> createCTPresetColorBlue(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorBlue_QNAME, CTPercentage.class, CTPresetColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorBlue_QNAME, CTPercentage.class, CTPresetColor.class, value);
     }
 
     /**
@@ -1891,7 +1891,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "sat", scope = CTPresetColor.class)
     public JAXBElement<CTPercentage> createCTPresetColorSat(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorSat_QNAME, CTPercentage.class, CTPresetColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorSat_QNAME, CTPercentage.class, CTPresetColor.class, value);
     }
 
     /**
@@ -1900,7 +1900,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "red", scope = CTPresetColor.class)
     public JAXBElement<CTPercentage> createCTPresetColorRed(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorRed_QNAME, CTPercentage.class, CTPresetColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorRed_QNAME, CTPercentage.class, CTPresetColor.class, value);
     }
 
     /**
@@ -1909,7 +1909,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "satMod", scope = CTPresetColor.class)
     public JAXBElement<CTPercentage> createCTPresetColorSatMod(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorSatMod_QNAME, CTPercentage.class, CTPresetColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorSatMod_QNAME, CTPercentage.class, CTPresetColor.class, value);
     }
 
     /**
@@ -1918,7 +1918,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "blueMod", scope = CTPresetColor.class)
     public JAXBElement<CTPercentage> createCTPresetColorBlueMod(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorBlueMod_QNAME, CTPercentage.class, CTPresetColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorBlueMod_QNAME, CTPercentage.class, CTPresetColor.class, value);
     }
 
     /**
@@ -1927,7 +1927,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "hueOff", scope = CTPresetColor.class)
     public JAXBElement<CTAngle> createCTPresetColorHueOff(CTAngle value) {
-        return new JAXBElement<CTAngle>(_CTSRgbColorHueOff_QNAME, CTAngle.class, CTPresetColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorHueOff_QNAME, CTAngle.class, CTPresetColor.class, value);
     }
 
     /**
@@ -1936,7 +1936,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "shade", scope = CTPresetColor.class)
     public JAXBElement<CTPositiveFixedPercentage> createCTPresetColorShade(CTPositiveFixedPercentage value) {
-        return new JAXBElement<CTPositiveFixedPercentage>(_CTSRgbColorShade_QNAME, CTPositiveFixedPercentage.class, CTPresetColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorShade_QNAME, CTPositiveFixedPercentage.class, CTPresetColor.class, value);
     }
 
     /**
@@ -1945,7 +1945,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "lumMod", scope = CTPresetColor.class)
     public JAXBElement<CTPercentage> createCTPresetColorLumMod(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorLumMod_QNAME, CTPercentage.class, CTPresetColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorLumMod_QNAME, CTPercentage.class, CTPresetColor.class, value);
     }
 
     /**
@@ -1954,7 +1954,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "inv", scope = CTPresetColor.class)
     public JAXBElement<CTInverseTransform> createCTPresetColorInv(CTInverseTransform value) {
-        return new JAXBElement<CTInverseTransform>(_CTSRgbColorInv_QNAME, CTInverseTransform.class, CTPresetColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorInv_QNAME, CTInverseTransform.class, CTPresetColor.class, value);
     }
 
     /**
@@ -1963,7 +1963,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "lumOff", scope = CTPresetColor.class)
     public JAXBElement<CTPercentage> createCTPresetColorLumOff(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorLumOff_QNAME, CTPercentage.class, CTPresetColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorLumOff_QNAME, CTPercentage.class, CTPresetColor.class, value);
     }
 
     /**
@@ -1972,7 +1972,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "tint", scope = CTPresetColor.class)
     public JAXBElement<CTPositiveFixedPercentage> createCTPresetColorTint(CTPositiveFixedPercentage value) {
-        return new JAXBElement<CTPositiveFixedPercentage>(_CTSRgbColorTint_QNAME, CTPositiveFixedPercentage.class, CTPresetColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorTint_QNAME, CTPositiveFixedPercentage.class, CTPresetColor.class, value);
     }
 
     /**
@@ -1981,7 +1981,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "green", scope = CTPresetColor.class)
     public JAXBElement<CTPercentage> createCTPresetColorGreen(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorGreen_QNAME, CTPercentage.class, CTPresetColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorGreen_QNAME, CTPercentage.class, CTPresetColor.class, value);
     }
 
     /**
@@ -1990,7 +1990,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "comp", scope = CTPresetColor.class)
     public JAXBElement<CTComplementTransform> createCTPresetColorComp(CTComplementTransform value) {
-        return new JAXBElement<CTComplementTransform>(_CTSRgbColorComp_QNAME, CTComplementTransform.class, CTPresetColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorComp_QNAME, CTComplementTransform.class, CTPresetColor.class, value);
     }
 
     /**
@@ -1999,7 +1999,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "blueOff", scope = CTPresetColor.class)
     public JAXBElement<CTPercentage> createCTPresetColorBlueOff(CTPercentage value) {
-        return new JAXBElement<CTPercentage>(_CTSRgbColorBlueOff_QNAME, CTPercentage.class, CTPresetColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorBlueOff_QNAME, CTPercentage.class, CTPresetColor.class, value);
     }
 
     /**
@@ -2008,7 +2008,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "hueMod", scope = CTPresetColor.class)
     public JAXBElement<CTPositivePercentage> createCTPresetColorHueMod(CTPositivePercentage value) {
-        return new JAXBElement<CTPositivePercentage>(_CTSRgbColorHueMod_QNAME, CTPositivePercentage.class, CTPresetColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorHueMod_QNAME, CTPositivePercentage.class, CTPresetColor.class, value);
     }
 
     /**
@@ -2017,7 +2017,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", name = "gray", scope = CTPresetColor.class)
     public JAXBElement<CTGrayscaleTransform> createCTPresetColorGray(CTGrayscaleTransform value) {
-        return new JAXBElement<CTGrayscaleTransform>(_CTSRgbColorGray_QNAME, CTGrayscaleTransform.class, CTPresetColor.class, value);
+        return new JAXBElement<>(_CTSRgbColorGray_QNAME, CTGrayscaleTransform.class, CTPresetColor.class, value);
     }
 
 }
index 118c87f653bd4ca5d9738f02d4b76c63830c60bb..283444a980bd3c6a997d04de5c4823c70125794c 100644 (file)
@@ -24,7 +24,7 @@ import java.util.HashMap;
 import java.util.Map;
 
 public class Context {
-    final Map<String, Double> _ctx = new HashMap<String, Double>();
+    final Map<String, Double> _ctx = new HashMap<>();
     final IAdjustableShape _props;
     final Rectangle2D _anchor;
     
index 1250618bf552723a59f5c730f6fb41d32e88fe16..2be58130a5de5c5be766f3a7c5dfe0d1efb3f15c 100644 (file)
@@ -34,9 +34,9 @@ import org.apache.poi.sl.draw.binding.CTPath2DList;
  * Definition of a custom geometric shape
  */
 public class CustomGeometry implements Iterable<Path>{
-    final List<Guide> adjusts = new ArrayList<Guide>();
-    final List<Guide> guides = new ArrayList<Guide>();
-    final List<Path> paths = new ArrayList<Path>();
+    final List<Guide> adjusts = new ArrayList<>();
+    final List<Guide> guides = new ArrayList<>();
+    final List<Path> paths = new ArrayList<>();
     Path textBounds;
 
     public CustomGeometry(CTCustomGeometry2D geom) {
index cf50f49c9b4b2bd8742ceeda4a131932233869aa..07ec9f861f36459a0b35c2c9db6df0261c4b4679 100644 (file)
@@ -49,7 +49,7 @@ public class Path {
     }
 
     public Path(boolean fill, boolean stroke){
-        commands = new ArrayList<PathCommand>();
+        commands = new ArrayList<>();
         _w = -1;
         _h = -1;
         _fill = (fill) ? PaintModifier.NORM : PaintModifier.NONE;
@@ -70,7 +70,7 @@ public class Path {
         _w = spPath.isSetW() ? spPath.getW() : -1;
         _h = spPath.isSetH() ? spPath.getH() : -1;
 
-        commands = new ArrayList<PathCommand>();
+        commands = new ArrayList<>();
 
         for(Object ch : spPath.getCloseOrMoveToOrLnTo()){
             if(ch instanceof CTPath2DMoveTo){
index b5c8e1ad5601cbe4030ee125cc1e05be15b1b883..9c4df2f9f688dc1b8c217edc36173e19e606ce78 100644 (file)
@@ -260,7 +260,7 @@ public enum PresetColor {
     private static final Map<String,PresetColor> lookupOoxmlId;
 
     static {
-        lookupOoxmlId = new HashMap<String,PresetColor>();
+        lookupOoxmlId = new HashMap<>();
         for(PresetColor pc : PresetColor.values()) {
             if (pc.ooxmlId != null) {
                 lookupOoxmlId.put(pc.ooxmlId, pc);
index c0cdb7b90cc027be947f544ff84c1dcc4c9b8d61..12654a7944050f9a446989c000a84f96d6a22acb 100644 (file)
@@ -132,7 +132,7 @@ public class CellElapsedFormatter extends CellFormatter {
     public CellElapsedFormatter(String pattern) {
         super(pattern);
 
-        specs = new ArrayList<TimeSpec>();
+        specs = new ArrayList<>();
 
         StringBuffer desc = CellFormatPart.parseFormat(pattern,
                 CellFormatType.ELAPSED, new ElapsedPartHandler());
index 832c793dd1141e96a0825f5834bcd0407acdaca4..6d2b4e9711cf4ad96edee9dbcff63cb6a0425cd6 100644 (file)
@@ -129,7 +129,7 @@ public class CellFormat {
 
     /** Maps a format string to its parsed version for efficiencies sake. */
     private static final Map<Locale, Map<String, CellFormat>> formatCache =
-            new WeakHashMap<Locale, Map<String, CellFormat>>();
+            new WeakHashMap<>();
 
     /**
      * Returns a {@link CellFormat} that applies the given format.  Two calls
@@ -155,7 +155,7 @@ public class CellFormat {
     public static synchronized CellFormat getInstance(Locale locale, String format) {
         Map<String, CellFormat> formatMap = formatCache.get(locale);
         if (formatMap == null) {
-            formatMap = new WeakHashMap<String, CellFormat>();
+            formatMap = new WeakHashMap<>();
             formatCache.put(locale, formatMap);
         }
         CellFormat fmt = formatMap.get(format);
@@ -179,7 +179,7 @@ public class CellFormat {
         this.format = format;
         CellFormatPart defaultTextFormat = new CellFormatPart(locale, "@");
         Matcher m = ONE_PART.matcher(format);
-        List<CellFormatPart> parts = new ArrayList<CellFormatPart>();
+        List<CellFormatPart> parts = new ArrayList<>();
 
         while (m.find()) {
             try {
index 23fd2f2e7afd1be579e29a076d12cdf7ce39b4dc..96e9c5fcd83a715648cb60880b01b5bfb3d8749c 100644 (file)
@@ -35,7 +35,7 @@ public abstract class CellFormatCondition {
     private static final Map<String, Integer> TESTS;
 
     static {
-        TESTS = new HashMap<String, Integer>();
+        TESTS = new HashMap<>();
         TESTS.put("<", LT);
         TESTS.put("<=", LE);
         TESTS.put(">", GT);
index 699475760cc5b9b93ee5bd76ac2bee378c335144..02a4797835a56e2e4684cdfebd620793ccdb9be2 100644 (file)
@@ -56,7 +56,7 @@ public class CellFormatPart {
     private static final Map<String, Color> NAMED_COLORS;
 
     static {
-        NAMED_COLORS = new TreeMap<String, Color>(
+        NAMED_COLORS = new TreeMap<>(
                 String.CASE_INSENSITIVE_ORDER);
 
         Map<Integer,HSSFColor> colors = HSSFColor.getIndexHash();
index 2c193fac2b851bc8cc1b9a090965106c8fc980e0..acd98388217aae55ca32a9208832ac25a77114b6 100644 (file)
@@ -50,13 +50,13 @@ public class CellNumberFormatter extends CellFormatter {
     private final Special afterInteger;
     private final Special afterFractional;
     private final boolean showGroupingSeparator;
-    private final List<Special> specials =  new ArrayList<Special>();
-    private final List<Special> integerSpecials = new ArrayList<Special>();
-    private final List<Special> fractionalSpecials = new ArrayList<Special>();
-    private final List<Special> numeratorSpecials = new ArrayList<Special>();
-    private final List<Special> denominatorSpecials = new ArrayList<Special>();
-    private final List<Special> exponentSpecials = new ArrayList<Special>();
-    private final List<Special> exponentDigitSpecials = new ArrayList<Special>();
+    private final List<Special> specials = new ArrayList<>();
+    private final List<Special> integerSpecials = new ArrayList<>();
+    private final List<Special> fractionalSpecials = new ArrayList<>();
+    private final List<Special> numeratorSpecials = new ArrayList<>();
+    private final List<Special> denominatorSpecials = new ArrayList<>();
+    private final List<Special> exponentSpecials = new ArrayList<>();
+    private final List<Special> exponentDigitSpecials = new ArrayList<>();
     private final int maxDenominator;
     private final String numeratorFmt;
     private final String denominatorFmt;
@@ -448,7 +448,7 @@ public class CellNumberFormatter extends CellFormatter {
             }
         }
 
-        Set<CellNumberStringMod> mods = new TreeSet<CellNumberStringMod>();
+        Set<CellNumberStringMod> mods = new TreeSet<>();
         StringBuffer output = new StringBuffer(localiseFormat(desc));
 
         if (exponent != null) {
index 8f2c024abbb3a257ca88662e2348c314a890ebcd..a9af31851f13fbc3baab0845aaaf060b063e57ab 100644 (file)
@@ -36,7 +36,7 @@ public class CellNumberPartHandler implements PartHandler {
     private Special slash;
     private Special exponent;
     private Special numerator;
-    private final List<Special> specials = new LinkedList<Special>();
+    private final List<Special> specials = new LinkedList<>();
     private boolean improperFraction;
 
     public String handlePart(Matcher m, String part, CellFormatType type, StringBuffer descBuf) {
index 1d08eac1be4bbb564a2ad34c69348a9d91366a5c..7abfce3c80b0458d45ddbf1d54c59a4086986e99 100644 (file)
@@ -33,7 +33,7 @@ final class CellEvaluationFrame {
 
        public CellEvaluationFrame(FormulaCellCacheEntry cce) {
                _cce = cce;
-               _sensitiveInputCells = new HashSet<CellCacheEntry>();
+               _sensitiveInputCells = new HashSet<>();
        }
        public CellCacheEntry getCCE() {
                return _cce;
index 58ce3d929f04da14b7a11a424bc38e2e43862ecf..bfd1f4e35b1b8613b3bfa1b23d7940b298f80144 100644 (file)
@@ -75,7 +75,7 @@ public final class CollaboratingWorkbooksEnvironment {
         new CollaboratingWorkbooksEnvironment(evaluatorsByName, evaluators);
     }
     public static void setupFormulaEvaluator(Map<String,FormulaEvaluator> evaluators) {
-        Map<String, WorkbookEvaluator> evaluatorsByName = new HashMap<String, WorkbookEvaluator>(evaluators.size());
+        Map<String, WorkbookEvaluator> evaluatorsByName = new HashMap<>(evaluators.size());
         for (Map.Entry<String,FormulaEvaluator> swb : evaluators.entrySet()) {
             String wbName = swb.getKey();
             FormulaEvaluator eval = swb.getValue();
@@ -93,7 +93,7 @@ public final class CollaboratingWorkbooksEnvironment {
         this(toUniqueMap(workbookNames, evaluators, nItems), evaluators);
     }
     private static Map<String, WorkbookEvaluator> toUniqueMap(String[] workbookNames, WorkbookEvaluator[] evaluators, int nItems) {
-        Map<String, WorkbookEvaluator> evaluatorsByName = new HashMap<String, WorkbookEvaluator>(nItems * 3 / 2);
+        Map<String, WorkbookEvaluator> evaluatorsByName = new HashMap<>(nItems * 3 / 2);
         for(int i=0; i<nItems; i++) {
             String wbName = workbookNames[i];
             WorkbookEvaluator wbEval = evaluators[i];
@@ -105,7 +105,7 @@ public final class CollaboratingWorkbooksEnvironment {
         return evaluatorsByName;
     }
     private CollaboratingWorkbooksEnvironment(Map<String, WorkbookEvaluator> evaluatorsByName, WorkbookEvaluator[] evaluators) {
-        IdentityHashMap<WorkbookEvaluator, String> uniqueEvals = new IdentityHashMap<WorkbookEvaluator, String>(evaluators.length);
+        IdentityHashMap<WorkbookEvaluator, String> uniqueEvals = new IdentityHashMap<>(evaluators.length);
         for (Map.Entry<String, WorkbookEvaluator> me : evaluatorsByName.entrySet()) {
             String uniEval = uniqueEvals.put(me.getValue(), me.getKey());
             if (uniEval != null) {
@@ -144,7 +144,7 @@ public final class CollaboratingWorkbooksEnvironment {
      * Completely dismantles all workbook environments that the supplied evaluators are part of
      */
     private void unhookOldEnvironments(WorkbookEvaluator[] evaluators) {
-        Set<CollaboratingWorkbooksEnvironment> oldEnvs = new HashSet<CollaboratingWorkbooksEnvironment>();
+        Set<CollaboratingWorkbooksEnvironment> oldEnvs = new HashSet<>();
         for(int i=0; i<evaluators.length; i++) {
             oldEnvs.add(evaluators[i].getEnvironment());
         }
index fcc35c8f15d0248323d4f2f6fc2bfb892d60048c..fee64cc06d9ed8bb91395df5bbcbf285d470b00d 100644 (file)
@@ -60,7 +60,7 @@ public class ConditionalFormattingEvaluator {
      * there's no guarantee instances won't be recreated on the fly by some implementation.
      * So we use sheet name.
      */
-    private final Map<String, List<EvaluationConditionalFormatRule>> formats = new HashMap<String, List<EvaluationConditionalFormatRule>>();
+    private final Map<String, List<EvaluationConditionalFormatRule>> formats = new HashMap<>();
     
     /**
      * Evaluating rules for cells in their region(s) is expensive, so we want to cache them,
@@ -70,7 +70,7 @@ public class ConditionalFormattingEvaluator {
      * <p>
      * CellReference implements equals().
      */
-    private final Map<CellReference, List<EvaluationConditionalFormatRule>> values = new HashMap<CellReference, List<EvaluationConditionalFormatRule>>();
+    private final Map<CellReference, List<EvaluationConditionalFormatRule>> values = new HashMap<>();
 
     public ConditionalFormattingEvaluator(Workbook wb, WorkbookEvaluatorProvider provider) {
         this.workbook = wb;
@@ -115,7 +115,7 @@ public class ConditionalFormattingEvaluator {
             }
             final SheetConditionalFormatting scf = sheet.getSheetConditionalFormatting();
             final int count = scf.getNumConditionalFormattings();
-            rules = new ArrayList<EvaluationConditionalFormatRule>(count);
+            rules = new ArrayList<>(count);
             formats.put(sheetName, rules);
             for (int i=0; i < count; i++) {
                 ConditionalFormatting f = scf.getConditionalFormattingAt(i);
@@ -154,7 +154,7 @@ public class ConditionalFormattingEvaluator {
         
         if (rules == null) {
             // compute and cache them
-            rules = new ArrayList<EvaluationConditionalFormatRule>();
+            rules = new ArrayList<>();
             
             Sheet sheet = null;
             if (cellRef.getSheetName() != null) sheet = workbook.getSheet(cellRef.getSheetName());
@@ -252,7 +252,7 @@ public class ConditionalFormattingEvaluator {
      * @return unmodifiable List of all cells in the rule's region matching the rule's condition
      */
     public List<Cell> getMatchingCells(EvaluationConditionalFormatRule rule) {
-        final List<Cell> cells = new ArrayList<Cell>();
+        final List<Cell> cells = new ArrayList<>();
         final Sheet sheet = rule.getSheet();
         
         for (CellRangeAddress region : rule.getRegions()) {
index 46ebe13304e5cddb2ddd7157c922a6e3180e426a..866669016fe163e0a555c47a1d0e0b65223e5a7b 100644 (file)
@@ -63,7 +63,7 @@ public class DataValidationEvaluator {
      * there's no guarantee instances won't be recreated on the fly by some implementation.
      * So we use sheet name.
      */
-    private final Map<String, List<? extends DataValidation>> validations = new HashMap<String, List<? extends DataValidation>>();
+    private final Map<String, List<? extends DataValidation>> validations = new HashMap<>();
 
     private final Workbook workbook;
     private final WorkbookEvaluator workbookEvaluator;
@@ -187,7 +187,7 @@ public class DataValidationEvaluator {
         
         String formula = val.getFormula1();
         
-        final List<ValueEval> values = new ArrayList<ValueEval>();
+        final List<ValueEval> values = new ArrayList<>();
         
         if (val.getExplicitListValues() != null && val.getExplicitListValues().length > 0) {
             // assumes parsing interprets the overloaded property right for XSSF
index 56c19472fccc93fd573082df66a78c497354c5d2..8bfe0932c3300cfe29500fb95d1124f6aa3b3e8f 100644 (file)
@@ -78,7 +78,7 @@ public class EvaluationConditionalFormatRule implements Comparable<EvaluationCon
      * Depending on the rule type, it may want to know about certain values in the region when evaluating {@link #matches(Cell)},
      * such as top 10, unique, duplicate, average, etc.  This collection stores those if needed so they are not repeatedly calculated
      */
-    private final Map<CellRangeAddress, Set<ValueAndFormat>> meaningfulRegionValues = new HashMap<CellRangeAddress, Set<ValueAndFormat>>();
+    private final Map<CellRangeAddress, Set<ValueAndFormat>> meaningfulRegionValues = new HashMap<>();
     
     private final int priority;
     private final int formattingIndex;
@@ -435,10 +435,10 @@ public class EvaluationConditionalFormatRule implements Comparable<EvaluationCon
                         limit = allValues.size() * limit / 100;
                     }
                     if (allValues.size() <= limit) {
-                        return new HashSet<ValueAndFormat>(allValues);
+                        return new HashSet<>(allValues);
                     }
 
-                    return new HashSet<ValueAndFormat>(allValues.subList(0, limit));
+                    return new HashSet<>(allValues.subList(0, limit));
                 }
             }).contains(cv);
         case UNIQUE_VALUES:
@@ -450,7 +450,7 @@ public class EvaluationConditionalFormatRule implements Comparable<EvaluationCon
                     List<ValueAndFormat> values = allValues;
                     Collections.sort(values);
                     
-                    final Set<ValueAndFormat> unique = new HashSet<ValueAndFormat>();
+                    final Set<ValueAndFormat> unique = new HashSet<>();
                     
                     for (int i=0; i < values.size(); i++) {
                         final ValueAndFormat v = values.get(i);
@@ -475,7 +475,7 @@ public class EvaluationConditionalFormatRule implements Comparable<EvaluationCon
                     List<ValueAndFormat> values = allValues;
                     Collections.sort(values);
                     
-                    final Set<ValueAndFormat> dup = new HashSet<ValueAndFormat>();
+                    final Set<ValueAndFormat> dup = new HashSet<>();
                     
                     for (int i=0; i < values.size(); i++) {
                         final ValueAndFormat v = values.get(i);
@@ -496,21 +496,21 @@ public class EvaluationConditionalFormatRule implements Comparable<EvaluationCon
             final ConditionFilterData conf = rule.getFilterConfiguration();
 
             // actually ordered, so iteration order is predictable
-            List<ValueAndFormat> values = new ArrayList<ValueAndFormat>(getMeaningfulValues(region, false, new ValueFunction() {
+            List<ValueAndFormat> values = new ArrayList<>(getMeaningfulValues(region, false, new ValueFunction() {
                 @Override
                 public Set<ValueAndFormat> evaluate(List<ValueAndFormat> allValues) {
                     List<ValueAndFormat> values = allValues;
                     double total = 0;
                     ValueEval[] pop = new ValueEval[values.size()];
-                    for (int i=0; i < values.size(); i++) {
+                    for (int i = 0; i < values.size(); i++) {
                         ValueAndFormat v = values.get(i);
                         total += v.value.doubleValue();
                         pop[i] = new NumberEval(v.value.doubleValue());
                     }
-                    
-                    final Set<ValueAndFormat> avgSet = new LinkedHashSet<ValueAndFormat>(1);
+
+                    final Set<ValueAndFormat> avgSet = new LinkedHashSet<>(1);
                     avgSet.add(new ValueAndFormat(new Double(values.size() == 0 ? 0 : total / values.size()), null));
-                    
+
                     final double stdDev = values.size() <= 1 ? 0 : ((NumberEval) AggregateFunction.STDEV.evaluate(pop, 0, 0)).getNumberValue();
                     avgSet.add(new ValueAndFormat(new Double(stdDev), null));
                     return avgSet;
@@ -603,7 +603,7 @@ public class EvaluationConditionalFormatRule implements Comparable<EvaluationCon
             return values;
         }
         
-        List<ValueAndFormat> allValues = new ArrayList<ValueAndFormat>((region.getLastColumn() - region.getFirstColumn()+1) * (region.getLastRow() - region.getFirstRow() + 1));
+        List<ValueAndFormat> allValues = new ArrayList<>((region.getLastColumn() - region.getFirstColumn() + 1) * (region.getLastRow() - region.getFirstRow() + 1));
         
         for (int r=region.getFirstRow(); r <= region.getLastRow(); r++) {
             final Row row = sheet.getRow(r);
index bb21e4a8c7dcdacd5bb7b86874435d16aacf9e2e..35b7f32ba05f57167dec5047c5a928e2c64cb80d 100644 (file)
@@ -43,8 +43,8 @@ final class EvaluationTracker {
 
        public EvaluationTracker(EvaluationCache cache) {
                _cache = cache;
-               _evaluationFrames = new ArrayList<CellEvaluationFrame>();
-               _currentlyEvaluatingCells = new HashSet<FormulaCellCacheEntry>();
+               _evaluationFrames = new ArrayList<>();
+               _currentlyEvaluatingCells = new HashSet<>();
        }
 
        /**
index 63a1da166d1b70c86a36e94b2552e6ad5ac15a90..fc097eb8844efe2d5dd78fa2d96726ad857f29a8 100644 (file)
@@ -35,7 +35,7 @@ final class FormulaCellCache {
 
        public FormulaCellCache() {
                // assumes the object returned by EvaluationCell.getIdentityKey() has a well behaved hashCode+equals
-               _formulaEntriesByCell = new HashMap<Object, FormulaCellCacheEntry>();
+               _formulaEntriesByCell = new HashMap<>();
        }
 
        public CellCacheEntry[] getCacheEntries() {
index 0561956181a9000625e6714dea51d3424baa48a6..63142e88b63125197587cfdac7fea5a26158ad99 100644 (file)
@@ -93,7 +93,7 @@ final class FormulaCellCacheEntry extends CellCacheEntry {
                if (nUsed < 1) {
                        usedSet = Collections.emptySet();
                } else {
-                       usedSet = new HashSet<CellCacheEntry>(nUsed * 3 / 2);
+                       usedSet = new HashSet<>(nUsed * 3 / 2);
                        for (int i = 0; i < nUsed; i++) {
                                usedSet.add(usedCells[i]);
                        }
index fd17aca1844e1665e6e8c79ec1f92a50790d1d9c..f64f68755081b1d7d3ee707a12058b8c428774bb 100644 (file)
@@ -1448,7 +1448,7 @@ public final class FormulaParser {
     /** get arguments to a function */
     private ParseNode[] Arguments() {
         //average 2 args per function
-        List<ParseNode> temp = new ArrayList<ParseNode>(2);
+        List<ParseNode> temp = new ArrayList<>(2);
         SkipWhite();
         if(look == ')') {
             return ParseNode.EMPTY_ARRAY;
@@ -1576,7 +1576,7 @@ public final class FormulaParser {
     }
 
     private ParseNode parseArray() {
-        List<Object[]> rowsData = new ArrayList<Object[]>();
+        List<Object[]> rowsData = new ArrayList<>();
         while(true) {
             Object[] singleRowData = parseArrayRow();
             rowsData.add(singleRowData);
@@ -1607,7 +1607,7 @@ public final class FormulaParser {
     }
 
     private Object[] parseArrayRow() {
-        List<Object> temp = new ArrayList<Object>();
+        List<Object> temp = new ArrayList<>();
         while (true) {
             temp.add(parseArrayItem());
             SkipWhite();
index 208f55918cea74d54277e905a68dbae20e14e7b9..c247b1b61e6d968a06e69bf43d81a1a9e97cbf0a 100644 (file)
@@ -47,7 +47,7 @@ public class FormulaRenderer {
         if (ptgs == null || ptgs.length == 0) {
             throw new IllegalArgumentException("ptgs must not be null");
         }
-        Stack<String> stack = new Stack<String>();
+        Stack<String> stack = new Stack<>();
 
         for (Ptg ptg : ptgs) {
             // TODO - what about MemNoMemPtg?
index a07cb9c70ba0071826d09e89872fd8b74b2fd153..69069f9056c7753a22db9e23901059a581ee1863 100644 (file)
@@ -59,7 +59,7 @@ final class FormulaUsedBlankCellSet {
                private BlankCellRectangleGroup _currentRectangleGroup;
 
                public BlankCellSheetGroup() {
-                       _rectangleGroups = new ArrayList<BlankCellRectangleGroup>();
+                       _rectangleGroups = new ArrayList<>();
                        _currentRowIndex = -1;
                }
 
@@ -164,7 +164,7 @@ final class FormulaUsedBlankCellSet {
        private final Map<BookSheetKey, BlankCellSheetGroup> _sheetGroupsByBookSheet;
 
        public FormulaUsedBlankCellSet() {
-               _sheetGroupsByBookSheet = new HashMap<BookSheetKey, BlankCellSheetGroup>();
+               _sheetGroupsByBookSheet = new HashMap<>();
        }
 
        public void addCell(int bookIndex, int sheetIndex, int rowIndex, int columnIndex) {
index 44faa060232315a61bd2848f6f86da129c159388..58d3130a4ed48bc771330868bd0455b0b809347d 100644 (file)
@@ -71,7 +71,7 @@ final class OperationEvaluatorFactory {
        }
 
        private static Map<OperationPtg, Function> initialiseInstancesMap() {
-               Map<OperationPtg, Function> m = new HashMap<OperationPtg, Function>(32);
+               Map<OperationPtg, Function> m = new HashMap<>(32);
 
                put(m, EqualPtg.instance, RelationalOperationEval.EqualEval);
                put(m, GreaterEqualPtg.instance, RelationalOperationEval.GreaterEqualEval);
index 2514c0711ff71161e999368bd08449b7c0d2abce..30a01745ec4dc3acedec4bf6a089d7a6532bd62f 100644 (file)
@@ -78,7 +78,7 @@ final class PlainCellCache {
        private Map<Loc, PlainValueCellCacheEntry> _plainValueEntriesByLoc;
 
        public PlainCellCache() {
-               _plainValueEntriesByLoc = new HashMap<Loc, PlainValueCellCacheEntry>();
+               _plainValueEntriesByLoc = new HashMap<>();
        }
        public void put(Loc key, PlainValueCellCacheEntry cce) {
                _plainValueEntriesByLoc.put(key, cce);
index 90a2509afa14106db15f334fa178a3c29b27d1df..ed42c297ace251547385c1e1885968f82f620ffb 100644 (file)
@@ -95,8 +95,8 @@ public final class WorkbookEvaluator {
         _workbook = workbook;
         _evaluationListener = evaluationListener;
         _cache = new EvaluationCache(evaluationListener);
-        _sheetIndexesBySheet = new IdentityHashMap<EvaluationSheet, Integer>();
-        _sheetIndexesByName = new IdentityHashMap<String, Integer>();
+        _sheetIndexesBySheet = new IdentityHashMap<>();
+        _sheetIndexesByName = new IdentityHashMap<>();
         _collaboratingWorkbookEnvironment = CollaboratingWorkbooksEnvironment.EMPTY;
         _workbookIx = 0;
         _stabilityClassifier = stabilityClassifier;
@@ -401,7 +401,7 @@ public final class WorkbookEvaluator {
             dbgEvaluationOutputIndent++;
         }
 
-        Stack<ValueEval> stack = new Stack<ValueEval>();
+        Stack<ValueEval> stack = new Stack<>();
         for (int i = 0, iSize = ptgs.length; i < iSize; i++) {
             // since we don't know how to handle these yet :(
             Ptg ptg = ptgs[i];
@@ -928,7 +928,7 @@ public final class WorkbookEvaluator {
      * @return names of functions supported by POI
      */
     public static Collection<String> getSupportedFunctionNames(){
-        Collection<String> lst = new TreeSet<String>();
+        Collection<String> lst = new TreeSet<>();
         lst.addAll(FunctionEval.getSupportedFunctionNames());
         lst.addAll(AnalysisToolPak.getSupportedFunctionNames());
         return Collections.unmodifiableCollection(lst);
@@ -940,7 +940,7 @@ public final class WorkbookEvaluator {
      * @return names of functions NOT supported by POI
      */
     public static Collection<String> getNotSupportedFunctionNames(){
-        Collection<String> lst = new TreeSet<String>();
+        Collection<String> lst = new TreeSet<>();
         lst.addAll(FunctionEval.getNotSupportedFunctionNames());
         lst.addAll(AnalysisToolPak.getNotSupportedFunctionNames());
         return Collections.unmodifiableCollection(lst);
index df99b1070702583a1af4715348791a1bea08d05a..5f312744396d5bc12ea724035eeb01fc55218b5f 100644 (file)
@@ -78,7 +78,7 @@ public final class AnalysisToolPak implements UDFFinder {
     }
 
     private Map<String, FreeRefFunction> createFunctionsMap() {
-        Map<String, FreeRefFunction> m = new HashMap<String, FreeRefFunction>(108);
+        Map<String, FreeRefFunction> m = new HashMap<>(108);
 
         r(m, "ACCRINT", null);
         r(m, "ACCRINTM", null);
@@ -211,7 +211,7 @@ public final class AnalysisToolPak implements UDFFinder {
      */
     public static Collection<String> getSupportedFunctionNames(){
         AnalysisToolPak inst = (AnalysisToolPak)instance;
-        Collection<String> lst = new TreeSet<String>();
+        Collection<String> lst = new TreeSet<>();
         for(Map.Entry<String, FreeRefFunction> me : inst._functionsByName.entrySet()){
             FreeRefFunction func = me.getValue();
             if(func != null && !(func instanceof NotImplemented)){
@@ -229,7 +229,7 @@ public final class AnalysisToolPak implements UDFFinder {
      */
     public static Collection<String> getNotSupportedFunctionNames(){
         AnalysisToolPak inst = (AnalysisToolPak)instance;
-        Collection<String> lst = new TreeSet<String>();
+        Collection<String> lst = new TreeSet<>();
         for(Map.Entry<String, FreeRefFunction> me : inst._functionsByName.entrySet()){
             FreeRefFunction func = me.getValue();
             if (func instanceof NotImplemented) {
index fa5d50aee636f67e960f612ba19074f4be4c76a6..f97728c34142e18c73dcb38bbfaa7258ead22a70 100644 (file)
@@ -82,7 +82,7 @@ final class ArgumentsEvaluator {
         if (arg instanceof StringEval) {
             return new double[]{ evaluateDateArg(arg, srcCellRow, srcCellCol) };
         } else if (arg instanceof AreaEvalBase) {
-            List<Double> valuesList = new ArrayList<Double>();
+            List<Double> valuesList = new ArrayList<>();
             AreaEvalBase area = (AreaEvalBase) arg;
             for (int i = area.getFirstRow(); i <= area.getLastRow(); i++) {
                 for (int j = area.getFirstColumn(); j <= area.getLastColumn(); j++) {
index e9c2289752acf326bff39c2987667b5dc16bc861..faa8bed26574798b38d917325f5cdfaaefde985b 100644 (file)
@@ -26,7 +26,7 @@ import org.apache.poi.ss.usermodel.FormulaError;
  * Evaluations for formula errors
  */
 public final class ErrorEval implements ValueEval {
-    private static final Map<FormulaError,ErrorEval> evals = new HashMap<FormulaError, ErrorEval>();
+    private static final Map<FormulaError,ErrorEval> evals = new HashMap<>();
     
     /** <b>#NULL!</b>  - Intersection of two cell ranges is empty */
     public static final ErrorEval NULL_INTERSECTION = new ErrorEval(FormulaError.NULL);
index f2cee518f73f095b079f49378e2359eb026c727f..b327f2504359d59d2de8484f2113a5a3bae7347f 100644 (file)
@@ -395,7 +395,7 @@ public final class FunctionEval {
      * @since 3.8 beta6
      */
     public static Collection<String> getSupportedFunctionNames() {
-        Collection<String> lst = new TreeSet<String>();
+        Collection<String> lst = new TreeSet<>();
         for (int i = 0; i < functions.length; i++) {
             Function func = functions[i];
             FunctionMetadata metaData = FunctionMetadataRegistry.getFunctionByIndex(i);
@@ -414,7 +414,7 @@ public final class FunctionEval {
      * @since 3.8 beta6
      */
     public static Collection<String> getNotSupportedFunctionNames() {
-        Collection<String> lst = new TreeSet<String>();
+        Collection<String> lst = new TreeSet<>();
         for (int i = 0; i < functions.length; i++) {
             Function func = functions[i];
             if (func != null && (func instanceof NotImplementedFunction)) {
index ee884da78dbf8b7ec3dae5a0c9b1b4bdfee54906..99d9b3e84158ab013bf2369ba66f9c5048842ae2 100644 (file)
@@ -24,7 +24,7 @@ import java.util.List;
  * Handling of a list of values, e.g. the 2nd argument in RANK(A1,(B1,B2,B3),1)
  */
 public class RefListEval implements ValueEval {
-    private final List<ValueEval> list = new ArrayList<ValueEval>();
+    private final List<ValueEval> list = new ArrayList<>();
 
     public RefListEval(ValueEval v1, ValueEval v2) {
         add(v1);
index 8d271e3da5004e97e7be63ff07c4ad03a433b27d..bc5fdf174155c1918fbf89adc1b35c90bd8425bf 100644 (file)
@@ -49,7 +49,7 @@ final class ForkedEvaluationSheet implements EvaluationSheet {
 
     public ForkedEvaluationSheet(EvaluationSheet masterSheet) {
         _masterSheet = masterSheet;
-        _sharedCellsByRowCol = new HashMap<RowColKey, ForkedEvaluationCell>();
+        _sharedCellsByRowCol = new HashMap<>();
     }
 
     @Override
index 704aa75ced82c9c7046922887449921bbe6a2d50..8ba3aeef7507a37e0ebb21eaeba9efc8fb89c290 100644 (file)
@@ -47,7 +47,7 @@ final class ForkedEvaluationWorkbook implements EvaluationWorkbook {
 
     public ForkedEvaluationWorkbook(EvaluationWorkbook master) {
         _masterBook = master;
-        _sharedSheetsByName = new HashMap<String, ForkedEvaluationSheet>();
+        _sharedSheetsByName = new HashMap<>();
     }
 
     public ForkedEvaluationCell getOrCreateUpdatableCell(String sheetName, int rowIndex,
index b44a03ef3dfeaa44cf0215f746272d4ed430cf79..c535bf4ca2c3c22f11249c498b80c9ebc23f98dc 100644 (file)
@@ -37,9 +37,9 @@ final class FunctionDataBuilder {
 
        public FunctionDataBuilder(int sizeEstimate) {
                _maxFunctionIndex = -1;
-               _functionDataByName = new HashMap<String,FunctionMetadata>(sizeEstimate * 3 / 2);
-               _functionDataByIndex = new HashMap<Integer,FunctionMetadata>(sizeEstimate * 3 / 2);
-               _mutatingFunctionIndexes = new HashSet<Integer>();
+               _functionDataByName = new HashMap<>(sizeEstimate * 3 / 2);
+               _functionDataByIndex = new HashMap<>(sizeEstimate * 3 / 2);
+               _mutatingFunctionIndexes = new HashSet<>();
        }
 
        public void add(int functionIndex, String functionName, int minParams, int maxParams,
index 02a9267df1a0cffca7d77cd43038efd8c7e78401..29b9612aecd299d0667640e22599b58143e0c7b7 100644 (file)
@@ -50,7 +50,7 @@ final class FunctionMetadataReader {
                // except in these cases
                "LOG10", "ATAN2", "DAYS360", "SUMXMY2", "SUMX2MY2", "SUMX2PY2",
        };
-       private static final Set<String> DIGIT_ENDING_FUNCTION_NAMES_SET = new HashSet<String>(Arrays.asList(DIGIT_ENDING_FUNCTION_NAMES));
+       private static final Set<String> DIGIT_ENDING_FUNCTION_NAMES_SET = new HashSet<>(Arrays.asList(DIGIT_ENDING_FUNCTION_NAMES));
 
        public static FunctionMetadataRegistry createRegistry() {
            try {
index c96c4c6e54926c8837e2fc3d3f70e7cfd5e7f57f..8c3394854d87c256a13bab02fb25b60c5526631d 100644 (file)
@@ -46,7 +46,7 @@ public class FactDouble extends Fixed1ArgFunction implements FreeRefFunction {
     public static final FreeRefFunction instance = new FactDouble();
 
     //Caching of previously calculated factorial for speed
-    static HashMap<Integer, BigInteger> cache = new HashMap<Integer, BigInteger>();
+    static HashMap<Integer, BigInteger> cache = new HashMap<>();
 
     public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval numberVE) {
         int number;
index 5f21324d53e7a84dedfa2ffd43b32f7ccf320ea7..fb285bc34c079d7d18e93d64975ea56040b08f56 100644 (file)
@@ -76,7 +76,7 @@ public final class Mode implements Function {
        public ValueEval evaluate(ValueEval[] args, int srcCellRow, int srcCellCol) {
                double result;
                try {
-                       List<Double> temp = new ArrayList<Double>();
+                       List<Double> temp = new ArrayList<>();
                        for (int i = 0; i < args.length; i++) {
                                collectValues(args[i], temp);
                        }
index c2c58293593dcf4e70a707ad0f284fe8d543302d..9b5bff897f7d97b33316bfaa1f6ddb4e849727af 100644 (file)
@@ -102,7 +102,7 @@ public class Subtotal implements Function {
                }
 
                // ignore the first arg, this is the function-type, we check for the length above
-               final List<ValueEval> list = new ArrayList<ValueEval>(Arrays.asList(args).subList(1, args.length));
+               final List<ValueEval> list = new ArrayList<>(Arrays.asList(args).subList(1, args.length));
 
                Iterator<ValueEval> it = list.iterator();
 
index fc5e6e89913b151fe847a55cd480879110a517f0..ed7c1d4c30a265b1e49514d375da7951d6731c41 100644 (file)
@@ -44,7 +44,7 @@ public abstract class Ptg {
         * Extra data (beyond <tt>size</tt>) may be read if and <tt>ArrayPtg</tt>s are present.
         */
        public static Ptg[] readTokens(int size, LittleEndianInput in) {
-               List<Ptg> temp = new ArrayList<Ptg>(4 + size / 2);
+               List<Ptg> temp = new ArrayList<>(4 + size / 2);
                int pos = 0;
                boolean hasArrayPtgs = false;
                while (pos < size) {
@@ -205,7 +205,7 @@ public abstract class Ptg {
                        ptg.write(out);
                        if (ptg instanceof ArrayPtg) {
                                if (arrayPtgs == null) {
-                                       arrayPtgs = new ArrayList<Ptg>(5);
+                                       arrayPtgs = new ArrayList<>(5);
                                }
                                arrayPtgs.add(ptg);
                        }
index ece80345c03528c5e2d4a0ba9668cae83a321e83..593a0ee1b52d1cb53e4d639472c96f292d714fd5 100644 (file)
@@ -39,7 +39,7 @@ public class AggregatingUDFFinder implements UDFFinder {
     private final Collection<UDFFinder> _usedToolPacks;
 
     public AggregatingUDFFinder(UDFFinder ... usedToolPacks) {
-        _usedToolPacks = new ArrayList<UDFFinder>(usedToolPacks.length);
+        _usedToolPacks = new ArrayList<>(usedToolPacks.length);
         _usedToolPacks.addAll(Arrays.asList(usedToolPacks));
     }
 
index 382820b1efeb2f33c21104251c7457e6e26e89b3..42340545830ecf773941aa114213f8d97f3b16f8 100644 (file)
@@ -37,7 +37,7 @@ public final class DefaultUDFFinder implements UDFFinder {
             throw new IllegalArgumentException(
                     "Mismatch in number of function names and implementations");
         }
-        HashMap<String, FreeRefFunction> m = new HashMap<String, FreeRefFunction>(nFuncs * 3 / 2);
+        HashMap<String, FreeRefFunction> m = new HashMap<>(nFuncs * 3 / 2);
         for (int i = 0; i < functionImpls.length; i++) {
             m.put(functionNames[i].toUpperCase(Locale.ROOT), functionImpls[i]);
         }
index 27ceaef3c17f05753e62e0397de65bf2c013a34d..c5af8d52541e1c14237f9886e5be5d9592b81bc3 100644 (file)
@@ -32,7 +32,7 @@ public class IndexedUDFFinder extends AggregatingUDFFinder {
 
     public IndexedUDFFinder(UDFFinder... usedToolPacks) {
         super(usedToolPacks);
-        _funcMap = new HashMap<Integer, String>();
+        _funcMap = new HashMap<>();
     }
 
     @Override
index ab3653af3395439d5a99dafba5e147ea8210104b..a5681cd4b9967c97f5a74a7f7fa581ae7e5a4500 100644 (file)
@@ -26,7 +26,7 @@ import java.util.Map;
  * Represents a type of a conditional formatting rule
  */
 public class ConditionType {
-    private static Map<Integer,ConditionType> lookup = new HashMap<Integer, ConditionType>();
+    private static Map<Integer,ConditionType> lookup = new HashMap<>();
     
     /**
      * This conditional formatting rule compares a cell value
index 9cacd0d6fc9202ad449e7037114b2d46db6076cd..66e8c2834435537335e38624cd33ef081b3353c1 100644 (file)
@@ -202,7 +202,7 @@ public class DataFormatter implements Observer {
      * A map to cache formats.
      *  Map<String,Format> formats
      */
-    private final Map<String,Format> formats = new HashMap<String,Format>();
+    private final Map<String,Format> formats = new HashMap<>();
 
     private final boolean emulateCSV;
 
@@ -508,7 +508,7 @@ public class DataFormatter implements Observer {
         StringBuilder sb = new StringBuilder();
         char[] chars = formatStr.toCharArray();
         boolean mIsMonth = true;
-        List<Integer> ms = new ArrayList<Integer>();
+        List<Integer> ms = new ArrayList<>();
         boolean isElapsed = false;
         for(int j=0; j<chars.length; j++) {
             char c = chars[j];
index ffaaa0f1bad9b1f7d092c951910ba51fee039acf..60cc74500af061035e830059c4713221df352938 100644 (file)
@@ -333,8 +333,8 @@ public class DateUtil {
             return -1;
         }
     };
-    private static ThreadLocal<String> lastFormatString = new ThreadLocal<String>();
-    private static ThreadLocal<Boolean> lastCachedResult = new ThreadLocal<Boolean>();
+    private static ThreadLocal<String> lastFormatString = new ThreadLocal<>();
+    private static ThreadLocal<Boolean> lastCachedResult = new ThreadLocal<>();
     
     private static boolean isCached(String formatString, int formatIndex) {
         String cachedFormatString = lastFormatString.get();
index fa102299e8a9b7eeec9dcd3ecae8171e39fb839d..2ce1e44fe244c17b02294ac6e5b315eb99e02b0d 100644 (file)
@@ -147,9 +147,9 @@ public enum FormulaError {
         return repr;
     }
 
-    private static final Map<String, FormulaError> smap = new HashMap<String, FormulaError>();
-    private static final Map<Byte, FormulaError> bmap = new HashMap<Byte, FormulaError>();
-    private static final Map<Integer, FormulaError> imap = new HashMap<Integer, FormulaError>();
+    private static final Map<String, FormulaError> smap = new HashMap<>();
+    private static final Map<Byte, FormulaError> bmap = new HashMap<>();
+    private static final Map<Integer, FormulaError> imap = new HashMap<>();
     static{
         for (FormulaError error : values()) {
             bmap.put(error.getCode(), error);
index 75e7fd9a814a6047f88b1d158c1f80d34b198df1..a0d293c78b190c452266f2c55291dc051b7ad14a 100644 (file)
@@ -35,7 +35,7 @@ public class DataSources {
     }
 
     public static <T> ChartDataSource<T> fromArray(T[] elements) {
-        return new ArrayDataSource<T>(elements);
+        return new ArrayDataSource<>(elements);
     }
 
     public static ChartDataSource<Number> fromNumericCellRange(Sheet sheet, CellRangeAddress cellRangeAddress) {
index 13777dc909d4032c005a2bbfaba2c0401506d401..83c634de7391d9086bf3f59da9d3334bcdeb5e40 100644 (file)
@@ -50,8 +50,8 @@ public abstract class RowShifter {
      * @return an array of affected merged regions, doesn't contain deleted ones
      */
     public List<CellRangeAddress> shiftMergedRegions(int startRow, int endRow, int n) {
-        List<CellRangeAddress> shiftedRegions = new ArrayList<CellRangeAddress>();
-        Set<Integer> removedIndices = new HashSet<Integer>();
+        List<CellRangeAddress> shiftedRegions = new ArrayList<>();
+        Set<Integer> removedIndices = new HashSet<>();
         //move merged regions completely if they fall within the new region boundaries when they are shifted
         int size = sheet.getNumMergedRegions();
         for (int i = 0; i < size; i++) {
index fab3619b3590752d64c1e3de30fe6b850dcf87db..44fcab2b6dddbb0b69db87e25f9b5b19d30ccd49 100644 (file)
@@ -236,7 +236,7 @@ public class AreaReference {
         if (null == version) {
             version = DEFAULT_SPREADSHEET_VERSION; // how the code used to behave. 
         }
-        List<AreaReference> refs = new ArrayList<AreaReference>();
+        List<AreaReference> refs = new ArrayList<>();
         StringTokenizer st = new StringTokenizer(reference, ",");
         while(st.hasMoreTokens()) {
             refs.add(
@@ -287,7 +287,7 @@ public class AreaReference {
         int maxCol = Math.max(_firstCell.getCol(), _lastCell.getCol());
         String sheetName = _firstCell.getSheetName();
         
-        List<CellReference> refs = new ArrayList<CellReference>();
+        List<CellReference> refs = new ArrayList<>();
         for(int row=minRow; row<=maxRow; row++) {
             for(int col=minCol; col<=maxCol; col++) {
                 CellReference ref = new CellReference(sheetName, row, col, _firstCell.isRowAbsolute(), _firstCell.isColAbsolute());
index 8d99198234d3d22f81863dca29b35664b8b40372..7dad2a763d0fd1a29a0a2bd818b2bb70bf7d40ca 100644 (file)
@@ -45,7 +45,7 @@ public class CellRangeAddressList {
        protected final List<CellRangeAddress> _list;
 
        public CellRangeAddressList() {
-               _list = new ArrayList<CellRangeAddress>();
+               _list = new ArrayList<>();
        }
        /**
         * Convenience constructor for creating a <tt>CellRangeAddressList</tt> with a single 
index e60230ed8b190eee012f81abd453376d2c03bebb..892778d45729f026035cf5f21631fd9197300248 100644 (file)
@@ -171,7 +171,7 @@ public final class CellRangeUtil {
         return result;
     }
     private static List<CellRangeAddress> toList(CellRangeAddress[] temp) {
-        List<CellRangeAddress> result = new ArrayList<CellRangeAddress>(temp.length);
+        List<CellRangeAddress> result = new ArrayList<>(temp.length);
         for (CellRangeAddress range : temp) {
             result.add(range);
         }
index 855c2844696daab38c2292fd31b7cc4b49ca171d..cab7d8f49b301587ed761c94260b184641214ce9 100644 (file)
@@ -75,7 +75,7 @@ public final class CellUtil {
     public static final String WRAP_TEXT = "wrapText";
     
     private static final Set<String> shortValues = Collections.unmodifiableSet(
-            new HashSet<String>(Arrays.asList(
+            new HashSet<>(Arrays.asList(
                     BOTTOM_BORDER_COLOR,
                     LEFT_BORDER_COLOR,
                     RIGHT_BORDER_COLOR,
@@ -86,20 +86,20 @@ public final class CellUtil {
                     DATA_FORMAT,
                     FONT,
                     ROTATION
-    )));
+            )));
     private static final Set<String> booleanValues = Collections.unmodifiableSet(
-            new HashSet<String>(Arrays.asList(
+            new HashSet<>(Arrays.asList(
                     LOCKED,
                     HIDDEN,
                     WRAP_TEXT
-    )));
+            )));
     private static final Set<String> borderTypeValues = Collections.unmodifiableSet(
-            new HashSet<String>(Arrays.asList(
+            new HashSet<>(Arrays.asList(
                     BORDER_BOTTOM,
                     BORDER_LEFT,
                     BORDER_RIGHT,
                     BORDER_TOP
-    )));
+            )));
     
 
 
@@ -334,7 +334,7 @@ public final class CellUtil {
      * @see #setFormatProperties(org.apache.poi.ss.usermodel.CellStyle, org.apache.poi.ss.usermodel.Workbook, java.util.Map)
      */
     private static Map<String, Object> getFormatProperties(CellStyle style) {
-        Map<String, Object> properties = new HashMap<String, Object>();
+        Map<String, Object> properties = new HashMap<>();
         put(properties, ALIGNMENT, style.getAlignmentEnum());
         put(properties, VERTICAL_ALIGNMENT, style.getVerticalAlignmentEnum());
         put(properties, BORDER_BOTTOM, style.getBorderBottomEnum());
index 4d24a62ec8b7234012f650db50505a7f812b8119..cfe403b5af0953e79e29cb823734e48a30abd961 100644 (file)
@@ -81,7 +81,7 @@ public class DateFormatConverter  {
                }
                
                public static String[] tokenize( String format ) {
-                       List<String> result = new ArrayList<String>();
+                       List<String> result = new ArrayList<>();
                        
                        DateFormatTokenizer tokenizer = new DateFormatTokenizer(format);
                        String token;
@@ -113,7 +113,7 @@ public class DateFormatConverter  {
        private static Map<String,String> localePrefixes = prepareLocalePrefixes();
        
        private static Map<String,String> prepareTokenConversions() {
-               Map<String,String> result = new HashMap<String,String>();
+               Map<String,String> result = new HashMap<>();
                
                result.put( "EEEE", "dddd" );
                result.put( "EEE", "ddd" );
@@ -135,7 +135,7 @@ public class DateFormatConverter  {
        }
        
        private static Map<String,String> prepareLocalePrefixes() {
-               Map<String,String> result = new HashMap<String,String>();
+               Map<String,String> result = new HashMap<>();
                
                result.put( "af", "[$-0436]" );
                result.put( "am", "[$-45E]" );
index 1b0e27593b970838bf40ca7f2fda375aa061f690..7b310cdbd7c2e9fe29cc569531c4cee0d68ba6b3 100644 (file)
@@ -63,7 +63,7 @@ public final class PropertyTemplate {
      * Create a PropertyTemplate object
      */
     public PropertyTemplate() {
-        _propertyTemplate = new HashMap<CellAddress, Map<String, Object>>();
+        _propertyTemplate = new HashMap<>();
     }
     
     /**
@@ -83,7 +83,7 @@ public final class PropertyTemplate {
     }
     
     private static Map<String, Object> cloneCellProperties(Map<String, Object> properties) {
-        Map<String, Object> newProperties = new HashMap<String, Object>(); 
+        Map<String, Object> newProperties = new HashMap<>();
         for(Map.Entry<String, Object> entry : properties.entrySet()) {
             newProperties.put(entry.getKey(), entry.getValue());
         }
@@ -411,7 +411,7 @@ public final class PropertyTemplate {
      * @parm range - {@link CellRangeAddress} range of cells to remove borders.
      */
     private void removeBorders(CellRangeAddress range) {
-        Set<String> properties = new HashSet<String>();
+        Set<String> properties = new HashSet<>();
         properties.add(CellUtil.BORDER_TOP);
         properties.add(CellUtil.BORDER_BOTTOM);
         properties.add(CellUtil.BORDER_LEFT);
@@ -758,7 +758,7 @@ public final class PropertyTemplate {
      * @parm range - {@link CellRangeAddress} range of cells to remove borders.
      */
     private void removeBorderColors(CellRangeAddress range) {
-        Set<String> properties = new HashSet<String>();
+        Set<String> properties = new HashSet<>();
         properties.add(CellUtil.TOP_BORDER_COLOR);
         properties.add(CellUtil.BOTTOM_BORDER_COLOR);
         properties.add(CellUtil.LEFT_BORDER_COLOR);
@@ -795,7 +795,7 @@ public final class PropertyTemplate {
         CellAddress cell = new CellAddress(row, col);
         Map<String, Object> cellProperties = _propertyTemplate.get(cell);
         if (cellProperties == null) {
-            cellProperties = new HashMap<String, Object>();
+            cellProperties = new HashMap<>();
         }
         cellProperties.put(property, value);
         _propertyTemplate.put(cell, cellProperties);
index f58a2780e8e5a50909e3ddd2cc7fd343243edd17..e948465567f186f5251a547f38a98541a19339ab 100644 (file)
@@ -57,7 +57,7 @@ public final class SSCellRange<K extends Cell> implements CellRange<K> {
                @SuppressWarnings("unchecked")
                B[] flattenedArray = (B[]) Array.newInstance(cellClass, nItems);
                flattenedList.toArray(flattenedArray);
-               return new SSCellRange<B>(firstRow, firstColumn, height, width, flattenedArray);
+               return new SSCellRange<>(firstRow, firstColumn, height, width, flattenedArray);
        }
 
        public int getHeight() {
@@ -109,7 +109,7 @@ public final class SSCellRange<K extends Cell> implements CellRange<K> {
                return result;
        }
        public Iterator<K> iterator() {
-               return new ArrayIterator<K>(_flattenedArray);
+               return new ArrayIterator<>(_flattenedArray);
        }
        private static final class ArrayIterator<D> implements Iterator<D> {
 
index 047d5cb1dae9c2637a0b3685b2f7cb5ae31d2425..e35c80cacc312f05454c6b884966b84d87c9a4ad 100644 (file)
@@ -24,7 +24,7 @@ import java.util.*;
  * Returns immutable Bitfield instances.
  */
 public class BitFieldFactory {
-    private static Map<Integer, BitField> instances = new HashMap<Integer, BitField>();
+    private static Map<Integer, BitField> instances = new HashMap<>();
 
     public static BitField getInstance(int mask) {
       BitField f = instances.get(Integer.valueOf(mask));
index 97b3eca3e68f182e601d0767654cb2522b07af0a..1db930f25d11a6b6188cd32738b70dbb6b519a47 100644 (file)
@@ -95,7 +95,7 @@ public class HexRead {
     {
         int characterCount = 0;
         byte b = (byte) 0;
-        List<Byte> bytes = new ArrayList<Byte>();
+        List<Byte> bytes = new ArrayList<>();
         final char a = 'a' - 10;
         final char A = 'A' - 10;
         while ( true ) {
index d5cdc7b67b3eeb7d3d7415898f7b75231bb164f4..921b820b842a0c6360b0e713056fc7346d7a3f13 100644 (file)
@@ -52,8 +52,8 @@ public class IntMapper<T>
 
     public IntMapper(final int initialCapacity)
     {
-        elements = new ArrayList<T>(initialCapacity);
-        valueKeyMap = new HashMap<T,Integer>(initialCapacity);
+        elements = new ArrayList<>(initialCapacity);
+        valueKeyMap = new HashMap<>(initialCapacity);
     }
 
     /**
index 35d0b0ebe1930588206f934f839721b276c6c087..70d9a50750a51e96d3350171768b0394c34ac00d 100644 (file)
@@ -52,8 +52,8 @@ public final class LocaleUtil {
      */
     public static final Charset CHARSET_1252 = Charset.forName("CP1252");
 
-    private static final ThreadLocal<TimeZone> userTimeZone = new ThreadLocal<TimeZone>();
-    private static final ThreadLocal<Locale> userLocale = new ThreadLocal<Locale>();
+    private static final ThreadLocal<TimeZone> userTimeZone = new ThreadLocal<>();
+    private static final ThreadLocal<Locale> userLocale = new ThreadLocal<>();
     
     /**
      * As time zone information is not stored in any format, it can be
index 34460702fc44f3863e26f09810c46bd058401a37..528c9189395dae7b0a59e6f00ea405ebefb1fa4a 100644 (file)
@@ -35,7 +35,7 @@ public final class POILogFactory {
     /**
      * Map of POILogger instances, with classes as keys
      */
-    private static final Map<String,POILogger> _loggers = new HashMap<String,POILogger>();
+    private static final Map<String,POILogger> _loggers = new HashMap<>();
 
     /**
      * A common instance of NullLogger, as it does nothing
index 30aee7a066dd4465977e49f8e26ec7cc07547a3e..ddfc8e2fe46f53532fbe12b7135484a2cd1658f8 100644 (file)
@@ -370,7 +370,7 @@ public class StringUtil {
    
    private static synchronized void initMsCodepointMap() {
        if (msCodepointToUnicode != null) return;
-       msCodepointToUnicode = new HashMap<Integer,Integer>();
+       msCodepointToUnicode = new HashMap<>();
        int i=0xF020;
        for (int ch : symbolMap_f020) {
            msCodepointToUnicode.put(i++, ch);
index 9cba7545e911fb28d128465bf75d2b831bf2a327..a7eaaf2c87794bdfc1b721875b6bb21056a97de2 100644 (file)
@@ -159,7 +159,7 @@ public abstract class POIXMLDocument extends POIXMLDocumentPart implements Close
     public abstract List<PackagePart> getAllEmbedds() throws OpenXML4JException;
 
     protected final void load(POIXMLFactory factory) throws IOException {
-        Map<PackagePart, POIXMLDocumentPart> context = new HashMap<PackagePart, POIXMLDocumentPart>();
+        Map<PackagePart, POIXMLDocumentPart> context = new HashMap<>();
         try {
             read(factory, context);
         } catch (OpenXML4JException e){
@@ -216,7 +216,7 @@ public abstract class POIXMLDocument extends POIXMLDocumentPart implements Close
         
         //force all children to commit their changes into the underlying OOXML Package
         // TODO Shouldn't they be committing to the new one instead?
-        Set<PackagePart> context = new HashSet<PackagePart>();
+        Set<PackagePart> context = new HashSet<>();
         onSave(context);
         context.clear();
 
index a777887e96030951520b11de5ccf23096e7f2955..c5afb154465c5a18f7b9a874bc2de3fb327309f9 100644 (file)
@@ -54,7 +54,7 @@ public class POIXMLDocumentPart {
     private String coreDocumentRel = PackageRelationshipTypes.CORE_DOCUMENT;
     private PackagePart packagePart;
     private POIXMLDocumentPart parent;
-    private Map<String,RelationPart> relations = new LinkedHashMap<String,RelationPart>();
+    private Map<String,RelationPart> relations = new LinkedHashMap<>();
 
     /**
      * The RelationPart is a cached relationship between the document, which contains the RelationPart,
@@ -202,7 +202,7 @@ public class POIXMLDocumentPart {
      * @return child relations
      */
     public final List<POIXMLDocumentPart> getRelations(){
-        List<POIXMLDocumentPart> l = new ArrayList<POIXMLDocumentPart>();
+        List<POIXMLDocumentPart> l = new ArrayList<>();
         for (RelationPart rp : relations.values()) {
             l.add(rp.getDocumentPart());
         }
@@ -215,7 +215,7 @@ public class POIXMLDocumentPart {
      * @return child relations
      */
     public final List<RelationPart> getRelationParts() {
-        List<RelationPart> l = new ArrayList<RelationPart>(relations.values());
+        List<RelationPart> l = new ArrayList<>(relations.values());
         return Collections.unmodifiableList(l);
     }
 
@@ -554,7 +554,7 @@ public class POIXMLDocumentPart {
         if (!pp.hasRelationships()) return;
 
         PackageRelationshipCollection rels = packagePart.getRelationships();
-        List<POIXMLDocumentPart> readLater = new ArrayList<POIXMLDocumentPart>();
+        List<POIXMLDocumentPart> readLater = new ArrayList<>();
 
         // scan breadth-first, so parent-relations are hopefully the shallowest element
         for (PackageRelationship rel : rels) {
index 7452da8f71fab063e6c521fca1c227c5234a611f..0bfdcfd7c18dd710e075edc115df90eadc9ce90b 100644 (file)
@@ -50,7 +50,7 @@ import org.xml.sax.SAXException;
 @SuppressWarnings("deprecation")
 public class POIXMLTypeLoader {
 
-    private static ThreadLocal<SchemaTypeLoader> typeLoader = new ThreadLocal<SchemaTypeLoader>();
+    private static ThreadLocal<SchemaTypeLoader> typeLoader = new ThreadLocal<>();
 
     // TODO: Do these have a good home like o.a.p.openxml4j.opc.PackageNamespaces and PackageRelationshipTypes?
     // These constants should be common to all of POI and easy to use by other applications such as Tika
@@ -76,7 +76,7 @@ public class POIXMLTypeLoader {
         // when reading properties in separate workbooks in multiple threads
         // DEFAULT_XML_OPTIONS.setUnsynchronized();
 
-        Map<String, String> map = new HashMap<String, String>();
+        Map<String, String> map = new HashMap<>();
         map.put("http://schemas.openxmlformats.org/drawingml/2006/main", "a");
         map.put("http://schemas.openxmlformats.org/drawingml/2006/chart", "c");
         map.put("http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing", "wp");
index b51c31d78ec133c4a666fa93c7595b08a99ff051..3ee469d1b9f9536f26cf25fcf61ae1223a32cf05 100644 (file)
@@ -326,9 +326,9 @@ public class ExtractorFactory {
      */
     public static POITextExtractor[] getEmbededDocsTextExtractors(POIOLE2TextExtractor ext) throws IOException, OpenXML4JException, XmlException {
         // All the embedded directories we spotted
-        ArrayList<Entry> dirs = new ArrayList<Entry>();
+        ArrayList<Entry> dirs = new ArrayList<>();
         // For anything else not directly held in as a POIFS directory
-        ArrayList<InputStream> nonPOIFS = new ArrayList<InputStream>();
+        ArrayList<InputStream> nonPOIFS = new ArrayList<>();
 
         // Find all the embedded directories
         DirectoryEntry root = ext.getRoot();
@@ -381,7 +381,7 @@ public class ExtractorFactory {
             return new POITextExtractor[0];
         }
 
-        ArrayList<POITextExtractor> textExtractors = new ArrayList<POITextExtractor>();
+        ArrayList<POITextExtractor> textExtractors = new ArrayList<>();
         for (Entry dir : dirs) {
             textExtractors.add(createExtractor((DirectoryNode) dir));
         }
index 15031fbcf61d9ab02acdc95ffd23f71fc57a27ba..636a3f7329d9a65cb532d9d6182b40858b70c131 100644 (file)
@@ -146,8 +146,8 @@ public abstract class OPCPackage implements RelationshipSource, Closeable {
         * Initialize the package instance.
         */
        private void init() {
-               this.partMarshallers = new HashMap<ContentType, PartMarshaller>(5);
-               this.partUnmarshallers = new HashMap<ContentType, PartUnmarshaller>(2);
+               this.partMarshallers = new HashMap<>(5);
+               this.partUnmarshallers = new HashMap<>(2);
 
                try {
                        // Add 'default' unmarshaller
@@ -417,7 +417,7 @@ public abstract class OPCPackage implements RelationshipSource, Closeable {
                        pkg.packageProperties = new PackagePropertiesPart(pkg,
                                        PackagingURIHelper.CORE_PROPERTIES_PART_NAME);
                        pkg.packageProperties.setCreatorProperty("Generated by Apache POI OpenXML4J");
-                       pkg.packageProperties.setCreatedProperty(new Nullable<Date>(new Date()));
+                       pkg.packageProperties.setCreatedProperty(new Nullable<>(new Date()));
                } catch (InvalidFormatException e) {
                        // Should never happen
                        throw new IllegalStateException(e);
@@ -648,7 +648,7 @@ public abstract class OPCPackage implements RelationshipSource, Closeable {
         * @return All part associated to the specified content type.
         */
        public ArrayList<PackagePart> getPartsByContentType(String contentType) {
-               ArrayList<PackagePart> retArr = new ArrayList<PackagePart>();
+               ArrayList<PackagePart> retArr = new ArrayList<>();
                for (PackagePart part : partList.sortedValues()) {
                        if (part.getContentType().equals(contentType)) {
                                retArr.add(part);
@@ -671,7 +671,7 @@ public abstract class OPCPackage implements RelationshipSource, Closeable {
                if (relationshipType == null) {
                        throw new IllegalArgumentException("relationshipType");
                }
-               ArrayList<PackagePart> retArr = new ArrayList<PackagePart>();
+               ArrayList<PackagePart> retArr = new ArrayList<>();
                for (PackageRelationship rel : getRelationshipsByType(relationshipType)) {
                        PackagePart part = getPart(rel);
                        if (part != null) {
@@ -695,7 +695,7 @@ public abstract class OPCPackage implements RelationshipSource, Closeable {
                throw new IllegalArgumentException("name pattern must not be null");
            }
            Matcher matcher = namePattern.matcher("");
-           ArrayList<PackagePart> result = new ArrayList<PackagePart>();
+           ArrayList<PackagePart> result = new ArrayList<>();
            for (PackagePart part : partList.sortedValues()) {
                PackagePartName partName = part.getPartName();
                if (matcher.reset(partName.getName()).matches()) {
@@ -811,7 +811,7 @@ public abstract class OPCPackage implements RelationshipSource, Closeable {
                                }
                        }
                }
-               return new ArrayList<PackagePart>(partList.sortedValues());
+               return new ArrayList<>(partList.sortedValues());
        }
 
        /**
index 71cb6e7fd6826ba7731a273f73aff08ea1d45de7..ed0b9f7897048ea5574e1b432f6ce37016d89f24 100644 (file)
@@ -36,10 +36,10 @@ public final class PackagePartCollection implements Serializable {
         * HashSet use to store this collection part names as string for rule
         * M1.11 optimized checking.
         */
-       private HashSet<String> registerPartNameStr = new HashSet<String>();
+       private HashSet<String> registerPartNameStr = new HashSet<>();
 
 
-       private final HashMap<PackagePartName, PackagePart> packagePartLookup = new HashMap<PackagePartName, PackagePart>();
+       private final HashMap<PackagePartName, PackagePart> packagePartLookup = new HashMap<>();
 
 
        /**
@@ -79,7 +79,7 @@ public final class PackagePartCollection implements Serializable {
         * avoids paying the high cost of Natural Ordering per insertion.
         */
        public Collection<PackagePart> sortedValues() {
-               ArrayList<PackagePart> packageParts = new ArrayList<PackagePart>(packagePartLookup.values());
+               ArrayList<PackagePart> packageParts = new ArrayList<>(packagePartLookup.values());
                Collections.sort(packageParts);
                return packageParts;
 
index 912a3d5b8c8625b9767f708f3a08e97853b266ee..953af91eeb081c89429ac95380290b7d7ccc4663 100644 (file)
@@ -55,7 +55,7 @@ public final class PackageRelationshipCollection implements
     /**
      * A lookup of internal relationships to avoid
      */
-    private HashMap<String, PackageRelationship> internalRelationshipsByTargetName = new HashMap<String, PackageRelationship>();
+    private HashMap<String, PackageRelationship> internalRelationshipsByTargetName = new HashMap<>();
 
 
     /**
@@ -88,8 +88,8 @@ public final class PackageRelationshipCollection implements
      * Constructor.
      */
     PackageRelationshipCollection() {
-        relationshipsByID = new TreeMap<String, PackageRelationship>();
-        relationshipsByType = new TreeMap<String, PackageRelationship>();
+        relationshipsByID = new TreeMap<>();
+        relationshipsByType = new TreeMap<>();
     }
 
     /**
@@ -392,7 +392,7 @@ public final class PackageRelationshipCollection implements
      *         specified type contain in this collection.
      */
     public Iterator<PackageRelationship> iterator(String typeFilter) {
-        ArrayList<PackageRelationship> retArr = new ArrayList<PackageRelationship>();
+        ArrayList<PackageRelationship> retArr = new ArrayList<>();
         for (PackageRelationship rel : relationshipsByID.values()) {
             if (rel.getRelationshipType().equals(typeFilter))
                 retArr.add(rel);
index a56e0cdf35bfe2846f8daac3f27adbd542d0b541..276aba59cd06abf56198079941fb103b29192206 100644 (file)
@@ -162,7 +162,7 @@ public final class ContentType {
                        this.subType = mMediaType.group(2);
                        
                        // Parameters
-                       this.parameters = new HashMap<String, String>();
+                       this.parameters = new HashMap<>();
                        // Java RegExps are unhelpful, and won't do multiple group captures
                        // See http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html#cg
                        if (mMediaType.groupCount() >= 5) {
index 750f9cd71af0104cbc92ee30a2f9786cda190ab8..1740d57947e300e2c91371c8ba1938ea474d6984 100644 (file)
@@ -94,7 +94,7 @@ public abstract class ContentTypeManager {
        public ContentTypeManager(InputStream in, OPCPackage pkg)
                        throws InvalidFormatException {
                this.container = pkg;
-               this.defaultContentType = new TreeMap<String, String>();
+               this.defaultContentType = new TreeMap<>();
                if (in != null) {
                        try {
                                parseContentTypesFile(in);
@@ -167,7 +167,7 @@ public abstract class ContentTypeManager {
        private void addOverrideContentType(PackagePartName partName,
                        String contentType) {
                if (overrideContentType == null)
-                       overrideContentType = new TreeMap<PackagePartName, String>();
+                       overrideContentType = new TreeMap<>();
                overrideContentType.put(partName, contentType);
        }
 
index b1ea4f359c41a11158388c1645f6d949458ed4d2..b3d29d17246716a93b3ddd3b65cef7c7f4ae6efa 100644 (file)
@@ -95,7 +95,7 @@ public final class PackagePropertiesPart extends PackagePart implements
         * value might be used by an application's user interface to facilitate
         * navigation of a large set of documents. end example]
         */
-       protected Nullable<String> category = new Nullable<String>();
+       protected Nullable<String> category = new Nullable<>();
 
        /**
         * The status of the content.
@@ -103,7 +103,7 @@ public final class PackagePropertiesPart extends PackagePart implements
         * [Example: Values might include "Draft", "Reviewed", and "Final". end
         * example]
         */
-       protected Nullable<String> contentStatus = new Nullable<String>();
+       protected Nullable<String> contentStatus = new Nullable<>();
 
        /**
         * The type of content represented, generally defined by a specific use and
@@ -113,17 +113,17 @@ public final class PackagePropertiesPart extends PackagePart implements
         * "Exam". end example] [Note: This property is distinct from MIME content
         * types as defined in RFC 2616. end note]
         */
-       protected Nullable<String> contentType = new Nullable<String>();
+       protected Nullable<String> contentType = new Nullable<>();
 
        /**
         * Date of creation of the resource.
         */
-       protected Nullable<Date> created = new Nullable<Date>();
+       protected Nullable<Date> created = new Nullable<>();
 
        /**
         * An entity primarily responsible for making the content of the resource.
         */
-       protected Nullable<String> creator = new Nullable<String>();
+       protected Nullable<String> creator = new Nullable<>();
 
        /**
         * An explanation of the content of the resource.
@@ -132,19 +132,19 @@ public final class PackagePropertiesPart extends PackagePart implements
         * to a graphical representation of content, and a free-text account of the
         * content. end example]
         */
-       protected Nullable<String> description = new Nullable<String>();
+       protected Nullable<String> description = new Nullable<>();
 
        /**
         * An unambiguous reference to the resource within a given context.
         */
-       protected Nullable<String> identifier = new Nullable<String>();
+       protected Nullable<String> identifier = new Nullable<>();
 
        /**
         * A delimited set of keywords to support searching and indexing. This is
         * typically a list of terms that are not available elsewhere in the
         * properties.
         */
-       protected Nullable<String> keywords = new Nullable<String>();
+       protected Nullable<String> keywords = new Nullable<>();
 
        /**
         * The language of the intellectual content of the resource.
@@ -152,7 +152,7 @@ public final class PackagePropertiesPart extends PackagePart implements
         * [Note: IETF RFC 3066 provides guidance on encoding to represent
         * languages. end note]
         */
-       protected Nullable<String> language = new Nullable<String>();
+       protected Nullable<String> language = new Nullable<>();
 
        /**
         * The user who performed the last modification. The identification is
@@ -161,17 +161,17 @@ public final class PackagePropertiesPart extends PackagePart implements
         * [Example: A name, email address, or employee ID. end example] It is
         * recommended that this value be as concise as possible.
         */
-       protected Nullable<String> lastModifiedBy = new Nullable<String>();
+       protected Nullable<String> lastModifiedBy = new Nullable<>();
 
        /**
         * The date and time of the last printing.
         */
-       protected Nullable<Date> lastPrinted = new Nullable<Date>();
+       protected Nullable<Date> lastPrinted = new Nullable<>();
 
        /**
         * Date on which the resource was changed.
         */
-       protected Nullable<Date> modified = new Nullable<Date>();
+       protected Nullable<Date> modified = new Nullable<>();
 
        /**
         * The revision number.
@@ -179,22 +179,22 @@ public final class PackagePropertiesPart extends PackagePart implements
         * [Example: This value might indicate the number of saves or revisions,
         * provided the application updates it after each revision. end example]
         */
-       protected Nullable<String> revision = new Nullable<String>();
+       protected Nullable<String> revision = new Nullable<>();
 
        /**
         * The topic of the content of the resource.
         */
-       protected Nullable<String> subject = new Nullable<String>();
+       protected Nullable<String> subject = new Nullable<>();
 
        /**
         * The name given to the resource.
         */
-       protected Nullable<String> title = new Nullable<String>();
+       protected Nullable<String> title = new Nullable<>();
 
        /**
         * The version number. This value is set by the user or by the application.
         */
-       protected Nullable<String> version = new Nullable<String>();
+       protected Nullable<String> version = new Nullable<>();
 
        /*
         * Getters and setters
@@ -335,7 +335,7 @@ public final class PackagePropertiesPart extends PackagePart implements
                if (modified.hasValue()) {
                        return getDateValue(modified);
                }
-               return getDateValue(new Nullable<Date>(new Date()));
+               return getDateValue(new Nullable<>(new Date()));
        }
 
        /**
@@ -567,9 +567,9 @@ public final class PackagePropertiesPart extends PackagePart implements
         */
        private Nullable<String> setStringValue(String s) {
                if (s == null || s.equals("")) {
-                       return new Nullable<String>();
+                       return new Nullable<>();
                }
-               return new Nullable<String>(s);
+               return new Nullable<>(s);
        }
 
        /**
@@ -580,7 +580,7 @@ public final class PackagePropertiesPart extends PackagePart implements
         */
        private Nullable<Date> setDateValue(String dateStr) throws InvalidFormatException {
                if (dateStr == null || dateStr.equals("")) {
-                       return new Nullable<Date>();
+                       return new Nullable<>();
                }
 
                Matcher m = TIME_ZONE_PAT.matcher(dateStr);
@@ -592,7 +592,7 @@ public final class PackagePropertiesPart extends PackagePart implements
                                df.setTimeZone(LocaleUtil.TIMEZONE_UTC);
                                Date d = df.parse(dateTzStr, new ParsePosition(0));
                                if (d != null) {
-                                       return new Nullable<Date>(d);
+                                       return new Nullable<>(d);
                                }
                        }
                }
@@ -602,7 +602,7 @@ public final class PackagePropertiesPart extends PackagePart implements
                        df.setTimeZone(LocaleUtil.TIMEZONE_UTC);
                        Date d = df.parse(dateTzStr, new ParsePosition(0));
                        if (d != null) {
-                               return new Nullable<Date>(d);
+                               return new Nullable<>(d);
                        }
                }
                //if you're here, no pattern matched, throw exception
index 4c2b9df3e70884eff6d51c795d0603939ef69eb0..dfa9924617233d82e3765bd1f5e1f23d55b9b163 100644 (file)
@@ -45,7 +45,7 @@ public class ZipInputStreamZipEntrySource implements ZipEntrySource {
         *  work with the entries at-will.
         */
        public ZipInputStreamZipEntrySource(ThresholdInputStream inp) throws IOException {
-               zipEntries = new ArrayList<FakeZipEntry>();
+               zipEntries = new ArrayList<>();
                
                boolean going = true;
                while(going) {
index c10dd510e2e2e37ed410b5ffc2a8d794402cf2f3..82eb13817135eeba15ae6a88fe4cd154b40bc05c 100644 (file)
@@ -47,7 +47,7 @@ public class AgileEncryptionVerifier extends EncryptionVerifier implements Clone
         byte certVerifier[];
     }
     
-    private List<AgileCertificateEntry> certList = new ArrayList<AgileCertificateEntry>();
+    private List<AgileCertificateEntry> certList = new ArrayList<>();
     private int keyBits = -1;
     private int blockSize = -1;
 
@@ -176,7 +176,7 @@ public class AgileEncryptionVerifier extends EncryptionVerifier implements Clone
     public AgileEncryptionVerifier clone() throws CloneNotSupportedException {
         AgileEncryptionVerifier other = (AgileEncryptionVerifier)super.clone();
         // TODO: deep copy of certList
-        other.certList = new ArrayList<AgileCertificateEntry>(certList);
+        other.certList = new ArrayList<>(certList);
         return other;
     }
     
index 3ffb8100301da7db51f17cec05116450b8f9f444..99eb22001233131a3afba452c375bc34ad94627f 100644 (file)
@@ -364,7 +364,7 @@ public class AgileEncryptor extends Encryptor implements Cloneable {
     protected void marshallEncryptionDocument(EncryptionDocument ed, LittleEndianByteArrayOutputStream os) {
         XmlOptions xo = new XmlOptions();
         xo.setCharacterEncoding("UTF-8");
-        Map<String,String> nsMap = new HashMap<String,String>();
+        Map<String,String> nsMap = new HashMap<>();
         nsMap.put(passwordUri.toString(),"p");
         nsMap.put(certificateUri.toString(), "c");
         xo.setUseDefaultNamespace();
index f4402dcc818e59d3ff319ea2277fee655289d75f..f7729ecb2707252fea539277949e67dc5546cb04 100644 (file)
@@ -49,7 +49,7 @@ public class KeyInfoKeySelector extends KeySelector implements KeySelectorResult
 
     private static final POILogger LOG = POILogFactory.getLogger(KeyInfoKeySelector.class);
 
-    private List<X509Certificate> certChain = new ArrayList<X509Certificate>();
+    private List<X509Certificate> certChain = new ArrayList<>();
 
     @SuppressWarnings("unchecked")
     @Override
index 187272a90e06946ad2564a0c913cf183deb002a1..6784ef10aad0b5919ca871675d9322d3a74df09b 100644 (file)
@@ -68,12 +68,12 @@ public class SignatureConfig {
         void setSignatureConfig(SignatureConfig signatureConfig);        
     }
 
-    private ThreadLocal<OPCPackage> opcPackage = new ThreadLocal<OPCPackage>();
-    private ThreadLocal<XMLSignatureFactory> signatureFactory = new ThreadLocal<XMLSignatureFactory>();
-    private ThreadLocal<KeyInfoFactory> keyInfoFactory = new ThreadLocal<KeyInfoFactory>();
-    private ThreadLocal<Provider> provider = new ThreadLocal<Provider>();
+    private ThreadLocal<OPCPackage> opcPackage = new ThreadLocal<>();
+    private ThreadLocal<XMLSignatureFactory> signatureFactory = new ThreadLocal<>();
+    private ThreadLocal<KeyInfoFactory> keyInfoFactory = new ThreadLocal<>();
+    private ThreadLocal<Provider> provider = new ThreadLocal<>();
     
-    private List<SignatureFacet> signatureFacets = new ArrayList<SignatureFacet>();
+    private List<SignatureFacet> signatureFacets = new ArrayList<>();
     private HashAlgorithm digestAlgo = HashAlgorithm.sha1;
     private Date executionTime = new Date();
     private PrivateKey key;
@@ -156,7 +156,7 @@ public class SignatureConfig {
      * Map of namespace uris to prefix
      * If a mapping is specified, the corresponding elements will be prefixed
      */
-    Map<String,String> namespacePrefixes = new HashMap<String,String>();
+    Map<String,String> namespacePrefixes = new HashMap<>();
     
     /**
      * Inits and checks the config object.
index 766f8e68634869571c7da036762c6252b197ef9e..955dc74453215e1cd7cda772cbdc60835b37dffc 100644 (file)
@@ -473,7 +473,7 @@ public class SignatureInfo implements SignatureConfigurable {
         /*
          * Add ds:References that come from signing client local files.
          */
-        List<Reference> references = new ArrayList<Reference>();
+        List<Reference> references = new ArrayList<>();
         for (DigestInfo digestInfo : safe(digestInfos)) {
             byte[] documentDigestValue = digestInfo.digestValue;
 
@@ -486,7 +486,7 @@ public class SignatureInfo implements SignatureConfigurable {
         /*
          * Invoke the signature facets.
          */
-        List<XMLObject> objects = new ArrayList<XMLObject>();
+        List<XMLObject> objects = new ArrayList<>();
         for (SignatureFacet signatureFacet : signatureConfig.getSignatureFacets()) {
             LOG.log(POILogger.DEBUG, "invoking signature facet: " + signatureFacet.getClass().getSimpleName());
             signatureFacet.preSign(document, references, objects);
@@ -618,7 +618,7 @@ public class SignatureInfo implements SignatureConfigurable {
      */
     protected void writeDocument(Document document) throws MarshalException {
         XmlOptions xo = new XmlOptions();
-        Map<String,String> namespaceMap = new HashMap<String,String>();
+        Map<String,String> namespaceMap = new HashMap<>();
         for(Map.Entry<String,String> entry : signatureConfig.getNamespacePrefixes().entrySet()){
             namespaceMap.put(entry.getValue(), entry.getKey());
         }        
index 338174fcebe2196731b0d008e56f735085eb7192..017953f570ba4bd8f63bed40a07e8ea60d063ee7 100644 (file)
@@ -34,7 +34,7 @@ import org.w3c.dom.events.MutationEvent;
  * e.g. to register id attributes or set prefixes for registered namespaces
  */
 public class SignatureMarshalListener implements EventListener, SignatureConfigurable {
-    ThreadLocal<EventTarget> target = new ThreadLocal<EventTarget>();
+    ThreadLocal<EventTarget> target = new ThreadLocal<>();
     SignatureConfig signatureConfig;
     public void setEventTarget(EventTarget target) {
         this.target.set(target);
index 2a98e3b888b8e53383170a2edd2d4261b69ddbbf..12ba42c14c2262e1745c549433c9093c8bca5668 100644 (file)
@@ -48,7 +48,7 @@ public class EnvelopedSignatureFacet extends SignatureFacet {
         , List<Reference> references
         , List<XMLObject> objects)
     throws XMLSignatureException {
-        List<Transform> transforms = new ArrayList<Transform>();
+        List<Transform> transforms = new ArrayList<>();
         Transform envelopedTransform = newTransform(CanonicalizationMethod.ENVELOPED);
         transforms.add(envelopedTransform);
         Transform exclusiveTransform = newTransform(CanonicalizationMethod.EXCLUSIVE);
index 67d18dd28b55962862f9ded1b5d8cf9d7af8d03e..b3bfe9ecfbfbd364a20d8772bc31e751f0130ab2 100644 (file)
@@ -75,10 +75,10 @@ public class KeyInfoSignatureFacet extends SignatureFacet {
          * Construct the ds:KeyInfo element using JSR 105.
          */
         KeyInfoFactory keyInfoFactory = signatureConfig.getKeyInfoFactory();
-        List<Object> x509DataObjects = new ArrayList<Object>();
+        List<Object> x509DataObjects = new ArrayList<>();
         X509Certificate signingCertificate = signatureConfig.getSigningCertificateChain().get(0);
 
-        List<XMLStructure> keyInfoContent = new ArrayList<XMLStructure>();
+        List<XMLStructure> keyInfoContent = new ArrayList<>();
 
         if (signatureConfig.isIncludeKeyValue()) {
             KeyValue keyValue;
index f7b1f95470b9360677c79e3f127fcb789bbdc352..05073d21e6c205581993db28c938e7b87224688d 100644 (file)
@@ -98,11 +98,11 @@ public class OOXMLSignatureFacet extends SignatureFacet {
         , List<XMLObject> objects)
     throws XMLSignatureException {
 
-        List<Reference> manifestReferences = new ArrayList<Reference>();
+        List<Reference> manifestReferences = new ArrayList<>();
         addManifestReferences(manifestReferences);
         Manifest manifest =  getSignatureFactory().newManifest(manifestReferences);
 
-        List<XMLStructure> objectContent = new ArrayList<XMLStructure>();
+        List<XMLStructure> objectContent = new ArrayList<>();
         objectContent.add(manifest);
 
         addSignatureTime(document, objectContent);
@@ -121,7 +121,7 @@ public class OOXMLSignatureFacet extends SignatureFacet {
         OPCPackage ooxml = signatureConfig.getOpcPackage();
         List<PackagePart> relsEntryNames = ooxml.getPartsByContentType(ContentTypes.RELATIONSHIPS_PART);
 
-        Set<String> digestedPartNames = new HashSet<String>();
+        Set<String> digestedPartNames = new HashSet<>();
         for (PackagePart pp : relsEntryNames) {
             final String baseUri = pp.getPartName().getName().replaceFirst("(.*)/_rels/.*", "$1");
 
@@ -181,7 +181,7 @@ public class OOXMLSignatureFacet extends SignatureFacet {
             }
 
             if (parameterSpec.hasSourceIds()) {
-                List<Transform> transforms = new ArrayList<Transform>();
+                List<Transform> transforms = new ArrayList<>();
                 transforms.add(newTransform(RelationshipTransformService.TRANSFORM_URI, parameterSpec));
                 transforms.add(newTransform(CanonicalizationMethod.INCLUSIVE));
                 String uri = normalizePartName(pp.getPartName().getURI(), baseUri)
@@ -232,12 +232,12 @@ public class OOXMLSignatureFacet extends SignatureFacet {
         ctTime.setValue(nowStr);
 
         Element n = (Element)document.importNode(ctTime.getDomNode(),true);
-        List<XMLStructure> signatureTimeContent = new ArrayList<XMLStructure>();
+        List<XMLStructure> signatureTimeContent = new ArrayList<>();
         signatureTimeContent.add(new DOMStructure(n));
         SignatureProperty signatureTimeSignatureProperty = getSignatureFactory()
             .newSignatureProperty(signatureTimeContent, "#" + signatureConfig.getPackageSignatureId(),
             "idSignatureTime");
-        List<SignatureProperty> signaturePropertyContent = new ArrayList<SignatureProperty>();
+        List<SignatureProperty> signaturePropertyContent = new ArrayList<>();
         signaturePropertyContent.add(signatureTimeSignatureProperty);
         SignatureProperties signatureProperties = getSignatureFactory()
             .newSignatureProperties(signaturePropertyContent, null);
@@ -248,7 +248,7 @@ public class OOXMLSignatureFacet extends SignatureFacet {
         List<Reference> references,
         List<XMLObject> objects)
     throws XMLSignatureException {
-        List<XMLStructure> objectContent = new ArrayList<XMLStructure>();
+        List<XMLStructure> objectContent = new ArrayList<>();
 
         SignatureInfoV1Document sigV1 = SignatureInfoV1Document.Factory.newInstance();
         CTSignatureInfoV1 ctSigV1 = sigV1.addNewSignatureInfoV1();
@@ -256,13 +256,13 @@ public class OOXMLSignatureFacet extends SignatureFacet {
         Element n = (Element)document.importNode(ctSigV1.getDomNode(), true);
         n.setAttributeNS(XML_NS, XMLConstants.XMLNS_ATTRIBUTE, MS_DIGSIG_NS);
 
-        List<XMLStructure> signatureInfoContent = new ArrayList<XMLStructure>();
+        List<XMLStructure> signatureInfoContent = new ArrayList<>();
         signatureInfoContent.add(new DOMStructure(n));
         SignatureProperty signatureInfoSignatureProperty = getSignatureFactory()
             .newSignatureProperty(signatureInfoContent, "#" + signatureConfig.getPackageSignatureId(),
             "idOfficeV1Details");
 
-        List<SignatureProperty> signaturePropertyContent = new ArrayList<SignatureProperty>();
+        List<SignatureProperty> signaturePropertyContent = new ArrayList<>();
         signaturePropertyContent.add(signatureInfoSignatureProperty);
         SignatureProperties signatureProperties = getSignatureFactory()
             .newSignatureProperties(signaturePropertyContent, null);
@@ -294,26 +294,26 @@ public class OOXMLSignatureFacet extends SignatureFacet {
     /**
      * Office 2010 list of signed types (extensions).
      */
-    private static final Set<String> signed = Collections.unmodifiableSet(new HashSet<String>(Arrays.asList(
-        "activeXControlBinary","aFChunk","attachedTemplate","attachedToolbars","audio","calcChain","chart","chartColorStyle",
-        "chartLayout","chartsheet","chartStyle","chartUserShapes","commentAuthors","comments","connections","connectorXml",
-        "control","ctrlProp","customData","customData","customProperty","customXml","diagram","diagramColors",
-        "diagramColorsHeader","diagramData","diagramDrawing","diagramLayout","diagramLayoutHeader","diagramQuickStyle",
-        "diagramQuickStyleHeader","dialogsheet","dictionary","documentParts","downRev","drawing","endnotes","externalLink",
-        "externalLinkPath","font","fontTable","footer","footnotes","functionPrototypes","glossaryDocument","graphicFrameDoc",
-        "groupShapeXml","handoutMaster","hdphoto","header","hyperlink","image","ink","inkXml","keyMapCustomizations",
-        "legacyDiagramText","legacyDocTextInfo","mailMergeHeaderSource","mailMergeRecipientData","mailMergeSource","media",
-        "notesMaster","notesSlide","numbering","officeDocument","officeDocument","oleObject","package","pictureXml",
-        "pivotCacheDefinition","pivotCacheRecords","pivotTable","powerPivotData","presProps","printerSettings","queryTable",
-        "recipientData","settings","shapeXml","sharedStrings","sheetMetadata","slicer","slicer","slicerCache","slicerCache",
-        "slide","slideLayout","slideMaster","slideUpdateInfo","slideUpdateUrl","smartTags","styles","stylesWithEffects",
-        "table","tableSingleCells","tableStyles","tags","theme","themeOverride","timeline","timelineCache","transform",
-        "ui/altText","ui/buttonSize","ui/controlID","ui/description","ui/enabled","ui/extensibility","ui/extensibility",
-        "ui/helperText","ui/imageID","ui/imageMso","ui/keyTip","ui/label","ui/lcid","ui/loud","ui/pressed","ui/progID",
-        "ui/ribbonID","ui/showImage","ui/showLabel","ui/supertip","ui/target","ui/text","ui/title","ui/tooltip",
-        "ui/userCustomization","ui/visible","userXmlData","vbaProject","video","viewProps","vmlDrawing",
-        "volatileDependencies","webSettings","wordVbaData","worksheet","wsSortMap","xlBinaryIndex",
-        "xlExternalLinkPath/xlAlternateStartup","xlExternalLinkPath/xlLibrary","xlExternalLinkPath/xlPathMissing",
-        "xlExternalLinkPath/xlStartup","xlIntlMacrosheet","xlMacrosheet","xmlMaps"
+    private static final Set<String> signed = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(
+            "activeXControlBinary", "aFChunk", "attachedTemplate", "attachedToolbars", "audio", "calcChain", "chart", "chartColorStyle",
+            "chartLayout", "chartsheet", "chartStyle", "chartUserShapes", "commentAuthors", "comments", "connections", "connectorXml",
+            "control", "ctrlProp", "customData", "customData", "customProperty", "customXml", "diagram", "diagramColors",
+            "diagramColorsHeader", "diagramData", "diagramDrawing", "diagramLayout", "diagramLayoutHeader", "diagramQuickStyle",
+            "diagramQuickStyleHeader", "dialogsheet", "dictionary", "documentParts", "downRev", "drawing", "endnotes", "externalLink",
+            "externalLinkPath", "font", "fontTable", "footer", "footnotes", "functionPrototypes", "glossaryDocument", "graphicFrameDoc",
+            "groupShapeXml", "handoutMaster", "hdphoto", "header", "hyperlink", "image", "ink", "inkXml", "keyMapCustomizations",
+            "legacyDiagramText", "legacyDocTextInfo", "mailMergeHeaderSource", "mailMergeRecipientData", "mailMergeSource", "media",
+            "notesMaster", "notesSlide", "numbering", "officeDocument", "officeDocument", "oleObject", "package", "pictureXml",
+            "pivotCacheDefinition", "pivotCacheRecords", "pivotTable", "powerPivotData", "presProps", "printerSettings", "queryTable",
+            "recipientData", "settings", "shapeXml", "sharedStrings", "sheetMetadata", "slicer", "slicer", "slicerCache", "slicerCache",
+            "slide", "slideLayout", "slideMaster", "slideUpdateInfo", "slideUpdateUrl", "smartTags", "styles", "stylesWithEffects",
+            "table", "tableSingleCells", "tableStyles", "tags", "theme", "themeOverride", "timeline", "timelineCache", "transform",
+            "ui/altText", "ui/buttonSize", "ui/controlID", "ui/description", "ui/enabled", "ui/extensibility", "ui/extensibility",
+            "ui/helperText", "ui/imageID", "ui/imageMso", "ui/keyTip", "ui/label", "ui/lcid", "ui/loud", "ui/pressed", "ui/progID",
+            "ui/ribbonID", "ui/showImage", "ui/showLabel", "ui/supertip", "ui/target", "ui/text", "ui/title", "ui/tooltip",
+            "ui/userCustomization", "ui/visible", "userXmlData", "vbaProject", "video", "viewProps", "vmlDrawing",
+            "volatileDependencies", "webSettings", "wordVbaData", "worksheet", "wsSortMap", "xlBinaryIndex",
+            "xlExternalLinkPath/xlAlternateStartup", "xlExternalLinkPath/xlLibrary", "xlExternalLinkPath/xlPathMissing",
+            "xlExternalLinkPath/xlStartup", "xlIntlMacrosheet", "xlMacrosheet", "xmlMaps"
     )));
 }
\ No newline at end of file
index a556f1f794699ea8d894a97e8af5fa6f703c5c58..0e3bb7b31a6c81188626e154f438b0c24f62cf1a 100644 (file)
@@ -92,7 +92,7 @@ public class XAdESSignatureFacet extends SignatureFacet {
 
     private static final String XADES_TYPE = "http://uri.etsi.org/01903#SignedProperties";
     
-    private Map<String, String> dataObjectFormatMimeTypes = new HashMap<String, String>();
+    private Map<String, String> dataObjectFormatMimeTypes = new HashMap<>();
 
 
     @Override
@@ -192,7 +192,7 @@ public class XAdESSignatureFacet extends SignatureFacet {
         }
 
         // add XAdES ds:Object
-        List<XMLStructure> xadesObjectContent = new ArrayList<XMLStructure>();
+        List<XMLStructure> xadesObjectContent = new ArrayList<>();
         Element qualDocElSrc = (Element)qualifyingProperties.getDomNode();
         Element qualDocEl = (Element)document.importNode(qualDocElSrc, true);
         xadesObjectContent.add(new DOMStructure(qualDocEl));
@@ -200,7 +200,7 @@ public class XAdESSignatureFacet extends SignatureFacet {
         objects.add(xadesObject);
 
         // add XAdES ds:Reference
-        List<Transform> transforms = new ArrayList<Transform>();
+        List<Transform> transforms = new ArrayList<>();
         Transform exclusiveTransform = newTransform(CanonicalizationMethod.INCLUSIVE);
         transforms.add(exclusiveTransform);
         Reference reference = newReference
index 11a11eeae2ce775a2aad42218b118d91a716b81b..795c317a1b54177b0180293d69191565a3ec661f 100644 (file)
@@ -249,7 +249,7 @@ public class XAdESXLSignatureFacet extends SignatureFacet {
         // marshal XAdES-C
         
         // XAdES-X Type 1 timestamp
-        List<Node> timeStampNodesXadesX1 = new ArrayList<Node>();
+        List<Node> timeStampNodesXadesX1 = new ArrayList<>();
         timeStampNodesXadesX1.add(nlSigVal.item(0));
         timeStampNodesXadesX1.add(signatureTimeStamp.getDomNode());
         timeStampNodesXadesX1.add(completeCertificateRefs.getDomNode());
index ff0564bbac20cfa9de60bfb02a51fe036a94b250..79c2b496801b6c19ca325c1290bf338639ded1a8 100644 (file)
@@ -82,7 +82,7 @@ public class RelationshipTransformService extends TransformService {
      * Relationship Transform parameter specification class.
      */
     public static class RelationshipTransformParameterSpec implements TransformParameterSpec {
-        List<String> sourceIds = new ArrayList<String>();
+        List<String> sourceIds = new ArrayList<>();
         public void addRelationshipReference(String relationshipId) {
                 sourceIds.add(relationshipId);
         }
@@ -95,7 +95,7 @@ public class RelationshipTransformService extends TransformService {
     public RelationshipTransformService() {
         super();
         LOG.log(POILogger.DEBUG, "constructor");
-        this.sourceIds = new ArrayList<String>();
+        this.sourceIds = new ArrayList<>();
     }
 
     /**
@@ -197,7 +197,7 @@ public class RelationshipTransformService extends TransformService {
         // keep only those relationships which id is registered in the sourceIds
         Element root = doc.getDocumentElement();
         NodeList nl = root.getChildNodes();
-        TreeMap<String,Element> rsList = new TreeMap<String,Element>();
+        TreeMap<String,Element> rsList = new TreeMap<>();
         for (int i=nl.getLength()-1; i>=0; i--) {
             Node n = nl.item(i);
             if ("Relationship".equals(n.getLocalName())) {
index 66a78e396dd4f2462ba073600f10c95c7aaaf6f0..ca89ba4c9959cc4fe5bceba6cb7d9da1a0dff7fa 100644 (file)
@@ -45,8 +45,8 @@ public class RevocationData {
      * Default constructor.
      */
     public RevocationData() {
-        this.crls = new ArrayList<byte[]>();
-        this.ocsps = new ArrayList<byte[]>();
+        this.crls = new ArrayList<>();
+        this.ocsps = new ArrayList<>();
     }
 
     /**
index bc3e7445590b08535633d6b1d0da74b0faa47892..8207a0900dd0a767943f6971b5635254ae638b49 100644 (file)
@@ -207,7 +207,7 @@ public class TSPTimeStampService implements TimeStampService {
         Collection<X509CertificateHolder> certificates = timeStampToken.getCertificates().getMatches(null);
         
         X509CertificateHolder signerCert = null;
-        Map<X500Name, X509CertificateHolder> certificateMap = new HashMap<X500Name, X509CertificateHolder>();
+        Map<X500Name, X509CertificateHolder> certificateMap = new HashMap<>();
         for (X509CertificateHolder certificate : certificates) {
             if (signerCertIssuer.equals(certificate.getIssuer())
                 && signerCertSerialNumber.equals(certificate.getSerialNumber())) {
@@ -220,7 +220,7 @@ public class TSPTimeStampService implements TimeStampService {
         if (signerCert == null) {
             throw new RuntimeException("TSP response token has no signer certificate");
         }
-        List<X509Certificate> tspCertificateChain = new ArrayList<X509Certificate>();
+        List<X509Certificate> tspCertificateChain = new ArrayList<>();
         JcaX509CertificateConverter x509converter = new JcaX509CertificateConverter();
         x509converter.setProvider("BC");
         X509CertificateHolder certificate = signerCert;
index e3d80cecf855de90ca4eccb47b96791869c865ad..2fa5fc21d7d56a1519ec342e4f244521cfb0d0dc 100644 (file)
@@ -98,7 +98,7 @@ public class EmbeddedExtractor implements Iterable<EmbeddedExtractor> {
         if (null == patriarch){
             return Collections.emptyList();
         }
-        List<EmbeddedData> embeddings = new ArrayList<EmbeddedData>();
+        List<EmbeddedData> embeddings = new ArrayList<>();
         extractAll(patriarch, embeddings);
         return embeddings;
     }
index 88822351f0908aa59fa1e3c39752c39ed4867d1b..a863dabe6008d832d5ec60977314e10d046fea7e 100644 (file)
@@ -69,7 +69,7 @@ public class IdentifierManager {
         }
         this.lowerbound = lowerbound;
         this.upperbound = upperbound;
-        this.segments = new LinkedList<Segment>();
+        this.segments = new LinkedList<>();
         segments.add(new Segment(lowerbound, upperbound));
     }
 
index e6dc38ce78a60a7fe4236c009d69b50f50c54f7a..d4cf6c6c60906c04e6931726afae1327131cfc2a 100644 (file)
@@ -89,7 +89,7 @@ public final class OOXMLLite {
     }
 
     void build() throws IOException, ClassNotFoundException {
-        List<Class<?>> lst = new ArrayList<Class<?>>();
+        List<Class<?>> lst = new ArrayList<>();
         //collect unit tests
         String exclude = StringUtil.join("|",
                 "BaseTestXWorkbook",
@@ -276,7 +276,7 @@ public final class OOXMLLite {
         ClassLoader appLoader = ClassLoader.getSystemClassLoader();
         try {
             Vector<Class<?>> classes = (Vector<Class<?>>) _classes.get(appLoader);
-            Map<String, Class<?>> map = new HashMap<String, Class<?>>();
+            Map<String, Class<?>> map = new HashMap<>();
             for (Class<?> cls : classes) {
                 // e.g. proxy-classes, ...
                 ProtectionDomain pd = cls.getProtectionDomain();
index a977cb627aae5eefb8e68afb90f3aa36bf997442..a96071a3bb181205250b29fea40cc9b83a63b20a 100644 (file)
@@ -32,7 +32,7 @@ import com.graphbuilder.geom.PointFactory;
 public class SplineCollector {
 
     SplineStart _start;
-    ArrayList<SplineKnot> _knots = new ArrayList<SplineKnot>();
+    ArrayList<SplineKnot> _knots = new ArrayList<>();
 
     public SplineCollector(SplineStart start) {
         _start = start;
index 3192230754ebd0b1b579c749d4583f7e19fc2f09..37927d486dadd60dbbc07160349e4adf79d88e83 100644 (file)
@@ -49,9 +49,9 @@ public class XDGFBaseContents extends XDGFXMLDocumentPart {
     protected PageContentsType _pageContents;
 
     // shapes without parents
-    protected List<XDGFShape> _toplevelShapes = new ArrayList<XDGFShape>();
-    protected Map<Long, XDGFShape> _shapes = new HashMap<Long, XDGFShape>();
-    protected List<XDGFConnection> _connections = new ArrayList<XDGFConnection>();
+    protected List<XDGFShape> _toplevelShapes = new ArrayList<>();
+    protected Map<Long, XDGFShape> _shapes = new HashMap<>();
+    protected List<XDGFConnection> _connections = new ArrayList<>();
 
     /**
      * @since POI 3.14-Beta1
index 1fe9515e3dcc28ee7a58317a5a4073458529aab3..1f6c00994a7d7fa7aab0c864493b9cb30f90589c 100644 (file)
@@ -37,7 +37,7 @@ public class XDGFDocument {
 
     protected VisioDocumentType _document;
 
-    Map<Long, XDGFStyleSheet> _styleSheets = new HashMap<Long, XDGFStyleSheet>();
+    Map<Long, XDGFStyleSheet> _styleSheets = new HashMap<>();
 
     // defaults
     long _defaultFillStyle;
index d2f72d4a26949d3d12016865e60618e8a805eb22..fdbd43d2aaafae76df04a3f8a6eeefc19422dd78 100644 (file)
@@ -43,7 +43,7 @@ public class XDGFMasters extends XDGFXMLDocumentPart {
     MastersType _mastersObject;
 
     // key: id of master
-    protected Map<Long, XDGFMaster> _masters = new HashMap<Long, XDGFMaster>();
+    protected Map<Long, XDGFMaster> _masters = new HashMap<>();
 
     /**
      * @since POI 3.14-Beta1
@@ -68,7 +68,7 @@ public class XDGFMasters extends XDGFXMLDocumentPart {
                 throw new POIXMLException(e);
             }
 
-            Map<String, MasterType> masterSettings = new HashMap<String, MasterType>();
+            Map<String, MasterType> masterSettings = new HashMap<>();
             for (MasterType master: _mastersObject.getMasterArray()) {
                 masterSettings.put(master.getRel().getId(), master);
             }
index 54cf02f28e21ea121faca9c3ee83f11fdaf4196c..3dfe3c9cc2dc389ca58142dd695ffbd201df20aa 100644 (file)
@@ -31,7 +31,7 @@ import com.microsoft.schemas.office.visio.x2012.main.PageContentsDocument;
 
 public class XDGFPageContents extends XDGFBaseContents {
 
-    protected Map<Long, XDGFMaster> _masters = new HashMap<Long, XDGFMaster>();
+    protected Map<Long, XDGFMaster> _masters = new HashMap<>();
     protected XDGFPage _page;
 
     /**
index 0ae3a039a6db5d36df80700faa4b1b4011f38897..65d2f50cc37edd5577288c628cd584d60f7b6d93 100644 (file)
@@ -42,7 +42,7 @@ public class XDGFPages extends XDGFXMLDocumentPart {
     PagesType _pagesObject;
 
     // ordered by page number
-    List<XDGFPage> _pages = new ArrayList<XDGFPage>();
+    List<XDGFPage> _pages = new ArrayList<>();
 
     /**
      * @since POI 3.14-Beta1
index 3ab1f91d3b64cfd9e63ea42f7ff47c7bb66aab5b..36911dca9f79bb4e99c930fb56dcd2eba66e7345 100644 (file)
@@ -29,7 +29,7 @@ public class XDGFRelation extends POIXMLRelation {
     /**
      * A map to lookup POIXMLRelation by its relation type
      */
-    private static final Map<String, XDGFRelation> _table = new HashMap<String, XDGFRelation>();
+    private static final Map<String, XDGFRelation> _table = new HashMap<>();
 
     public static final XDGFRelation DOCUMENT = new XDGFRelation(
             "application/vnd.ms-visio.drawing.main+xml",
index 7cb2be62984b5d712aef611f40bd5198aed1d53f..f997c3b0fd732993542d927360b9cda9d211df58 100644 (file)
@@ -120,7 +120,7 @@ public class XDGFShape extends XDGFSheet {
             _text = new XDGFText(text, this);
 
         if (shapeSheet.isSetShapes()) {
-            _shapes = new ArrayList<XDGFShape>();
+            _shapes = new ArrayList<>();
             for (ShapeSheetType shape : shapeSheet.getShapes().getShapeArray())
                 _shapes.add(new XDGFShape(this, shape, parentPage, document));
         }
@@ -781,7 +781,7 @@ public class XDGFShape extends XDGFSheet {
     //
 
     public Iterable<GeometrySection> getGeometrySections() {
-        return new CombinedIterable<GeometrySection>(_geometry,
+        return new CombinedIterable<>(_geometry,
                 _masterShape != null ? _masterShape._geometry : null);
     }
 
index ab2c1d5111a830ffaea38e01b578b4908f4659f3..1459cfd8b9158dc6e8929bf23863f98b204df12b 100644 (file)
@@ -43,13 +43,13 @@ public abstract class XDGFSheet {
     protected SheetType _sheet;
 
     // cells
-    protected Map<String, XDGFCell> _cells = new HashMap<String, XDGFCell>();
+    protected Map<String, XDGFCell> _cells = new HashMap<>();
 
     // sections
-    protected Map<String, XDGFSection> _sections = new HashMap<String, XDGFSection>();
+    protected Map<String, XDGFSection> _sections = new HashMap<>();
 
     // special: geometry sections (key: index, value: section)
-    protected SortedMap<Long, GeometrySection> _geometry = new TreeMap<Long, GeometrySection>();
+    protected SortedMap<Long, GeometrySection> _geometry = new TreeMap<>();
 
     // special: character section
     protected CharacterSection _character;
index 879487404015d32de834c7be20674e7352fdfd8c..071389200b1ee314f2dfa7f0df85639b4d84fe3d 100644 (file)
@@ -113,7 +113,7 @@ public class XmlVisioDocument extends POIXMLDocument {
      */
     @Override
     public List<PackagePart> getAllEmbedds() throws OpenXML4JException {
-        return new ArrayList<PackagePart>();
+        return new ArrayList<>();
     }
 
     //
index 97d62c5c2a68dd0a33af728338ec3a6199ef2c21..e98d08296f28303b3947313b633b118c108f09ed 100644 (file)
@@ -33,7 +33,7 @@ public class CharacterSection extends XDGFSection {
     Double _fontSize;
     Color _fontColor;
 
-    Map<String, XDGFCell> _characterCells = new HashMap<String, XDGFCell>();
+    Map<String, XDGFCell> _characterCells = new HashMap<>();
 
     public CharacterSection(SectionType section, XDGFSheet containingSheet) {
         super(section, containingSheet);
index 6f47ad59334e73937163995ae559098d185caadb..535781d1306bf3d9a2e92b8eb2bfd7dbe886658d 100644 (file)
@@ -43,7 +43,7 @@ public class GeometrySection extends XDGFSection {
     GeometrySection _master;
 
     // rows
-    SortedMap<Long, GeometryRow> _rows = new TreeMap<Long, GeometryRow>();
+    SortedMap<Long, GeometryRow> _rows = new TreeMap<>();
 
     public GeometrySection(SectionType section, XDGFSheet containingSheet) {
         super(section, containingSheet);
@@ -89,7 +89,7 @@ public class GeometrySection extends XDGFSection {
     }
 
     public Iterable<GeometryRow> getCombinedRows() {
-        return new CombinedIterable<GeometryRow>(_rows,
+        return new CombinedIterable<>(_rows,
                 _master == null ? null : _master._rows);
     }
 
index 1448a60ba9083cdb669ce154e161b13cad82cb2d..d26fc888cf20928ea51d7942507ea977ef363884 100644 (file)
@@ -34,7 +34,7 @@ public abstract class XDGFSection {
     static final ObjectFactory<XDGFSection, SectionType> _sectionTypes;
 
     static {
-        _sectionTypes = new ObjectFactory<XDGFSection, SectionType>();
+        _sectionTypes = new ObjectFactory<>();
         try {
             _sectionTypes.put("LineGradient",  GenericSection.class, SectionType.class, XDGFSheet.class);
             _sectionTypes.put("FillGradient",  GenericSection.class, SectionType.class, XDGFSheet.class);
@@ -71,7 +71,7 @@ public abstract class XDGFSection {
     protected SectionType _section;
     protected XDGFSheet _containingSheet;
 
-    protected Map<String, XDGFCell> _cells = new HashMap<String, XDGFCell>();
+    protected Map<String, XDGFCell> _cells = new HashMap<>();
 
 
     public XDGFSection(SectionType section, XDGFSheet containingSheet) {
index 003169f5f52ba4b13a093b4289475853963dbf3c..aa9c336d56117ed763b05734b7b696a41b5e3b86 100644 (file)
@@ -27,7 +27,7 @@ public class GeometryRowFactory {
     static final ObjectFactory<GeometryRow, RowType> _rowTypes;
 
     static {
-        _rowTypes = new ObjectFactory<GeometryRow, RowType>();
+        _rowTypes = new ObjectFactory<>();
         try {
             _rowTypes.put("ArcTo", ArcTo.class, RowType.class);
             _rowTypes.put("Ellipse", Ellipse.class, RowType.class);
index af0253f59494b5fa415704115cdcb236f25ff274..7fc7c8c44a1b4e5d67224a3362ee8243ea969998 100644 (file)
@@ -28,7 +28,7 @@ import org.apache.xmlbeans.XmlObject;
 
 public class ObjectFactory<T, X extends XmlObject> {
 
-    Map<String, Constructor<? extends T>> _types = new HashMap<String, Constructor<? extends T>>();
+    Map<String, Constructor<? extends T>> _types = new HashMap<>();
 
     public void put(String typeName, Class<? extends T> cls, Class<?>... varargs) throws NoSuchMethodException, SecurityException {
         _types.put(typeName, cls.getDeclaredConstructor(varargs));
index c3fbac9dae7d4a74b8ed48290c1c6f98019fa4fe..8f13332af21f43a595220d36aa1e461814df2654 100644 (file)
@@ -126,8 +126,8 @@ implements SlideShow<XSLFShape,XSLFTextParagraph> {
                     PresentationDocument.Factory.parse(getCorePart().getInputStream(), DEFAULT_XML_OPTIONS);
             _presentation = doc.getPresentation();
 
-            Map<String, XSLFSlideMaster> masterMap = new HashMap<String, XSLFSlideMaster>();
-            Map<String, XSLFSlide> shIdMap = new HashMap<String, XSLFSlide>();
+            Map<String, XSLFSlideMaster> masterMap = new HashMap<>();
+            Map<String, XSLFSlide> shIdMap = new HashMap<>();
             for (RelationPart rp : getRelationParts()) {
                 POIXMLDocumentPart p = rp.getDocumentPart();
                 if (p instanceof XSLFSlide) {
@@ -143,13 +143,13 @@ implements SlideShow<XSLFShape,XSLFTextParagraph> {
                 }
             }
 
-            _masters = new ArrayList<XSLFSlideMaster>(masterMap.size());
+            _masters = new ArrayList<>(masterMap.size());
             for (CTSlideMasterIdListEntry masterId : _presentation.getSldMasterIdLst().getSldMasterIdList()) {
                 XSLFSlideMaster master = masterMap.get(masterId.getId2());
                 _masters.add(master);
             }
 
-            _slides = new ArrayList<XSLFSlide>(shIdMap.size());
+            _slides = new ArrayList<>(shIdMap.size());
             if (_presentation.isSetSldIdLst()) {
                 for (CTSlideIdListEntry slId : _presentation.getSldIdLst().getSldIdList()) {
                     XSLFSlide sh = shIdMap.get(slId.getId2());
@@ -187,7 +187,7 @@ implements SlideShow<XSLFShape,XSLFTextParagraph> {
     public List<XSLFPictureData> getPictureData() {
         if(_pictures == null){
             List<PackagePart> mediaParts = getPackage().getPartsByName(Pattern.compile("/ppt/media/.*?"));
-            _pictures = new ArrayList<XSLFPictureData>(mediaParts.size());
+            _pictures = new ArrayList<>(mediaParts.size());
             for(PackagePart part : mediaParts){
                 XSLFPictureData pd = new XSLFPictureData(part);
                 pd.setIndex(_pictures.size());
@@ -354,7 +354,7 @@ implements SlideShow<XSLFShape,XSLFTextParagraph> {
 
         Integer themeIndex = 1;
         // TODO: check if that list can be replaced by idx = Math.max(idx,themeIdx)
-        List<Integer> themeIndexList = new ArrayList<Integer>();
+        List<Integer> themeIndexList = new ArrayList<>();
         for (POIXMLDocumentPart p : getRelations()) {
             if (p instanceof XSLFTheme) {
                 themeIndexList.add(XSLFRelation.THEME.getFileNameIndex(p));
index 2fd336543136f55da3a69bd6ebe919170f49969e..347eaf9f574a313383de8fb60be2318699d83ad8 100644 (file)
@@ -54,7 +54,7 @@ public class XSLFCommonSlideData {
     public List<DrawingTextBody> getDrawingText() {
         CTGroupShape gs = data.getSpTree();
 
-        List<DrawingTextBody> out = new ArrayList<DrawingTextBody>();
+        List<DrawingTextBody> out = new ArrayList<>();
 
         processShape(gs, out);
 
@@ -97,7 +97,7 @@ public class XSLFCommonSlideData {
         return out;
     }
     public List<DrawingParagraph> getText() {
-       List<DrawingParagraph> paragraphs = new ArrayList<DrawingParagraph>();
+       List<DrawingParagraph> paragraphs = new ArrayList<>();
        for(DrawingTextBody textBody : getDrawingText()) {
           paragraphs.addAll(Arrays.asList(textBody.getParagraphs()));
        }
index 7084082f44b09b3945140a2821024a2e21d5a8ce..3c6ae88e0b73b984cf69cad11425f91198b3f921 100644 (file)
@@ -391,7 +391,7 @@ implements XSLFShapeContainer, GroupShape<XSLFShape,XSLFTextParagraph> {
      */
     @Override
     public void clear() {
-        List<XSLFShape> shapes = new ArrayList<XSLFShape>(getShapes());
+        List<XSLFShape> shapes = new ArrayList<>(getShapes());
         for(XSLFShape shape : shapes){
             removeShape(shape);
         }
index 5472011c0684b7ecbc34af179d7c8caa0c79fdbb..180659a0619ca58ca02d36d8f79587fc161fd867 100644 (file)
@@ -99,7 +99,7 @@ implements Notes<XSLFShape,XSLFTextParagraph> {
 
     @Override
     public List<List<XSLFTextParagraph>> getTextParagraphs() {
-        List<List<XSLFTextParagraph>> tp = new ArrayList<List<XSLFTextParagraph>>();
+        List<List<XSLFTextParagraph>> tp = new ArrayList<>();
         for (XSLFShape sh : super.getShapes()) {
             if (sh instanceof XSLFTextShape) {
                 XSLFTextShape txt = (XSLFTextShape)sh;
index f3f59b918ab13da7e0447ee5eb3b57987cf1c292..3285b673824f7f317ffa32036d823170266cc23d 100644 (file)
@@ -30,7 +30,7 @@ public class XSLFRelation extends POIXMLRelation {
    /**
     * A map to lookup POIXMLRelation by its relation type
     */
-   private static final Map<String, XSLFRelation> _table = new HashMap<String, XSLFRelation>();
+   private static final Map<String, XSLFRelation> _table = new HashMap<>();
    
    public static final XSLFRelation MAIN = new XSLFRelation(
            "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml",
index d3af46bff7e5088c0bf76e3191d116c9db721fbf..6b0734f2570c52ca220b76bdd5cb43c514f5a4f7 100644 (file)
@@ -94,7 +94,7 @@ implements XSLFShapeContainer, Sheet<XSLFShape,XSLFTextParagraph> {
     }
 
     protected static List<XSLFShape> buildShapes(CTGroupShape spTree, XSLFSheet sheet){
-        List<XSLFShape> shapes = new ArrayList<XSLFShape>();
+        List<XSLFShape> shapes = new ArrayList<>();
         XmlCursor cur = spTree.newCursor();
         try {
             for (boolean b=cur.toFirstChild();b;b=cur.toNextSibling()) {
@@ -324,7 +324,7 @@ implements XSLFShapeContainer, Sheet<XSLFShape,XSLFTextParagraph> {
      */
     @Override
     public void clear() {
-        List<XSLFShape> shapes = new ArrayList<XSLFShape>(getShapes());
+        List<XSLFShape> shapes = new ArrayList<>(getShapes());
         for(XSLFShape shape : shapes){
             removeShape(shape);
         }
@@ -472,9 +472,9 @@ implements XSLFShapeContainer, Sheet<XSLFShape,XSLFTextParagraph> {
 
     void initPlaceholders() {
         if(_placeholders == null) {
-            _placeholders = new ArrayList<XSLFTextShape>();
-            _placeholderByIdMap = new HashMap<Integer, XSLFSimpleShape>();
-            _placeholderByTypeMap = new HashMap<Integer, XSLFSimpleShape>();
+            _placeholders = new ArrayList<>();
+            _placeholderByIdMap = new HashMap<>();
+            _placeholderByTypeMap = new HashMap<>();
 
             for(XSLFShape sh : getShapes()){
                 if(sh instanceof XSLFTextShape){
index eefa79e3b577f17001eab67a8704f9052d8d5097..cdf034aafb7c9efb4ff3616f2950d25d65ff237a 100644 (file)
@@ -96,7 +96,7 @@ import org.openxmlformats.schemas.presentationml.x2006.main.SldMasterDocument;
 
     private Map<String, XSLFSlideLayout> getLayouts(){
         if(_layouts == null){
-            _layouts = new HashMap<String, XSLFSlideLayout>();
+            _layouts = new HashMap<>();
             for (POIXMLDocumentPart p : getRelations()) {
                 if (p instanceof XSLFSlideLayout){
                     XSLFSlideLayout layout = (XSLFSlideLayout)p;
index 8a49e394357fe20ea19876d06825d6f4b91b37ba..c2e6086902a687e64be913aa5a4e6d1e8d0a17f7 100644 (file)
@@ -77,7 +77,7 @@ public class XSLFSlideShow extends POIXMLDocument {
                presentationDoc =
                        PresentationDocument.Factory.parse(getCorePart().getInputStream(), DEFAULT_XML_OPTIONS);
 
-               embedds = new LinkedList<PackagePart>();
+               embedds = new LinkedList<>();
                for (CTSlideIdListEntry ctSlide : getSlideReferences().getSldIdArray()) {
                        PackagePart corePart = getCorePart();
                        PackagePart slidePart = corePart.getRelatedPart(corePart.getRelationship(ctSlide.getId2()));
index 484fa5f66f1905fad1a7536fd88e9c63ef15c12e..f1269a79956f83bc6c2cea20fd04d18ef3ec1215 100644 (file)
@@ -78,7 +78,7 @@ public class XSLFTable extends XSLFGraphicFrame implements Iterable<XSLFTableRow
         _table = (CTTable)xo;
         xc.dispose();
 
-        _rows = new ArrayList<XSLFTableRow>(_table.sizeOfTrArray());
+        _rows = new ArrayList<>(_table.sizeOfTrArray());
         for(CTTableRow row : _table.getTrArray()) {
             _rows.add(new XSLFTableRow(row, this));
         }
index a49d5a9242c4f06ee244b30b6c943f8bf470c19b..835b4438a7e6be36cc732cbfc59b06062fb3308b 100644 (file)
@@ -40,7 +40,7 @@ public class XSLFTableRow implements Iterable<XSLFTableCell> {
         _row = row;
         _table = table;
         CTTableCell[] tcArray = _row.getTcArray();
-        _cells = new ArrayList<XSLFTableCell>(tcArray.length);
+        _cells = new ArrayList<>(tcArray.length);
         for(CTTableCell cell : tcArray) {
             _cells.add(new XSLFTableCell(cell, table));
         }
index 487b3396433b124f9f0a660c155b47fe1595a7d8..7773883b44da8727ffaa736684f0df09b05e224e 100644 (file)
@@ -51,7 +51,7 @@ public class XSLFTableStyles extends POIXMLDocumentPart implements Iterable<XSLF
         is.close();
         _tblStyleLst = styleDoc.getTblStyleLst();
         CTTableStyle[] tblStyleArray = _tblStyleLst.getTblStyleArray();
-        _styles = new ArrayList<XSLFTableStyle>(tblStyleArray.length);
+        _styles = new ArrayList<>(tblStyleArray.length);
         for(CTTableStyle c : tblStyleArray){
             _styles.add(new XSLFTableStyle(c));
         }
index 0944d542ee1695545ddbd7902491e58cdd027163..4c535cfc04b263b4762617e63f3a7785bce7b84b 100644 (file)
@@ -69,7 +69,7 @@ public class XSLFTextParagraph implements TextParagraph<XSLFShape,XSLFTextParagr
 
     XSLFTextParagraph(CTTextParagraph p, XSLFTextShape shape){
         _p = p;
-        _runs = new ArrayList<XSLFTextRun>();
+        _runs = new ArrayList<>();
         _shape = shape;
 
         XmlCursor c = _p.newCursor();
index 502d2b6d045ebca43fc33a768d856eb2c4299bd7..86aa0b7c882cca3e7e8a44d8f324e8d35c49155b 100644 (file)
@@ -59,7 +59,7 @@ public abstract class XSLFTextShape extends XSLFSimpleShape
     /*package*/ XSLFTextShape(XmlObject shape, XSLFSheet sheet) {
         super(shape, sheet);
 
-        _paragraphs = new ArrayList<XSLFTextParagraph>();
+        _paragraphs = new ArrayList<>();
         CTTextBody txBody = getTextBody(false);
         if (txBody != null) {
             for (CTTextParagraph p : txBody.getPArray()) {
index d3bd3a847c6bd26a1c97903c872d90f521c63f8f..dce8a2a026493a0d16e6fe0ad8ee2869cc5b8af0 100644 (file)
@@ -75,7 +75,7 @@ public class XSLFTheme extends POIXMLDocumentPart {
        CTBaseStyles elems = _theme.getThemeElements();
        CTColorScheme scheme = elems.getClrScheme();
        // The color scheme is responsible for defining a list of twelve colors. 
-       _schemeColors = new HashMap<String, CTColor>(12);
+       _schemeColors = new HashMap<>(12);
        for(XmlObject o : scheme.selectPath("*")){
                CTColor c = (CTColor)o;
                String name = c.getDomNode().getLocalName();
index 31475410df8211ff88c4e9622bafe032417f9422..938e966a6878d16949b80ca82be2f4fd44e4a9de 100644 (file)
@@ -174,7 +174,7 @@ public class PPTX2PNG {
     }
     
     private static Set<Integer> slideIndexes(final int slideCount, String range) {
-        Set<Integer> slideIdx = new TreeSet<Integer>();
+        Set<Integer> slideIdx = new TreeSet<>();
         if ("-1".equals(range)) {
             for (int i=0; i<slideCount; i++) {
                 slideIdx.add(i);
index fa81c44b3850523472d1afc110f0aa480368fa11..f84017b7645b8b852783a98618ac8a18e2a541c2 100644 (file)
@@ -36,9 +36,9 @@ import org.apache.poi.util.LittleEndian;
 @Internal
 public class XSSFBCommentsTable extends XSSFBParser {
 
-    private Map<CellAddress, XSSFBComment> comments = new TreeMap<CellAddress, XSSFBComment>();
-    private Queue<CellAddress> commentAddresses = new LinkedList<CellAddress>();
-    private List<String> authors = new ArrayList<String>();
+    private Map<CellAddress, XSSFBComment> comments = new TreeMap<>();
+    private Queue<CellAddress> commentAddresses = new LinkedList<>();
+    private List<String> authors = new ArrayList<>();
 
     //these are all used only during parsing, and they are mutable!
     private int authorId = -1;
index fd4eee0f156bdd69be9324cef645b3e8bd00da95..71fb2322e6b0b96198c4d70233a428467db1dd5f 100644 (file)
@@ -51,10 +51,10 @@ public class XSSFBHyperlinksTable {
     }
 
 
-    private final List<XSSFHyperlinkRecord> hyperlinkRecords = new ArrayList<XSSFHyperlinkRecord>();
+    private final List<XSSFHyperlinkRecord> hyperlinkRecords = new ArrayList<>();
 
     //cache the relId to hyperlink url from the sheet's .rels
-    private Map<String, String> relIdToHyperlink = new HashMap<String, String>();
+    private Map<String, String> relIdToHyperlink = new HashMap<>();
 
     public XSSFBHyperlinksTable(PackagePart sheetPart) throws IOException {
         //load the urls from the sheet .rels
@@ -70,13 +70,13 @@ public class XSSFBHyperlinksTable {
      */
     public Map<CellAddress, List<XSSFHyperlinkRecord>> getHyperLinks() {
         Map<CellAddress, List<XSSFHyperlinkRecord>> hyperlinkMap =
-                new TreeMap<CellAddress, List<XSSFHyperlinkRecord>>(new TopLeftCellAddressComparator());
+                new TreeMap<>(new TopLeftCellAddressComparator());
         for (XSSFHyperlinkRecord hyperlinkRecord : hyperlinkRecords) {
             CellAddress cellAddress = new CellAddress(hyperlinkRecord.getCellRangeAddress().getFirstRow(),
                     hyperlinkRecord.getCellRangeAddress().getFirstColumn());
             List<XSSFHyperlinkRecord> list = hyperlinkMap.get(cellAddress);
             if (list == null) {
-                list = new ArrayList<XSSFHyperlinkRecord>();
+                list = new ArrayList<>();
             }
             list.add(hyperlinkRecord);
             hyperlinkMap.put(cellAddress, list);
@@ -99,7 +99,7 @@ public class XSSFBHyperlinksTable {
         for (XSSFHyperlinkRecord record : hyperlinkRecords) {
             if (CellRangeUtil.intersect(targetCellRangeAddress, record.getCellRangeAddress()) != CellRangeUtil.NO_INTERSECTION) {
                 if (overlapping == null) {
-                    overlapping = new ArrayList<XSSFHyperlinkRecord>();
+                    overlapping = new ArrayList<>();
                 }
                 overlapping.add(record);
             }
index aa417a46d1615a8714f43c36467980d9fc7b2f24..e54f5a5a7230f91f7851ebe2af4a4e8e05f149f9 100644 (file)
@@ -82,7 +82,7 @@ public enum XSSFBRecordType {
     Unimplemented(-1);
 
     private static final Map<Integer, XSSFBRecordType> TYPE_MAP =
-            new HashMap<Integer, XSSFBRecordType>();
+            new HashMap<>();
 
     static {
         for (XSSFBRecordType type : XSSFBRecordType.values()) {
index 2dc197841634e299310c3c2a602f417657d592c1..c14cdc4edf72969b68294548db3b09fd1cbe0d34 100644 (file)
@@ -50,7 +50,7 @@ public class XSSFBSharedStringsTable {
     /**
      * The shared strings table.
      */
-    private List<String> strings = new ArrayList<String>();
+    private List<String> strings = new ArrayList<>();
 
     /**
      * @param pkg The {@link OPCPackage} to use as basis for the shared-strings table.
@@ -87,7 +87,7 @@ public class XSSFBSharedStringsTable {
      * @return a defensive copy of strings
      */
     public List<String> getItems() {
-        List<String> ret = new ArrayList<String>(strings.size());
+        List<String> ret = new ArrayList<>(strings.size());
         ret.addAll(strings);
         return ret;
     }
index 6394074ba8e3539de05b35d8cadb6199a1a6c1b3..06835b21d0ef54a520b8d180f0f073a55484a8c5 100644 (file)
@@ -37,8 +37,8 @@ import org.apache.poi.util.Internal;
 @Internal
 public class XSSFBStylesTable extends XSSFBParser {
 
-    private final SortedMap<Short, String> numberFormats = new TreeMap<Short,String>();
-    private final List<Short> styleIds = new ArrayList<Short>();
+    private final SortedMap<Short, String> numberFormats = new TreeMap<>();
+    private final List<Short> styleIds = new ArrayList<>();
 
     private boolean inCellXFS;
     private boolean inFmts;
index a482049b6ee9ce37c771b6825e02ccf2ebe5fb60..991ccdb3e37327d0497246876d45ad6641529d55 100644 (file)
@@ -239,8 +239,8 @@ public class ReadOnlySharedStringsTable extends DefaultHandler {
             String uniqueCount = attributes.getValue("uniqueCount");
             if(uniqueCount != null) this.uniqueCount = Integer.parseInt(uniqueCount);
 
-            this.strings = new ArrayList<String>(this.uniqueCount);
-            this.phoneticStrings = new HashMap<Integer, String>();
+            this.strings = new ArrayList<>(this.uniqueCount);
+            this.phoneticStrings = new HashMap<>();
             characters = new StringBuffer();
         } else if ("si".equals(localName)) {
             characters.setLength(0);
index aa1f2b214877ac2fe1e0b2e68c6bddd34b46581c..a1872daeb2678fa78920341f9eb51c180b4d9aae 100644 (file)
@@ -59,7 +59,7 @@ public class XSSFBReader extends XSSFReader {
 
     private static final POILogger log = POILogFactory.getLogger(XSSFBReader.class);
     private static final Set<String> WORKSHEET_RELS =
-            Collections.unmodifiableSet(new HashSet<String>(
+            Collections.unmodifiableSet(new HashSet<>(
                     Arrays.asList(new String[]{
                             XSSFRelation.WORKSHEET.getRelation(),
                             XSSFRelation.CHARTSHEET.getRelation(),
@@ -208,7 +208,7 @@ public class XSSFBReader extends XSSFReader {
     }
 
     private static class SheetRefLoader extends XSSFBParser {
-        List<XSSFSheetRef> sheets = new LinkedList<XSSFSheetRef>();
+        List<XSSFSheetRef> sheets = new LinkedList<>();
 
         private SheetRefLoader(InputStream is) {
             super(is);
index 1652b2a7749c796c4d11e04b66852d5d4ec3665c..8aeb0df88121e7e32fbfe4e56ec02aa5dcf080e3 100644 (file)
@@ -67,7 +67,7 @@ import org.xml.sax.helpers.DefaultHandler;
 public class XSSFReader {
 
     private static final Set<String> WORKSHEET_RELS =
-            Collections.unmodifiableSet(new HashSet<String>(
+            Collections.unmodifiableSet(new HashSet<>(
                     Arrays.asList(new String[]{
                             XSSFRelation.WORKSHEET.getRelation(),
                             XSSFRelation.CHARTSHEET.getRelation(),
@@ -229,7 +229,7 @@ public class XSSFReader {
              */
             try {
                 //step 1. Map sheet's relationship Id and the corresponding PackagePart
-                sheetMap = new HashMap<String, PackagePart>();
+                sheetMap = new HashMap<>();
                 OPCPackage pkg = wb.getPackage();
                 Set<String> worksheetRels = getSheetRelationships();
                 for(PackageRelationship rel : wb.getRelationships()){
@@ -265,7 +265,7 @@ public class XSSFReader {
                 throw new POIXMLException(e);
             }
 
-            List<XSSFSheetRef> validSheets = new ArrayList<XSSFSheetRef>();
+            List<XSSFSheetRef> validSheets = new ArrayList<>();
             for (XSSFSheetRef xssfSheetRef : xmlSheetRefReader.getSheetRefs()) {
                 //if there's no relationship id, silently skip the sheet
                 String sheetId = xssfSheetRef.getId();
@@ -356,7 +356,7 @@ public class XSSFReader {
          */
         public List<XSSFShape> getShapes() {
             PackagePart sheetPkg = getSheetPart();
-            List<XSSFShape> shapes= new LinkedList<XSSFShape>();
+            List<XSSFShape> shapes= new LinkedList<>();
            // Do we have a comments relationship? (Only ever one if so)
            try {
               PackageRelationshipCollection drawingsList = sheetPkg.getRelationshipsByType(XSSFRelation.DRAWINGS.getRelation());
@@ -421,7 +421,7 @@ public class XSSFReader {
         private static final String ID = "id";
         private static final String NAME = "name";
 
-        private final List<XSSFSheetRef> sheetRefs = new LinkedList<XSSFSheetRef>();
+        private final List<XSSFSheetRef> sheetRefs = new LinkedList<>();
 
         // read <sheet name="Sheet6" sheetId="4" r:id="rId6"/>
         // and add XSSFSheetRef(id="rId6", name="Sheet6") to sheetRefs
index b37c71ab7df983f3eb8f238ef26717cff21cb395..8f7b30d3c1123542513c820a5f63cd79715d576f 100644 (file)
@@ -162,7 +162,7 @@ public class XSSFSheetXMLHandler extends DefaultHandler {
    
    private void init() {
        if (commentsTable != null) {
-           commentCellRefs = new LinkedList<CellAddress>();
+           commentCellRefs = new LinkedList<>();
            //noinspection deprecation
            for (CTComment comment : commentsTable.getCTComments().getCommentList().getCommentArray()) {
                commentCellRefs.add(new CellAddress(comment.getRef()));
index b80df396066c76535fb48d30985207de4a0d0941..000ee5387c625bdecf0b523f136419131d0b4c83 100644 (file)
@@ -335,7 +335,7 @@ public class XSSFEventBasedExcelExtractor extends POIXMLTextExtractor
         protected SheetTextExtractor() {
             this.output = new StringBuffer();
             this.firstCellOfRow = true;
-            this.headerFooterMap = includeHeadersFooters ? new HashMap<String, String>() : null;
+            this.headerFooterMap = includeHeadersFooters ? new HashMap<>() : null;
         }
 
         @Override
index 814f0a04e1d0182f790098412fc86043976ea0ad..0da032c59296211789f6eb47985430c9c6e17f72 100644 (file)
@@ -133,9 +133,9 @@ public class XSSFExportToXml implements Comparator<String>{
         doc.appendChild(root);
 
 
-        List<String> xpaths = new Vector<String>();
-        Map<String,XSSFSingleXmlCell> singleXmlCellsMappings = new HashMap<String,XSSFSingleXmlCell>();
-        Map<String,XSSFTable> tableMappings = new HashMap<String,XSSFTable>();
+        List<String> xpaths = new Vector<>();
+        Map<String,XSSFSingleXmlCell> singleXmlCellsMappings = new HashMap<>();
+        Map<String,XSSFTable> tableMappings = new HashMap<>();
 
         for(XSSFSingleXmlCell simpleXmlCell : singleXMLCells) {
             xpaths.add(simpleXmlCell.getXpath());
index 4f09db6354409f0e0668c38a64837a12c09aa666..8ea6f1a8a43f1f7fe0ed1af94b2ebca5be68d46d 100644 (file)
@@ -171,7 +171,7 @@ public class XSSFImportFromXML {
         private Set<STXmlDataType.Enum> xmlDataTypes;
 
         private DataType(STXmlDataType.Enum... xmlDataTypes) {
-            this.xmlDataTypes = new HashSet<STXmlDataType.Enum>(Arrays.asList(xmlDataTypes));
+            this.xmlDataTypes = new HashSet<>(Arrays.asList(xmlDataTypes));
         }
 
         public static DataType getDataType(STXmlDataType.Enum xmlDataType) {
index cfc82cd0d67e87baba9749ea850a066f23b85dc8..168959f1cb3b109a531e015b3201322cfb338e35 100644 (file)
@@ -157,7 +157,7 @@ public class CommentsTable extends POIXMLDocumentPart {
      */
     public Map<CellAddress, XSSFComment> getCellComments() {
         prepareCTCommentCache();
-        final TreeMap<CellAddress, XSSFComment> map = new TreeMap<CellAddress, XSSFComment>();
+        final TreeMap<CellAddress, XSSFComment> map = new TreeMap<>();
         
         for (final Entry<CellAddress, CTComment> e: commentRefs.entrySet()) {
             map.put(e.getKey(), new XSSFComment(this, e.getValue(), null));
@@ -174,7 +174,7 @@ public class CommentsTable extends POIXMLDocumentPart {
     private void prepareCTCommentCache() {
         // Create the cache if needed
         if(commentRefs == null) {
-           commentRefs = new HashMap<CellAddress, CTComment>();
+           commentRefs = new HashMap<>();
            for (CTComment comment : comments.getCommentList().getCommentArray()) {
               commentRefs.put(new CellAddress(comment.getRef()), comment);
            }
index 8a796924d64d05956aaa9c411502c10c66b723bb..91388e2dda307e0f88395609131be2ddba005a95 100644 (file)
@@ -122,7 +122,7 @@ public class ExternalLinksTable extends POIXMLDocumentPart {
     public List<String> getSheetNames() {
         CTExternalSheetName[] sheetNames = 
                 link.getExternalBook().getSheetNames().getSheetNameArray();
-        List<String> names = new ArrayList<String>(sheetNames.length);
+        List<String> names = new ArrayList<>(sheetNames.length);
         for (CTExternalSheetName name : sheetNames) {
             names.add(name.getVal());
         }
@@ -132,7 +132,7 @@ public class ExternalLinksTable extends POIXMLDocumentPart {
     public List<Name> getDefinedNames() {
         CTExternalDefinedName[] extNames = 
                 link.getExternalBook().getDefinedNames().getDefinedNameArray();
-        List<Name> names = new ArrayList<Name>(extNames.length);
+        List<Name> names = new ArrayList<>(extNames.length);
         for (CTExternalDefinedName extName : extNames) {
             names.add(new ExternalName(extName));
         }
index ab4522134ebf0565504046885df183bea4932706..957e8771e5c7e743f17eb983da7fb82a59796dc1 100644 (file)
@@ -73,7 +73,7 @@ public class MapInfo extends POIXMLDocumentPart {
                        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));
             }
index 5e9cbff6e5f693d76856615d1215247907b02c94..934a96738fa67a6ecbc7fbdc02fc392e5900bf90 100644 (file)
@@ -63,12 +63,12 @@ public class SharedStringsTable extends POIXMLDocumentPart {
     /**
      *  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
index fb1c80bb3f0ba4a9f722ff85615464e0c47f9c5a..fe18d0c9479d5f5ace24645e25ff42d5d5141099 100644 (file)
@@ -98,7 +98,7 @@ public class SingleXmlCells extends POIXMLDocumentPart {
         * @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));
index 0b924a66e04d4827429f1361d704d3de9ddeb130..6186bfe5fffa6ab3b110e7a28862f4b1235a79a9 100644 (file)
@@ -60,15 +60,15 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.*;
  * 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 List<CTDxf> dxfs = new ArrayList<CTDxf>();
-    private final Map<String, TableStyle> tableStyles = new HashMap<String, TableStyle>();
+    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<>();
+    private final Map<String, TableStyle> tableStyles = new HashMap<>();
     
     private IndexedColorMap indexedColors = new DefaultIndexedColorMap();
     
index 06b02c9bcc01d78323145bd47cf5752dbcd8208d..e8975ecb3772acf4fbbfd04aba86ffebbe8c4578 100644 (file)
@@ -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);
     }
     
index 1ab5c8a231a183660e12843f7b16fa1c54a2df6e..572383becf31525f05260b4815e727d885ed7f21 100644 (file)
@@ -39,7 +39,7 @@ public class SXSSFRow implements Row, Comparable<SXSSFRow>
     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)
index 78a8a4916e891af97aba86c1b256624781169ae7..bb378d7e56b9b253f646ea7cdf8fdbef340e66f2 100644 (file)
@@ -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;
index 9cc402ba02564a5e799935add514ba953ea7d392..931ddcce5f412a2af6ca236288c793d5a30d0e02 100644 (file)
@@ -94,8 +94,8 @@ public class SXSSFWorkbook implements Workbook {
 
     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 Workbook {
      */
     @Override
     public Iterator<Sheet> sheetIterator() {
-        return new SheetIterator<Sheet>();
+        return new SheetIterator<>();
     }
     
     private final class SheetIterator<T extends Sheet> implements Iterator<T> {
index e6400c44766030d0c646663cccdad1e065e1212b..64ead9f4b5520b3ce6ff864e2dae60c17608b971 100644 (file)
@@ -369,7 +369,7 @@ public abstract class BaseXSSFEvaluationWorkbook implements FormulaRenderingWork
             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()) {
index 67555566fc5dbcc668810fa468415fc9e8e42add..440aaf69b74d8329742e98022ad964085c1d400e 100644 (file)
@@ -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() {
     }
index ed9a88b3eae8d4dba4dec5050e32306e74e43591..df0e951c100d362f4605f98e2dbcf016ee5806f4 100644 (file)
@@ -84,7 +84,7 @@ public final class XSSFChart extends POIXMLDocumentPart implements Chart, ChartA
         */
        private CTChart chart;
 
-       List<XSSFChartAxis> axis = new ArrayList<XSSFChartAxis>();
+       List<XSSFChartAxis> axis = new ArrayList<>();
 
        /**
         * Create a new SpreadsheetML chart
index 821fd41647cd41a9158d794fcfd31f5e10bd066a..671e781c82b547828337bee98f7cc1eb35218954 100644 (file)
@@ -54,7 +54,7 @@ public class XSSFConditionalFormatting implements ConditionalFormatting {
      */
     @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) {
index bedb2183f160e01fa042afa5b9c7a3fb0a5d5e1d..f3904406eaccd0903b12bf548fdecf5d1044e383 100644 (file)
@@ -35,8 +35,8 @@ public class XSSFConditionalFormattingRule implements ConditionalFormattingRule
     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);
index 9f945ddbe31fb343de49842ab6005a9533643fa2..15d88f36480bb0a2847216bf9d82d1e37f1728c2 100644 (file)
@@ -41,11 +41,11 @@ public class XSSFDataValidation implements DataValidation {
        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);
index 8f7908dbd6e2ff7afbb0711e589ed5ac22b4de5f..9e62aa07e7d5f06f596bed702928e93ba34b487f 100644 (file)
@@ -163,7 +163,7 @@ public class XSSFDataValidationHelper implements DataValidationHelper {
                }
                
                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());
index b67c7eb4490ed2ef11bea5029cf758d47fa0fbd4..5c88adb3162a7960cb63c1f45407da7252eecc6a 100644 (file)
@@ -482,7 +482,7 @@ public final class XSSFDrawing extends POIXMLDocumentPart implements Drawing<XSS
      * 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 POIXMLDocumentPart implements Drawing<XSS
      * @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 POIXMLDocumentPart implements Drawing<XSS
      * @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);
index fb042afaf40da9b5e7d3c920a4306f311c39eb0d..d8391ebf786858d6d4a8d642f00617f6be9e6b3f 100644 (file)
@@ -55,7 +55,7 @@ final class XSSFEvaluationSheet implements EvaluationSheet {
     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) {
index d71d7a68fe23c81d4b4e222c6c23773d2b8966c7..221df66fb660d862479989c41d41d0aa6a21973f 100644 (file)
@@ -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())) {
index 8b640590beb46f672b6965877626abd3eadcae70..acc7afe5f0d45eb5564b2e5b915c76c57dc8ecd6 100644 (file)
@@ -283,7 +283,7 @@ public class XSSFPivotTable extends POIXMLDocumentPart {
     @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());
             }
index dee6706f30eb7e3094861e3929a4329600a532be..882f12b357b7e39e5188fc110ecf1fe9b02848f7 100644 (file)
@@ -41,7 +41,7 @@ public final class XSSFRelation extends POIXMLRelation {
     /**
      * 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(
index e93f0fa4af9e761e17ea189f9a3600645977f8bf..3c944d4cde85d2a0665d82833a0fdd72105e5c22 100644 (file)
@@ -559,7 +559,7 @@ public class XSSFRichTextString implements RichTextString {
 
     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();
index 35ed24281375d97ba36d2e496c7346bec1242108..fed5d383c28117af142bd90397e0d4316693ac54 100644 (file)
@@ -70,7 +70,7 @@ public class XSSFRow implements Row, Comparable<XSSFRow> {
     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, Comparable<XSSFRow> {
                 // 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);
index d6b7baf340f08edeea31003ee4d6821f4409d5ee..6dea9a792d25e241dd30503248ef2d4fb5074c3d 100644 (file)
@@ -162,7 +162,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet  {
     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 POIXMLDocumentPart implements Sheet  {
         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 POIXMLDocumentPart implements Sheet  {
      * 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 POIXMLDocumentPart implements Sheet  {
      */
     @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 POIXMLDocumentPart implements Sheet  {
         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 POIXMLDocumentPart implements Sheet  {
         }
         
         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 POIXMLDocumentPart implements Sheet  {
             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 POIXMLDocumentPart implements Sheet  {
                 // 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 POIXMLDocumentPart implements Sheet  {
         // 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 POIXMLDocumentPart implements Sheet  {
         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 POIXMLDocumentPart implements Sheet  {
         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 POIXMLDocumentPart implements Sheet  {
 
     @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 POIXMLDocumentPart implements Sheet  {
      * 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 POIXMLDocumentPart implements Sheet  {
      */
     @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 POIXMLDocumentPart implements Sheet  {
      * @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()));
index 76138246ff6926215bdffb211aff4172bc6775ad..173e24fbebeeb47b5b2b796c1692ba5b61d0ddd9 100644 (file)
@@ -200,7 +200,7 @@ public class XSSFSheetConditionalFormatting implements SheetConditionalFormattin
 
         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);
 
index 08e35f30e56e3216735b6b46c24cf65f97aeb033..4696030ba666662f222de42942e96b0b57fc2242 100644 (file)
@@ -57,7 +57,7 @@ public class XSSFSimpleShape extends XSSFShape implements Iterable<XSSFTextParag
         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 XSSFShape implements Iterable<XSSFTextParag
     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
index 7435ce6add1bf4badaff453e8a3cc73149bc9e5e..39b1ab7da2ab86e6e3259a1d2798daeac5e7a423 100644 (file)
@@ -219,7 +219,7 @@ public class XSSFTable extends POIXMLDocumentPart implements Table {
      */
     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 POIXMLDocumentPart implements Table {
         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()) {
index 2cff0a5c9e68c21bf4c6b36ee4ff4ce7a8ddeb02..74652b9f68abf718b9cb5481755a89675d286828 100644 (file)
@@ -45,7 +45,7 @@ public class XSSFTableStyle implements TableStyle {
 
     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 TableStyle {
         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();
index e03107e41ea8712d7be12dea192741ee2dc652cd..5df01abda27e6003e489fd1906c09750bbc97059 100644 (file)
@@ -41,7 +41,7 @@ public class XSSFTextParagraph implements Iterable<XSSFTextRun>{
     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){
index 43c38bce5b9794b103eed774eb9a095ca54d49a5..5cfd38294a54e46b113e27593e3f0a0eca7be990 100644 (file)
@@ -92,8 +92,8 @@ public final class XSSFVMLDrawing extends POIXMLDocumentPart {
      */
     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 extends POIXMLDocumentPart {
         }
         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());
index 08c565a346eaf5f3d603296f7b723f059a3c3360..b7d27bfa824438751d3f825f09540136e4c05d04 100644 (file)
@@ -347,8 +347,8 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook {
         }
 
         // 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 POIXMLDocument implements Workbook {
             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 POIXMLDocument implements Workbook {
             
             // 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 POIXMLDocument implements Workbook {
             
             // 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 POIXMLDocument implements Workbook {
         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 POIXMLDocument implements Workbook {
     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 POIXMLDocument implements Workbook {
      */
     @Override
     public Iterator<Sheet> sheetIterator() {
-        return new SheetIterator<Sheet>();
+        return new SheetIterator<>();
     }
     
     /**
@@ -1381,7 +1381,7 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook {
         }
 
         //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 POIXMLDocument implements Workbook {
     }
     
     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 POIXMLDocument implements Workbook {
      */
     @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 POIXMLDocument implements Workbook {
      * @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 POIXMLDocument implements Workbook {
         cache.setCacheId(tableId);
         cache.setId(rId);
         if(pivotCaches == null) {
-            pivotCaches = new ArrayList<CTPivotCache>();
+            pivotCaches = new ArrayList<>();
         }
         pivotCaches.add(cache);
         return cache;
index 64c72c250e27b710c515647da4995cfe6a076058..7038745033d07b4b2faaa4ab7cda7aad55f38b54 100644 (file)
@@ -46,7 +46,7 @@ public class XSSFLineChartData implements LineChartData {
     private List<Series> series;
 
     public XSSFLineChartData() {
-        series = new ArrayList<Series>();
+        series = new ArrayList<>();
     }
 
     static class Series extends AbstractXSSFChartSeries implements LineChartSeries {
index f31b35503144bcf131acf3d7424872c2bf5f297d..b192c36bd9ac8462252477827f8d93f83f4fb996 100644 (file)
@@ -48,7 +48,7 @@ public class XSSFScatterChartData implements ScatterChartData {
     private List<Series> series;
 
     public XSSFScatterChartData() {
-        series = new ArrayList<Series>();
+        series = new ArrayList<>();
     }
 
     /**
index b27100656beae45abe195a4b59afc2dddfceacd7..bccbbf167f65e13a93c66175b0514139bad14adb 100644 (file)
@@ -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);
index d0dc0b7606966d1a898ceb85e9415b1406b54b21..61ea8d291afb14469051f7279cf46cb19909b0c1 100644 (file)
@@ -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);
index 46f0b892cf3f50fc9788241601bfb5cfb5697e17..60e7ce78f67ee084df1f7253017608841abc0465 100644 (file)
@@ -206,7 +206,7 @@ public final class XSSFRowShifter extends RowShifter {
         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 extends RowShifter {
             }
 
             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 extends RowShifter {
                     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);
             }
index 69e039120e1e8e03dbe78c25530e050c8c485ea8..d77e7f088fdc9d7452ced60199792cea51e3e29f 100644 (file)
@@ -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()) {
index 5e49ee479c5f937055a37eb8a84c58001e6b1006..895c143b0c076ae447fd0928457c1fb751c29bd4 100644 (file)
@@ -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()) {
index 3a6054b011615722781fa9951eb380d8149534aa..aea132db9778ad70c0d6731f7e5aa7447e9e22f9 100644 (file)
@@ -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()) {
index 10a34418f1eda5fb490f842b5fae8e4ab27d1732..836069d0d5b640be4a6bcda840b8cd34b44ff9bd 100644 (file)
@@ -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()) {
index f39d53350892467a7d3effaed1ecd915b380cb18..9f6496d49fb820ac32a8193db507f2f58d39e0f3 100644 (file)
@@ -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()) {
index b8511a3bbc69b80df8ebf26368baea07bafdae98..6ed8dc00e47ffb6c586be80f1de26eaba0d2fecd 100644 (file)
@@ -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()) {
index 132444796a080f5b916272466486935585d77e5a..f863d79fbfbf226e3d751ad0155b89e58e94cbeb 100644 (file)
@@ -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()) {
index 57b279716527578e16cd583f9e0b0e122a7e14aa..209e006dca21315476425ba7d63909bdb8defcb4 100644 (file)
@@ -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()) {
index 7cdfd6f7b0f5586497efdbb748266b706ac6f495..97c7c76f19f3f9019d847fc9d0d1f978f3369b38 100644 (file)
@@ -80,17 +80,17 @@ import org.openxmlformats.schemas.wordprocessingml.x2006.main.*;
 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 POIXMLDocument implements Document, IBody {
      */
     @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 POIXMLDocument implements Document, IBody {
      * @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 POIXMLDocument implements Document, IBody {
     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)) {
index e67ed308947b8bd712278397d9171e3cceb9cafd..6a9cb65f38acdba8fedb0a24916e998a03e8dfdf 100644 (file)
@@ -32,10 +32,10 @@ import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl;
 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;
index c037bd7d4b93306b5fc1b2018ae8a2ca36e50c2a..d57d7b885bcf42967de30a4b1f52e94e456c8bdb 100644 (file)
@@ -42,7 +42,7 @@ import org.openxmlformats.schemas.wordprocessingml.x2006.main.FootnotesDocument;
  */
 public class XWPFFootnotes extends POIXMLDocumentPart {
     protected XWPFDocument document;
-    private List<XWPFFootnote> listFootnote = new ArrayList<XWPFFootnote>();
+    private List<XWPFFootnote> listFootnote = new ArrayList<>();
     private CTFootnotes ctFootnotes;
 
     /**
index 62ecfeed5f9584debb9d4767703791eaec82ae04..24d83925a67efc59f876d569002dcec085b9aaa5 100644 (file)
@@ -42,10 +42,10 @@ import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc;
  * 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 extends POIXMLDocumentPart implements IBo
     }
 
     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();
index 1b7162e004c28d865833bdbdedd14fd7df95d910..b4b34e55624e79bbd17019a61bd062b1763d3586 100644 (file)
@@ -42,8 +42,8 @@ import org.openxmlformats.schemas.wordprocessingml.x2006.main.NumberingDocument;
  * @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 POIXMLDocumentPart {
      * 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;
     }
 
index b5ecba393b3a56a6722a717fefd5b49b160071c7..cb1d089125b80f73e2698d69a65f705ac482f91a 100644 (file)
@@ -58,8 +58,8 @@ public class XWPFParagraph implements IBodyElement, IRunBody, ISDTContents, Para
         }
 
         // 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
index dbd5f377332c95b971eba3b5d09c094ac499ade1..9f628845e2d4b7d13a4beccdeb46297fd6da500a 100644 (file)
@@ -32,7 +32,7 @@ public final class XWPFRelation extends POIXMLRelation {
     /**
      * 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",
index 4da3f995b1fd545d97d074345d7160f59ad0818c..8b9c527aae4bebf545d2d478bd7080594a53f33f 100644 (file)
@@ -123,7 +123,7 @@ public class XWPFRun implements ISDTContents, IRunElement, CharacterRun {
 
         // 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 ISDTContents, IRunElement, CharacterRun {
 
         // 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 ISDTContents, IRunElement, CharacterRun {
     }
 
     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) {
index 9950aa35ac05837286859474d9886e8e73ddf2c1..185e453aa050994d91d7dc65db05a0b1c036f134 100644 (file)
@@ -40,11 +40,11 @@ public class XWPFSDTContent implements ISDTContent {
 
     // 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()) {
index 511c85a6bd596f53da16d5f4f5deb01e9ce6af09..1afc32e2798754763d478f60bea4d999f292e208 100644 (file)
@@ -51,7 +51,7 @@ import org.openxmlformats.schemas.wordprocessingml.x2006.main.StylesDocument;
  */
 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 POIXMLDocumentPart {
      * @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);
     }
index cebdcab06d9e456316d139a2f4f0286bc8722dcd..be8831e8a97c99918517569b1a29b39b89b11f39 100644 (file)
@@ -50,7 +50,7 @@ public class XWPFTable implements IBodyElement, ISDTContents {
 
     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 IBodyElement, ISDTContents {
         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 IBodyElement, ISDTContents {
         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)
index e20611c60fdf009f60c52139eccc0a2e5eeefe46..4ce566bc445c74c6f765ecb4963653beb994b962 100644 (file)
@@ -49,13 +49,13 @@ public class XWPFTableCell implements IBody, ICell {
 
     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 IBody, ICell {
         // 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("./*");
index 4755a8209624fc71266b7a9909af3fb809761964..39d2ff71ce68b0c2b9bd61ffb8e32c2def735c03 100644 (file)
@@ -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()));
             }
index a636e20fb8e6158d5d71b2e8a4210b0de01a05dc..90e13aecd4c6122ade42a161af16bdcd034c1eb7 100644 (file)
@@ -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));
index 86732836ac6839fe6f341a49dc2c3b5d7b73ab75..db3219f80e2ca8987645332a789f2869cd9179c6 100644 (file)
@@ -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);
index f22c78790d8342982b7913cfdc4dcee92851bb59..8bccffb3eebfaeb39e7c8ed95dd6cb9e0ea94fca 100644 (file)
@@ -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");
 
index 78294e3534a9f5e07cda067caec939881eae80a4..a9776ae89b281cc5e724c4bebb143d7f22ceb276 100644 (file)
@@ -37,10 +37,10 @@ public final class TestListParts extends TestCase {
 
        @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");
 
index 44b3c3184f73bdb2173c2c9a47a2e22db3fa3e68..97149e71a1136fa1f8ded4d60f2ee192d5b19251 100644 (file)
@@ -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);
index b29d21fc0f8c75e0c4092ed79d5fda0e41709a13..49a4da4422aabee3344efb07cac1f951c688413e 100644 (file)
@@ -109,8 +109,8 @@ public final class TestPackageCoreProperties {
                props.setKeywordsProperty("MyKeywords");
                props.setLanguageProperty("MyLanguage");
                props.setLastModifiedByProperty("Julien Chable");
-               props.setLastPrintedProperty(new Nullable<Date>(dateToInsert));
-               props.setModifiedProperty(new Nullable<Date>(dateToInsert));
+               props.setLastPrintedProperty(new Nullable<>(dateToInsert));
+               props.setModifiedProperty(new Nullable<>(dateToInsert));
                props.setRevisionProperty("2");
                props.setTitleProperty("MyTitle");
                props.setSubjectProperty("MySubject");
@@ -168,10 +168,10 @@ public final class TestPackageCoreProperties {
         props.setCreatedProperty((String)null);
         assertEquals("", props.getCreatedPropertyString());
         assertNull(props.getCreatedProperty().getValue());
-        props.setCreatedProperty(new Nullable<Date>());
+        props.setCreatedProperty(new Nullable<>());
         assertEquals("", props.getCreatedPropertyString());
         assertNull(props.getCreatedProperty().getValue());
-        props.setCreatedProperty(new Nullable<Date>(date));
+        props.setCreatedProperty(new Nullable<>(date));
         assertEquals(strDate, props.getCreatedPropertyString());
         assertEquals(date, props.getCreatedProperty().getValue());
         props.setCreatedProperty(strDate);
@@ -184,10 +184,10 @@ public final class TestPackageCoreProperties {
         props.setLastPrintedProperty((String)null);
         assertEquals("", props.getLastPrintedPropertyString());
         assertNull(props.getLastPrintedProperty().getValue());
-        props.setLastPrintedProperty(new Nullable<Date>());
+        props.setLastPrintedProperty(new Nullable<>());
         assertEquals("", props.getLastPrintedPropertyString());
         assertNull(props.getLastPrintedProperty().getValue());
-        props.setLastPrintedProperty(new Nullable<Date>(date));
+        props.setLastPrintedProperty(new Nullable<>(date));
         assertEquals(strDate, props.getLastPrintedPropertyString());
         assertEquals(date, props.getLastPrintedProperty().getValue());
         props.setLastPrintedProperty(strDate);
@@ -198,9 +198,9 @@ public final class TestPackageCoreProperties {
         assertNull(props.getModifiedProperty().getValue());
         props.setModifiedProperty((String)null);
         assertNull(props.getModifiedProperty().getValue());
-        props.setModifiedProperty(new Nullable<Date>());
+        props.setModifiedProperty(new Nullable<>());
         assertNull(props.getModifiedProperty().getValue());
-        props.setModifiedProperty(new Nullable<Date>(date));
+        props.setModifiedProperty(new Nullable<>(date));
         assertEquals(strDate, props.getModifiedPropertyString());
         assertEquals(date, props.getModifiedProperty().getValue());
         props.setModifiedProperty(strDate);
index a19e52b97a0bc0999768dad2d86182baa38cb2ab..330720fd309f8eb13dedd2595482b7d7513781d0 100644 (file)
@@ -75,7 +75,7 @@ public class ZipFileAssert {
                        File filename) throws IOException {
                // store the zip content in memory
                // let s assume it is not Go ;-)
-               TreeMap<String, ByteArrayOutputStream> zipContent = new TreeMap<String, ByteArrayOutputStream>();
+               TreeMap<String, ByteArrayOutputStream> zipContent = new TreeMap<>();
 
                byte data[] = new byte[BUFFER_SIZE];
                /* Open file to decompress */
index 0786ed51d2b44a5e011bf089d35c02526516398b..28abec4a2eb469163ce7347056c2e9f77b31be6b 100644 (file)
@@ -58,7 +58,7 @@ public class TestAgileEncryptionParameters {
         HashAlgorithm haList[] = { HashAlgorithm.sha1, HashAlgorithm.sha256, HashAlgorithm.sha384, HashAlgorithm.sha512, HashAlgorithm.md5 };
         ChainingMode cmList[] = { ChainingMode.cbc, ChainingMode.cfb };
 
-        List<Object[]> data = new ArrayList<Object[]>();
+        List<Object[]> data = new ArrayList<>();
         for (CipherAlgorithm ca : caList) {
             for (HashAlgorithm ha : haList) {
                 for (ChainingMode cm : cmList) {
index f93e47b7e2c3cbcbf0a05655b7f53216d8de7332..6c0d903c8668b00f681882ddbbb7884e89da9718 100644 (file)
@@ -248,7 +248,7 @@ public class TestSignatureInfo {
             sic.setOpcPackage(pkg);
             SignatureInfo si = new SignatureInfo();
             si.setSignatureConfig(sic);
-            List<X509Certificate> result = new ArrayList<X509Certificate>();
+            List<X509Certificate> result = new ArrayList<>();
             for (SignaturePart sp : si.getSignatureParts()) {
                 if (sp.validate()) {
                     result.add(sp.getSigner());
@@ -283,7 +283,7 @@ public class TestSignatureInfo {
                 sic.setOpcPackage(pkg);
                 SignatureInfo si = new SignatureInfo();
                 si.setSignatureConfig(sic);
-                List<X509Certificate> result = new ArrayList<X509Certificate>();
+                List<X509Certificate> result = new ArrayList<>();
                 for (SignaturePart sp : si.getSignatureParts()) {
                     if (sp.validate()) {
                         result.add(sp.getSigner());
@@ -313,7 +313,7 @@ public class TestSignatureInfo {
             sic.setOpcPackage(pkg);
             SignatureInfo si = new SignatureInfo();
             si.setSignatureConfig(sic);
-            List<X509Certificate> result = new ArrayList<X509Certificate>();
+            List<X509Certificate> result = new ArrayList<>();
             for (SignaturePart sp : si.getSignatureParts()) {
                 if (sp.validate()) {
                     result.add(sp.getSigner());
@@ -384,7 +384,7 @@ public class TestSignatureInfo {
         si.setSignatureConfig(sic);
         // hash > sha1 doesn't work in excel viewer ...
         si.confirmSignature();
-        List<X509Certificate> result = new ArrayList<X509Certificate>();
+        List<X509Certificate> result = new ArrayList<>();
         for (SignaturePart sp : si.getSignatureParts()) {
             if (sp.validate()) {
                 result.add(sp.getSigner());
@@ -411,7 +411,7 @@ public class TestSignatureInfo {
          * We need at least 2 certificates for the XAdES-C complete certificate
          * refs construction.
          */
-        List<X509Certificate> certificateChain = new ArrayList<X509Certificate>();
+        List<X509Certificate> certificateChain = new ArrayList<>();
         certificateChain.add(x509);
         certificateChain.add(x509);
         signatureConfig.setSigningCertificateChain(certificateChain);
@@ -600,7 +600,7 @@ public class TestSignatureInfo {
 
         Key key = keystore.getKey("poitest", password.toCharArray());
         Certificate chainList[] = keystore.getCertificateChain("poitest");
-        List<X509Certificate> certChain = new ArrayList<X509Certificate>();
+        List<X509Certificate> certChain = new ArrayList<>();
         for (Certificate c : chainList) {
             certChain.add((X509Certificate)c);
         }
@@ -752,7 +752,7 @@ public class TestSignatureInfo {
 
         // verify: signature
         si.getSignatureConfig().setOpcPackage(pkgCopy);
-        List<X509Certificate> result = new ArrayList<X509Certificate>();
+        List<X509Certificate> result = new ArrayList<>();
         for (SignaturePart sp : si.getSignatureParts()) {
             if (sp.validate()) {
                 result.add(sp.getSigner());
index 55630d86639d8636e7ba842a7fd1b7ab0300d0bd..d6e83130ff75c7a245f49c35f23d5b0ced1f66e3 100644 (file)
@@ -123,7 +123,7 @@ public class TestFonts {
         BufferedImage img = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
         Graphics2D graphics = img.createGraphics();
 
-        Map<String,String> fallbackMap = new HashMap<String,String>();
+        Map<String,String> fallbackMap = new HashMap<>();
         fallbackMap.put("NoSuchFont", "Mona");
         // in XSLF the fonts default to the theme fonts (Calibri), if the font group is not overridden
         // see XSLFTextRun.XSLFTextInfo.getCTTextFont
index 669fd33813a73a0336f86bf103ba8de6e2d3a339..377e770e2ebd41d57aa00d306b461203ae0ee0fa 100644 (file)
@@ -49,7 +49,7 @@ public class TestEmbeddedExtractor {
         fis.close();
 
         EmbeddedExtractor ee = new EmbeddedExtractor();
-        List<EmbeddedData> edList = new ArrayList<EmbeddedData>();
+        List<EmbeddedData> edList = new ArrayList<>();
         for (Sheet s : wb) {
             edList.addAll(ee.extractAll(s));
         }
@@ -77,7 +77,7 @@ public class TestEmbeddedExtractor {
         fis.close();
 
         EmbeddedExtractor ee = new EmbeddedExtractor();
-        List<EmbeddedData> edList = new ArrayList<EmbeddedData>();
+        List<EmbeddedData> edList = new ArrayList<>();
         for (Sheet s : wb) {
             edList.addAll(ee.extractAll(s));
         }
index 447684ca903540871ccbb0a4d1f9881f11d61170..47d71ff613086a39a0b60d8bc846b5ef223d569e 100644 (file)
@@ -41,117 +41,117 @@ public class CombinedIteratorTest {
     @Test
     public void testNullMaster() {
 
-        SortedMap<Long, String> base = new TreeMap<Long, String>();
+        SortedMap<Long, String> base = new TreeMap<>();
         base.put(1L, "B1");
         base.put(2L, "B2");
         base.put(3L, "B3");
 
-        testIteration(new CombinedIterable<String>(base, null), "B1", "B2",
+        testIteration(new CombinedIterable<>(base, null), "B1", "B2",
                 "B3");
     }
 
     @Test
     public void testNoMatchesBaseFirst() {
 
-        SortedMap<Long, String> base = new TreeMap<Long, String>();
+        SortedMap<Long, String> base = new TreeMap<>();
         base.put(1L, "B1");
         base.put(2L, "B2");
         base.put(3L, "B3");
 
-        SortedMap<Long, String> master = new TreeMap<Long, String>();
+        SortedMap<Long, String> master = new TreeMap<>();
         master.put(4L, "M4");
         master.put(5L, "M5");
         master.put(6L, "M6");
 
-        testIteration(new CombinedIterable<String>(base, master), "B1", "B2",
+        testIteration(new CombinedIterable<>(base, master), "B1", "B2",
                 "B3", "M4", "M5", "M6");
     }
 
     @Test
     public void testNoMatchesMasterFirst() {
 
-        SortedMap<Long, String> base = new TreeMap<Long, String>();
+        SortedMap<Long, String> base = new TreeMap<>();
         base.put(4L, "B4");
         base.put(5L, "B5");
         base.put(6L, "B6");
 
-        SortedMap<Long, String> master = new TreeMap<Long, String>();
+        SortedMap<Long, String> master = new TreeMap<>();
         master.put(1L, "M1");
         master.put(2L, "M2");
         master.put(3L, "M3");
 
-        testIteration(new CombinedIterable<String>(base, master), "M1", "M2",
+        testIteration(new CombinedIterable<>(base, master), "M1", "M2",
                 "M3", "B4", "B5", "B6");
     }
 
     @Test
     public void testInterleaved1() {
 
-        SortedMap<Long, String> base = new TreeMap<Long, String>();
+        SortedMap<Long, String> base = new TreeMap<>();
         base.put(1L, "B1");
         base.put(3L, "B3");
         base.put(5L, "B5");
 
-        SortedMap<Long, String> master = new TreeMap<Long, String>();
+        SortedMap<Long, String> master = new TreeMap<>();
         master.put(2L, "M2");
         master.put(4L, "M4");
         master.put(6L, "M6");
 
-        testIteration(new CombinedIterable<String>(base, master), "B1", "M2",
+        testIteration(new CombinedIterable<>(base, master), "B1", "M2",
                 "B3", "M4", "B5", "M6");
     }
 
     @Test
     public void testInterleaved2() {
 
-        SortedMap<Long, String> base = new TreeMap<Long, String>();
+        SortedMap<Long, String> base = new TreeMap<>();
         base.put(1L, "B1");
         base.put(2L, "B2");
         base.put(5L, "B5");
         base.put(6L, "B6");
 
-        SortedMap<Long, String> master = new TreeMap<Long, String>();
+        SortedMap<Long, String> master = new TreeMap<>();
         master.put(3L, "M3");
         master.put(4L, "M4");
         master.put(7L, "M7");
         master.put(8L, "M8");
 
-        testIteration(new CombinedIterable<String>(base, master), "B1", "B2",
+        testIteration(new CombinedIterable<>(base, master), "B1", "B2",
                 "M3", "M4", "B5", "B6", "M7", "M8");
     }
 
     @Test
     public void testAllMatching() {
 
-        SortedMap<Long, String> base = new TreeMap<Long, String>();
+        SortedMap<Long, String> base = new TreeMap<>();
         base.put(1L, "B1");
         base.put(2L, "B2");
         base.put(3L, "B3");
 
-        SortedMap<Long, String> master = new TreeMap<Long, String>();
+        SortedMap<Long, String> master = new TreeMap<>();
         master.put(1L, "M1");
         master.put(2L, "M2");
         master.put(3L, "M3");
 
-        testIteration(new CombinedIterable<String>(base, master), "B1", "B2",
+        testIteration(new CombinedIterable<>(base, master), "B1", "B2",
                 "B3");
     }
 
     @Test
     public void testAllMatching2() {
 
-        SortedMap<Long, String> base = new TreeMap<Long, String>();
+        SortedMap<Long, String> base = new TreeMap<>();
         base.put(1L, "B1");
         base.put(2L, "B2");
         base.put(3L, "B3");
 
-        SortedMap<Long, String> master = new TreeMap<Long, String>();
+        SortedMap<Long, String> master = new TreeMap<>();
         master.put(1L, "M1");
         master.put(2L, "M2");
         master.put(3L, "M3");
         master.put(4L, "M4");
 
-        testIteration(new CombinedIterable<String>(base, master), "B1", "B2",
+        testIteration(new CombinedIterable<>(base, master), "B1", "B2",
                 "B3", "M4");
     }
 }
index b77550f7861a8858dd14623bf378978030c68a84..94205da144006ad6e8dc7009034f3eb5a94c0f96 100644 (file)
@@ -66,7 +66,7 @@ public class TestPPTX2PNG {
     
     @Parameters(name="{0}")
     public static Collection<String> data() {
-        final Set<String> data = new TreeSet<String>();
+        final Set<String> data = new TreeSet<>();
         for (String f : files.split(", ?")) {
             if (basedir == null) {
                 data.add(f);
index 39f29fb31ea1fabd7679d533ff2044c4ed2ec762..e5f531dd388db487c410cbacbff5691f3ce0b0ed 100644 (file)
@@ -98,7 +98,7 @@ public class TestXSLFChart {
         strData.setPtArray(null);  // unset old axis text
         numData.setPtArray(null);  // unset old values
 
-        Map<String, Double> pieModel = new LinkedHashMap<String, Double>();
+        Map<String, Double> pieModel = new LinkedHashMap<>();
         pieModel.put("First", 1.0);
         pieModel.put("Second", 3.0);
         pieModel.put("Third", 4.0);
index 3ca01733efa3d0c3f806355f46bf2ff801ad1f85..cf54e155db6057d47dc9418b6c63d0f6bf77a09e 100644 (file)
@@ -114,7 +114,7 @@ public class TestXSLFPictureShape {
         XMLSlideShow ppt2 = XSLFTestDataSamples.writeOutAndReadBack(ppt1);
         ppt1.close();
         // pictures keyed by file name
-        Map<String, XSLFPictureData> pics = new HashMap<String, XSLFPictureData>();
+        Map<String, XSLFPictureData> pics = new HashMap<>();
         for(XSLFPictureData p : ppt2.getPictureData()){
             pics.put(p.getFileName(), p);
         }
index ab84979d09d16ae810a297305d9fd0c2cfbf2216..90de9c5977bfd198b87ac3ab437e9ae0d8f4645b 100644 (file)
@@ -45,7 +45,7 @@ public final class SXSSFITestDataProvider implements ITestDataProvider {
 
     // an instance of all SXSSFWorkbooks opened by this TestDataProvider,
     // so that the temporary files created can be disposed up by cleanup() 
-    private final Collection<SXSSFWorkbook> instances = new ArrayList<SXSSFWorkbook>();
+    private final Collection<SXSSFWorkbook> instances = new ArrayList<>();
 
     private SXSSFITestDataProvider() {
         // enforce singleton
index 4c12af47082c8fdb8a93d4712722560df15a61af..7052459194aac839d5c14d80fa57b24b91c7a36b 100644 (file)
@@ -127,7 +127,7 @@ public class TestXSSFBReader {
 
     private List<String> getSheets(String testFileName) throws Exception {
         OPCPackage pkg = OPCPackage.open(_ssTests.openResourceAsStream(testFileName));
-        List<String> sheetTexts = new ArrayList<String>();
+        List<String> sheetTexts = new ArrayList<>();
         XSSFBReader r = new XSSFBReader(pkg);
 
 //        assertNotNull(r.getWorkbookData());
index 0221bcca5b9bb4b456cd3ef9f7fcdeb608bcd141..c70a24cebce2bcd9df053debde1d2fcb2c51d103 100644 (file)
@@ -287,7 +287,7 @@ public final class TestXSSFReader extends TestCase {
         OPCPackage pkg = XSSFTestDataSamples.openSamplePackage("61034.xlsx");
         XSSFReader reader = new XSSFReader(pkg);
         XSSFReader.SheetIterator iter = (XSSFReader.SheetIterator) reader.getSheetsData();
-        Set<String> seen = new HashSet<String>();
+        Set<String> seen = new HashSet<>();
         while (iter.hasNext()) {
             InputStream stream = iter.next();
             String sheetName = iter.getSheetName();
index f4450c0109f42795c281d5ed5f6c9c912d0c1075..c244d287a6653cdef237e10d10d35a3f5a65c107 100644 (file)
@@ -133,7 +133,7 @@ public class TestXSSFExcelExtractor extends TestCase {
                ExcelExtractor ole2Extractor =
                        new ExcelExtractor(HSSFTestDataSamples.openSampleWorkbook("SampleSS.xls"));
                
-               Map<String, POITextExtractor> extractors = new HashMap<String, POITextExtractor>();
+               Map<String, POITextExtractor> extractors = new HashMap<>();
                extractors.put("SampleSS.xlsx", ooxmlExtractor);
                extractors.put("SampleSS.xls", ole2Extractor);
                
index ef87a9fd0656cd41953a6db7bdd5164ee4d09dd0..d1cdfaba089dd3040b81e3c3a65b74a108998ebf 100644 (file)
@@ -172,7 +172,7 @@ public final class TestSharedStringsTable extends TestCase {
     }
 
     private List<String> readStrings(String filename) throws IOException {
-        List<String> strs = new ArrayList<String>();
+        List<String> strs = new ArrayList<>();
         POIDataSamples samples = POIDataSamples.getSpreadSheetInstance();
         BufferedReader br = new BufferedReader(
                 new InputStreamReader(samples.openResourceAsStream(filename), "UTF-8"));
index c93d8de241c69c41511706d7bb358a1e05421968..5b48b34584aa17d6c593fc8135281a58f6a5e946 100644 (file)
@@ -73,7 +73,7 @@ public class TestThemesTable {
         simple = XSSFTestDataSamples.openSampleWorkbook(testFileSimple);
         complex = XSSFTestDataSamples.openSampleWorkbook(testFileComplex);
         // Files and descriptions
-        Map<String,XSSFWorkbook> workbooks = new LinkedHashMap<String, XSSFWorkbook>();
+        Map<String,XSSFWorkbook> workbooks = new LinkedHashMap<>();
         workbooks.put(testFileSimple, simple);
         workbooks.put("Re-Saved_" + testFileSimple, simpleRS);
         workbooks.put(testFileComplex, complex);
index cb90efb321b2b3d24d30082bb402fdcf11da0103..68398310f0a19d7c47f6bc669535d6ce472fbbc5 100644 (file)
@@ -28,10 +28,10 @@ import org.apache.poi.poifs.crypt.temp.SheetDataWriterWithDecorator;
 // afterwards, a test function can check whether these files were encrypted or not
 public class TempFileRecordingSXSSFWorkbookWithCustomZipEntrySource extends SXSSFWorkbookWithCustomZipEntrySource {
 
-    private final List<File> tempFiles = new ArrayList<File>();
+    private final List<File> tempFiles = new ArrayList<>();
 
     List<File> getTempFiles() {
-        return new ArrayList<File>(tempFiles);
+        return new ArrayList<>(tempFiles);
     }
     
     @Override
index a6a2dde5e6ab9bb91bfa71736c97f8ae397ebfc3..a0d91223098dc05d222a4a8c50d31fd6863086e2 100644 (file)
@@ -55,7 +55,7 @@ public class TestAutoSizeColumnTracker {
     private AutoSizeColumnTracker tracker;
     private static final SortedSet<Integer> columns;
     static {
-        SortedSet<Integer>_columns = new TreeSet<Integer>();
+        SortedSet<Integer>_columns = new TreeSet<>();
         _columns.add(0);
         _columns.add(1);
         _columns.add(3);
@@ -85,7 +85,7 @@ public class TestAutoSizeColumnTracker {
     public void trackAndUntrackColumn() {
         assumeTrue(tracker.getTrackedColumns().isEmpty());
         tracker.trackColumn(0);
-        Set<Integer> expected = new HashSet<Integer>();
+        Set<Integer> expected = new HashSet<>();
         expected.add(0);
         assertEquals(expected, tracker.getTrackedColumns());
         tracker.untrackColumn(0);
index 15acbfca0bcd6f52308882e35b2c42b69ca0b610..8a82e8d4c3bb2ec21e328ca706a5e862d7eb389d 100644 (file)
@@ -68,7 +68,7 @@ public class TestSXSSFSheetAutoSizeColumn {
     
     private static final SortedSet<Integer> columns;
     static {
-        SortedSet<Integer>_columns = new TreeSet<Integer>();
+        SortedSet<Integer>_columns = new TreeSet<>();
         _columns.add(0);
         _columns.add(1);
         _columns.add(3);
@@ -224,7 +224,7 @@ public class TestSXSSFSheetAutoSizeColumn {
         sheet = workbook.createSheet();
         sheet.trackColumnForAutoSizing(0);
         
-        SortedSet<Integer> expected = new TreeSet<Integer>();
+        SortedSet<Integer> expected = new TreeSet<>();
         expected.add(0);
         assertEquals(expected, sheet.getTrackedColumnsForAutoSizing());
         
@@ -244,7 +244,7 @@ public class TestSXSSFSheetAutoSizeColumn {
         sheet = workbook.createSheet();
         
         sheet.trackColumnsForAutoSizing(columns);
-        SortedSet<Integer> sorted = new TreeSet<Integer>(columns);
+        SortedSet<Integer> sorted = new TreeSet<>(columns);
         assertEquals(sorted, sheet.getTrackedColumnsForAutoSizing());
         
         sheet.autoSizeColumn(sorted.first(), useMergedCells);
index ad8b49028d5d60b6302b7c72b37f241122170882..c6f3e3cf531a962b8346a626e5571e0fbb1e1a0d 100644 (file)
@@ -132,7 +132,7 @@ public final class TestFormulaEvaluatorOnXSSF {
         sheet = workbook.getSheetAt( 0 );
         evaluator = new XSSFFormulaEvaluator(workbook);
         
-        List<Object[]> data = new ArrayList<Object[]>();
+        List<Object[]> data = new ArrayList<>();
         
         processFunctionGroup(data, SS.START_OPERATORS_ROW_INDEX, null);
         processFunctionGroup(data, SS.START_FUNCTIONS_ROW_INDEX, null);
index b8926a3cf53fbddee00276c95946d9f85eb8a429..bdd85130c839e7956c4225636892975b0b14a11c 100644 (file)
@@ -117,7 +117,7 @@ public final class TestMultiSheetFormulaEvaluatorOnXSSF {
         sheet = workbook.getSheet( SS.TEST_SHEET_NAME );
         evaluator = new XSSFFormulaEvaluator(workbook);
 
-        List<Object[]> data = new ArrayList<Object[]>();
+        List<Object[]> data = new ArrayList<>();
 
         processFunctionGroup(data, SS.START_FUNCTIONS_ROW_INDEX, null);
 
index 01e3b9280787b4e25e667d30844caafb05b1d235..2fef66893298275928fb801a5230b5f4a3a7cb15 100644 (file)
@@ -2463,7 +2463,6 @@ public final class TestXSSFBugs extends BaseTestBugzillaIssues {
      * .xlsx supports 64000 cell styles, the style indexes after
      * 32,767 must not be -32,768, then -32,767, -32,766
      */
-    @SuppressWarnings("resource")
     @Test
     public void bug57880() throws IOException {
         int numStyles = 33000;
@@ -2475,7 +2474,7 @@ public final class TestXSSFBugs extends BaseTestBugzillaIssues {
         }
         assertEquals(numStyles, wb.getNumCellStyles());
 
-        // avoid OOM in gump run
+        // avoid OOM in Gump run
         File file = XSSFTestDataSamples.writeOutAndClose(wb, "bug57880");
         //noinspection UnusedAssignment
         wb = null;
@@ -2513,7 +2512,7 @@ public final class TestXSSFBugs extends BaseTestBugzillaIssues {
         assertNotNull(sheet);
 
         Map<String, Object[]> data;
-        data = new TreeMap<String, Object[]>();
+        data = new TreeMap<>();
         data.put("1", new Object[]{"ID", "NAME", "LASTNAME"});
         data.put("2", new Object[]{2, "Amit", "Shukla"});
         data.put("3", new Object[]{1, "Lokesh", "Gupta"});
@@ -2773,7 +2772,7 @@ public final class TestXSSFBugs extends BaseTestBugzillaIssues {
     public void test51998() throws IOException {
         Workbook wb = XSSFTestDataSamples.openSampleWorkbook("51998.xlsx");
 
-        Set<String> sheetNames = new HashSet<String>();
+        Set<String> sheetNames = new HashSet<>();
 
         for (int sheetNum = 0; sheetNum < wb.getNumberOfSheets(); sheetNum++) {
             sheetNames.add(wb.getSheetName(sheetNum));
@@ -2983,7 +2982,7 @@ public final class TestXSSFBugs extends BaseTestBugzillaIssues {
 
         // Everything is fine at this point, cell is red
 
-        Map<String, Object> properties = new HashMap<String, Object>();
+        Map<String, Object> properties = new HashMap<>();
         properties.put(CellUtil.BORDER_BOTTOM, BorderStyle.THIN);
         CellUtil.setCellStyleProperties(cell, properties);
 
index 5afad20672ee5cf952dda87b61e22e694d80f5ed..e92143ca8b36e18efcd6def2499995a29508aa6d 100644 (file)
@@ -159,7 +159,7 @@ public final class TestXSSFFormulaEvaluation extends BaseTestFormulaEvaluator {
         }
         
         // Setup the environment
-        Map<String,FormulaEvaluator> evaluators = new HashMap<String, FormulaEvaluator>();
+        Map<String,FormulaEvaluator> evaluators = new HashMap<>();
         evaluators.put("ref2-56737.xlsx", evaluator);
         evaluators.put("56737.xlsx", 
                 _testDataProvider.openSampleWorkbook("56737.xlsx").getCreationHelper().createFormulaEvaluator());
index d1c975d63716b3b58d7bca2e8700480c857afd73..4eff222a24244dce459eb1fc3701dda8bb6239bb 100644 (file)
@@ -296,9 +296,9 @@ public final class TestXSSFSheet extends BaseTestXSheet {
         sheet.addMergedRegion(region_3);
         sheet.addMergedRegion(region_4);
         // test invalid indexes OOBE
-        Set<Integer> rmIdx = new HashSet<Integer>(Arrays.asList(5,6));
+        Set<Integer> rmIdx = new HashSet<>(Arrays.asList(5, 6));
         sheet.removeMergedRegions(rmIdx);
-        rmIdx = new HashSet<Integer>(Arrays.asList(1,3));
+        rmIdx = new HashSet<>(Arrays.asList(1, 3));
         sheet.removeMergedRegions(rmIdx);
         assertEquals("A1:B2", ctWorksheet.getMergeCells().getMergeCellArray(0).getRef());
         assertEquals("E5:F6", ctWorksheet.getMergeCells().getMergeCellArray(1).getRef());
index 06ef68a549c9110f8489aedaf0704734295c8e35..6ff8b8b007fd9093beec55837c18f62a1bf11e02 100644 (file)
@@ -50,7 +50,7 @@ public final class TestXSSFTable {
 
         // read the original sheet header order
         XSSFRow row = wb1.getSheetAt(0).getRow(0);
-        List<String> headers = new ArrayList<String>();
+        List<String> headers = new ArrayList<>();
         for (Cell cell : row) {
             headers.add(cell.getStringCellValue());
         }
index 812a92125e0ba2bc85f3855f19949ac1b4a146ed..f13337fa94a426ce867404d5b416e227f87addeb 100644 (file)
@@ -151,7 +151,7 @@ public class MemoryUsage extends TestCase {
      * @see #testXmlAttached()
      */
     public void testXmlDetached(){
-        List<CTRow> rows = new ArrayList<CTRow>();
+        List<CTRow> rows = new ArrayList<>();
         int i = 0;
         try {
             for(;;){
@@ -177,7 +177,7 @@ public class MemoryUsage extends TestCase {
      */
     public void testXmlAttached(){
         printMemoryUsage("before");
-        List<CTRow> rows = new ArrayList<CTRow>();
+        List<CTRow> rows = new ArrayList<>();
         int i = 0;
         //top-level element in sheet.xml
         CTWorksheet sh = CTWorksheet.Factory.newInstance();
index 2af6cbbc2d124620867a3dc5115ef89526fc4520..f1ecf560e1c90af743894d21b9260769c0b2949c 100644 (file)
@@ -121,7 +121,7 @@ public final class TestXWPFSDT {
     public void testNewLinesBetweenRuns() throws Exception {
         XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("Bug55142.docx");
         List<AbstractXWPFSDT> sdts = extractAllSDTs(doc);
-        List<String> targs = new ArrayList<String>();
+        List<String> targs = new ArrayList<>();
         //these test newlines and tabs in paragraphs/body elements
         targs.add("Rich-text1 abcdefghi");
         targs.add("Rich-text2 abcd\t\tefgh");
@@ -152,7 +152,7 @@ public final class TestXWPFSDT {
 
     private List<AbstractXWPFSDT> extractAllSDTs(XWPFDocument doc) {
 
-        List<AbstractXWPFSDT> sdts = new ArrayList<AbstractXWPFSDT>();
+        List<AbstractXWPFSDT> sdts = new ArrayList<>();
 
         List<XWPFHeader> headers = doc.getHeaderList();
         for (XWPFHeader header : headers) {
@@ -175,7 +175,7 @@ public final class TestXWPFSDT {
     }
 
     private List<AbstractXWPFSDT> extractSDTsFromBodyElements(List<IBodyElement> elements) {
-        List<AbstractXWPFSDT> sdts = new ArrayList<AbstractXWPFSDT>();
+        List<AbstractXWPFSDT> sdts = new ArrayList<>();
         for (IBodyElement e : elements) {
             if (e instanceof XWPFSDT) {
                 XWPFSDT sdt = (XWPFSDT) e;
@@ -199,7 +199,7 @@ public final class TestXWPFSDT {
 
     private List<AbstractXWPFSDT> extractSDTsFromTable(XWPFTable table) {
 
-        List<AbstractXWPFSDT> sdts = new ArrayList<AbstractXWPFSDT>();
+        List<AbstractXWPFSDT> sdts = new ArrayList<>();
         for (XWPFTableRow r : table.getRows()) {
             for (ICell c : r.getTableICells()) {
                 if (c instanceof XWPFSDTCell) {
index 6210d1178160804706cd5a44d9703bf8d83867dd..12dd5db2d42bdc8218e8e1c4b16a50cdea816863 100644 (file)
@@ -40,7 +40,7 @@ public final class TestXWPFStyles {
     @Test
     public void testGetUsedStyles() throws IOException {
         XWPFDocument sampleDoc = XWPFTestDataSamples.openSampleDocument("Styles.docx");
-        List<XWPFStyle> testUsedStyleList = new ArrayList<XWPFStyle>();
+        List<XWPFStyle> testUsedStyleList = new ArrayList<>();
         XWPFStyles styles = sampleDoc.getStyles();
         XWPFStyle style = styles.getStyle("berschrift1");
         testUsedStyleList.add(style);
index ce92ac8dc9c16b4446fbb77fceb8570c351aac54..bb3ef91b38413c0a9a049f42dcd53b2a77deffb7 100644 (file)
@@ -115,7 +115,7 @@ public final class Chunk {
 
                // Loop over the definitions, building the commands
                //  and getting their values
-               ArrayList<Command> commandList = new ArrayList<Command>();
+               ArrayList<Command> commandList = new ArrayList<>();
                for(CommandDefinition cdef : commandDefinitions) {
                        int type = cdef.getType();
                        int offset = cdef.getOffset();
index 642cdf488ebca357a7bd8ec938c916fcc060ec06..762c2a12a9ede2079da40306d852d98913608518 100644 (file)
@@ -43,8 +43,8 @@ public final class ChunkFactory {
        /**
         * Key is a Chunk's type, value is an array of its CommandDefinitions
         */
-       private final Map<Integer, CommandDefinition[]> chunkCommandDefinitions = 
-             new HashMap<Integer, CommandDefinition[]>();
+       private final Map<Integer, CommandDefinition[]> chunkCommandDefinitions =
+            new HashMap<>();
        /**
         * What the name is of the chunk table definitions file?
         * This file comes from the scratchpad resources directory.
@@ -87,7 +87,7 @@ public final class ChunkFactory {
                                throw new IllegalStateException("Expecting start xxx, found " + line);
                        }
                        int chunkType = Integer.parseInt(line.substring(6));
-                       ArrayList<CommandDefinition> defsL = new ArrayList<CommandDefinition>();
+                       ArrayList<CommandDefinition> defsL = new ArrayList<>();
     
                        // Data entries
                        while( (line = inp.readLine()) != null ) {
index fae6e3f5c2bed909317764a7833770041a5007b8..90dc298b452c1e3a1f80d86982168af3e5aac7aa 100644 (file)
@@ -65,7 +65,7 @@ public final class VisioTextExtractor extends POIOLE2TextExtractor {
         * @return An array of each Text item in the document
         */
        public String[] getAllText() {
-               ArrayList<String> text = new ArrayList<String>();
+               ArrayList<String> text = new ArrayList<>();
                for(Stream stream : hdgf.getTopLevelStreams()) {
                        findText(stream, text);
                }
index f58a4c85102cb3097dc9c343ba626b27a4b5870c..4c0c890f9340d9af60ce0bcdd1223425c3287424 100644 (file)
@@ -47,7 +47,7 @@ public final class ChunkStream extends Stream {
         * Process the contents of the stream out into chunks
         */
        public void findChunks() {
-               ArrayList<Chunk> chunksA = new ArrayList<Chunk>();
+               ArrayList<Chunk> chunksA = new ArrayList<>();
 
                if(getPointer().getOffset() == 0x64b3) {
                        int i = 0;
index 1129839649d5e4f205b383d53d9957d18375c915..873d42e1ee7e02c058cb8308af52cd142f655bdf 100644 (file)
@@ -53,7 +53,7 @@ public class HemfCommentEMFPlus extends AbstractHemfComment {
     private static class HemfPlusParser {
 
         public static List<HemfPlusRecord> parse(byte[] bytes) {
-            List<HemfPlusRecord> records = new ArrayList<HemfPlusRecord>();
+            List<HemfPlusRecord> records = new ArrayList<>();
             int offset = 0;
             while (offset < bytes.length) {
                 if (offset + 12 > bytes.length) {
index 76744438399abf7437016874e86b3f68e4b94a65..d527ed1c1b82f53cc9dac0714748e5ac8a8c9bd4 100644 (file)
@@ -77,12 +77,12 @@ public class HemfCommentPublic  {
             int currentOffset = 4 + 16;//4 public comment identifier, 16 for outputrect
             long countFormats = LittleEndian.getUInt(rawBytes, currentOffset);
             currentOffset += LittleEndianConsts.INT_SIZE;
-            List<EmrFormat> emrFormatList = new ArrayList<EmrFormat>();
+            List<EmrFormat> emrFormatList = new ArrayList<>();
             for (long i = 0; i < countFormats; i++) {
                 emrFormatList.add(new EmrFormat(rawBytes, currentOffset));
                 currentOffset += 4 * LittleEndianConsts.INT_SIZE;
             }
-            List<HemfMultiFormatsData> list = new ArrayList<HemfMultiFormatsData>();
+            List<HemfMultiFormatsData> list = new ArrayList<>();
             for (EmrFormat emrFormat : emrFormatList) {
                 byte[] data = IOUtils.safelyAllocate(emrFormat.size, MAX_RECORD_LENGTH);
                 System.arraycopy(rawBytes, emrFormat.offset-4, data, 0, emrFormat.size);
index 59c90a4dc0a5dc3cf3931b7f88cb11405106f874..1e164dbaaec6b518ea0b96ea48a0cb41d692f06a 100644 (file)
@@ -37,8 +37,8 @@ import org.apache.poi.hsmf.datatypes.MAPIProperty;
  *  and list methods to get all of them.
  */
 public final class Attachment {
-   private final List<TNEFAttribute> attributes = new ArrayList<TNEFAttribute>();
-   private final List<MAPIAttribute> mapiAttributes = new ArrayList<MAPIAttribute>();
+   private final List<TNEFAttribute> attributes = new ArrayList<>();
+   private final List<MAPIAttribute> mapiAttributes = new ArrayList<>();
    
    protected void addAttribute(TNEFAttribute attr) {
       attributes.add(attr);
index 5dd7a827f537d46f94989717b508014148fe2cc8..6997cbf87b76ac289332949cc992a77fde4edda8 100644 (file)
@@ -44,9 +44,9 @@ public final class HMEFMessage {
     
     @SuppressWarnings("unused")
     private int fileId;
-    private final List<TNEFAttribute> messageAttributes = new ArrayList<TNEFAttribute>();
-    private final List<MAPIAttribute> mapiAttributes = new ArrayList<MAPIAttribute>();
-    private final List<Attachment> attachments = new ArrayList<Attachment>();
+    private final List<TNEFAttribute> messageAttributes = new ArrayList<>();
+    private final List<MAPIAttribute> mapiAttributes = new ArrayList<>();
+    private final List<Attachment> attachments = new ArrayList<>();
     
     public HMEFMessage(InputStream inp) throws IOException {
         try {
index 90e4ffed5a95ed0102de31d4709fa247d01c0565..bb077b8f5bb52118f77580a14a288c86d781bcd4 100644 (file)
@@ -100,7 +100,7 @@ public class MAPIAttribute {
       
       // First up, get the number of attributes
       int count = LittleEndian.readInt(inp);
-      List<MAPIAttribute> attrs = new ArrayList<MAPIAttribute>();
+      List<MAPIAttribute> attrs = new ArrayList<>();
       
       // Now, read each one in in turn
       for(int i=0; i<count; i++) {
index de4d8a5fcb932a24033c13cf7cbafad6901dd0f8..9fafcf0dce23ce0f91e7a817b1cc39503a2bae63 100644 (file)
@@ -30,7 +30,7 @@ import java.util.Map;
  *  ones, so we can't just re-use the HSMF ones.
  */
 public final class TNEFProperty {
-   private static Map<Integer, List<TNEFProperty>> properties = new HashMap<Integer, List<TNEFProperty>>();
+   private static Map<Integer, List<TNEFProperty>> properties = new HashMap<>();
    
    // Types taken from http://msdn.microsoft.com/en-us/library/microsoft.exchange.data.contenttypes.tnef.tnefattributetype%28v=EXCHG.140%29.aspx
    public static final int TYPE_TRIPLES = 0x0000;
@@ -175,7 +175,7 @@ public final class TNEFProperty {
 
       // Store it for lookup
       if(! properties.containsKey(id)) {
-         properties.put(id, new ArrayList<TNEFProperty>());
+         properties.put(id, new ArrayList<>());
       }
       properties.get(id).add(this);
    }
index 47931b8a5b061f162cd18e721779a42e1a8906b7..94b7536d881e477f96654eed1486803c6c4ad6b6 100644 (file)
@@ -41,7 +41,7 @@ public abstract class EscherPart extends HPBFPart {
                DefaultEscherRecordFactory erf =
                        new DefaultEscherRecordFactory();
 
-               ArrayList<EscherRecord> ec = new ArrayList<EscherRecord>();
+               ArrayList<EscherRecord> ec = new ArrayList<>();
                byte data[] = getData();
                int left = data.length;
                while(left > 0) {
index 247cd8a8819df5bdea660a215abeb94aebaa9c28..cf5d74b1808273a03856848ae3aa9b5bdb74e50c 100644 (file)
@@ -195,7 +195,7 @@ public final class PowerPointExtractor extends POIOLE2TextExtractor {
        }
 
        public List<OLEShape> getOLEShapes() {
-               List<OLEShape> list = new ArrayList<OLEShape>();
+               List<OLEShape> list = new ArrayList<>();
 
                for (HSLFSlide slide : _slides) {
                        for (HSLFShape shape : slide.getShapes()) {
@@ -298,7 +298,7 @@ public final class PowerPointExtractor extends POIOLE2TextExtractor {
                        // Not currently using _notes, as that can have the notes of
                        // master sheets in. Grab Slide list, then work from there,
                        // but ensure no duplicates
-                       Set<Integer> seenNotes = new HashSet<Integer>();
+                       Set<Integer> seenNotes = new HashSet<>();
             String headerText = "";
             String footerText = "";
                        HeadersFooters hf = _show.getNotesHeadersFooters();
index eda364b66f693b900846fd7f20aa60f244712a91..5b3ca0ac12c57aca895c2bc9b66f4d7ba7143668 100644 (file)
@@ -137,7 +137,7 @@ public final class QuickButCruddyTextExtractor {
         *  strings, one per text record
         */
        public List<String> getTextAsVector() {
-           List<String> textV = new ArrayList<String>();
+           List<String> textV = new ArrayList<>();
 
                // Set to the start of the file
                int walkPos = 0;
index 55267eacf0a85e4cb802414bfa6aa5097bdbbb5f..1934cf8983b0a1e5da0792b5fba42acaffdb5a29 100644 (file)
@@ -79,7 +79,7 @@ public class TabStopPropCollection extends TextProp {
         }
     }
     
-    private List<TabStop> tabStops = new ArrayList<TabStop>();
+    private List<TabStop> tabStops = new ArrayList<>();
     
     public TabStopPropCollection() {
         super(0, 0x100000, "tabStops");
@@ -113,7 +113,7 @@ public class TabStopPropCollection extends TextProp {
     @Override
     public TabStopPropCollection clone() {
         TabStopPropCollection other = (TabStopPropCollection)super.clone();
-        other.tabStops = new ArrayList<TabStop>();
+        other.tabStops = new ArrayList<>();
         for (TabStop ts : tabStops) {
             TabStop tso = new TabStop(ts.getPosition(), ts.getType());
             other.tabStops.add(tso);
index 45ef1b7f902b4c13c0c79f43f97c08fca01f3772..93a036fd071cfe1f50092614cefa91365d5336c1 100644 (file)
@@ -94,7 +94,7 @@ public class TextPropCollection {
     // indentLevel is only valid for paragraph collection
     // if it's set to -1, it must be omitted - see 2.9.36 TextMasterStyleLevel
     private short indentLevel;
-       private final Map<String,TextProp> textProps = new HashMap<String,TextProp>();
+       private final Map<String,TextProp> textProps = new HashMap<>();
     private int maskSpecial;
     private final TextPropType textPropType;
     
@@ -119,7 +119,7 @@ public class TextPropCollection {
 
        /** Fetch the TextProps that define this styling in the record order */
        public List<TextProp> getTextPropList() {
-           List<TextProp> orderedList = new ArrayList<TextProp>();
+           List<TextProp> orderedList = new ArrayList<>();
         for (TextProp potProp : getPotentialProperties()) {
             TextProp textProp = textProps.get(potProp.getName());
             if (textProp != null) {
index 0c74ae2b40a0417832e955ba247ad1343365d48d..5e4019b0015e53be8ec322ff1bedb389e34a4e76 100644 (file)
@@ -206,7 +206,7 @@ public final class Document extends PositionDependentRecordContainer
        }
 
     public void removeSlideListWithText(SlideListWithText slwt) {
-        ArrayList<SlideListWithText> lst = new ArrayList<SlideListWithText>();
+        ArrayList<SlideListWithText> lst = new ArrayList<>();
         for(SlideListWithText s : slwts) {
             if(s != slwt) lst.add(s);
             else {
index 6c40ecf180cb8eace8d71b52bd3aef4349f989fb..11e48fa1f1d5902f99c097caf07c1deb07938cc4 100644 (file)
@@ -43,7 +43,7 @@ public class ExObjList extends RecordContainer {
         * Returns all the ExHyperlinks
         */
        public ExHyperlink[] getExHyperlinks() {
-               ArrayList<ExHyperlink> links = new ArrayList<ExHyperlink>();
+               ArrayList<ExHyperlink> links = new ArrayList<>();
                for(int i=0; i<_children.length; i++) {
                        if(_children[i] instanceof ExHyperlink) {
                                links.add( (ExHyperlink)_children[i] );
index 6f138fa0839ce49d4d8aaa28628153121e267cec..fef1e797d44a3d98c1cf8fa71c0f87638427d173 100644 (file)
@@ -33,7 +33,7 @@ import org.apache.poi.util.POILogger;
  */
 
 public final class FontCollection extends RecordContainer {
-    private final Map<String,HSLFFontInfo> fonts = new LinkedHashMap<String,HSLFFontInfo>();
+    private final Map<String,HSLFFontInfo> fonts = new LinkedHashMap<>();
     private byte[] _header;
 
        protected FontCollection(byte[] source, int start, int len) {
index e2975de7894fca1baafdd33f31aa98ac5c84be37..2f82245258a77e5ca69431f426f578256a328c79 100644 (file)
@@ -38,7 +38,7 @@ import org.apache.poi.util.LittleEndian;
  */
 public class HSLFEscherClientDataRecord extends EscherClientDataRecord {
 
-    private final List<Record> _childRecords = new ArrayList<Record>();
+    private final List<Record> _childRecords = new ArrayList<>();
     
     public List<? extends Record> getHSLFChildRecords() { 
         return _childRecords;
index eb1dade780bc9089dba9dfdeea2f47d615d48d95..4dd0f3f033f7d84a088f88a3d675a896e54a8064 100644 (file)
@@ -63,8 +63,8 @@ public final class MainMaster extends SheetContainer {
                // Find our children
                _children = Record.findChildRecords(source,start+8,len-8);
 
-               ArrayList<TxMasterStyleAtom> tx = new ArrayList<TxMasterStyleAtom>();
-               ArrayList<ColorSchemeAtom> clr = new ArrayList<ColorSchemeAtom>();
+               ArrayList<TxMasterStyleAtom> tx = new ArrayList<>();
+               ArrayList<ColorSchemeAtom> clr = new ArrayList<>();
                // Find the interesting ones in there
                for(int i=0; i<_children.length; i++) {
                        if(_children[i] instanceof SlideAtom) {
index d38b390af05b0e008f8e3ec8c2f928bbda93e361..7aef5fcdcc522ac05aa32576f37b972dc3395a17 100644 (file)
@@ -54,7 +54,7 @@ public final class MasterTextPropAtom extends RecordAtom {
         LittleEndian.putShort(_header, 2, (short)getRecordType());
         LittleEndian.putInt(_header, 4, _data.length);
         
-        indents = new ArrayList<IndentProp>();
+        indents = new ArrayList<>();
     }
 
     /**
@@ -121,7 +121,7 @@ public final class MasterTextPropAtom extends RecordAtom {
      */
     private void read() {
         int pos = 0;
-        indents = new ArrayList<IndentProp>(_data.length/6);
+        indents = new ArrayList<>(_data.length / 6);
         
         while (pos <= _data.length - 6) {
             int count = LittleEndian.getInt(_data, pos);
index aec1785c626eeeaa174e43b4aa5f50989151fdbd..6587a6e9d3cd03655c4f6f817a527fd7a9499843 100644 (file)
@@ -55,7 +55,7 @@ public final class PPDrawing extends RecordAtom {
        private byte[] _header;
        private long _type;
 
-       private final List<EscherRecord> childRecords = new ArrayList<EscherRecord>();
+       private final List<EscherRecord> childRecords = new ArrayList<>();
        private EscherTextboxWrapper[] textboxWrappers;
 
        //cached EscherDgRecord
@@ -112,13 +112,13 @@ public final class PPDrawing extends RecordAtom {
                        textboxWrappers = findInDgContainer(dgContainer);
                } else {
                        // Find and EscherTextboxRecord's, and wrap them up
-                       final List<EscherTextboxWrapper> textboxes = new ArrayList<EscherTextboxWrapper>();
+                       final List<EscherTextboxWrapper> textboxes = new ArrayList<>();
                        findEscherTextboxRecord(childRecords, textboxes);
                        this.textboxWrappers = textboxes.toArray(new EscherTextboxWrapper[textboxes.size()]);
                }
        }
        private EscherTextboxWrapper[] findInDgContainer(final EscherContainerRecord dgContainer) {
-               final List<EscherTextboxWrapper> found = new LinkedList<EscherTextboxWrapper>();
+               final List<EscherTextboxWrapper> found = new LinkedList<>();
                final EscherContainerRecord spgrContainer = findFirstEscherContainerRecordOfType(RecordTypes.EscherSpgrContainer, dgContainer);
                final EscherContainerRecord[] spContainers = findAllEscherContainerRecordOfType(RecordTypes.EscherSpContainer, spgrContainer);
                for (EscherContainerRecord spContainer : spContainers) {
@@ -397,7 +397,7 @@ public final class PPDrawing extends RecordAtom {
     protected EscherContainerRecord[] findAllEscherContainerRecordOfType(RecordTypes type, EscherContainerRecord parent) {
        if (null == parent) { return new EscherContainerRecord[0]; }
                final List<EscherContainerRecord> children = parent.getChildContainers();
-               final List<EscherContainerRecord> result = new LinkedList<EscherContainerRecord>();
+               final List<EscherContainerRecord> result = new LinkedList<>();
                for (EscherContainerRecord child : children) {
                        if (type.typeID == child.getRecordId()) {
                                result.add(child);
@@ -407,7 +407,7 @@ public final class PPDrawing extends RecordAtom {
     }
 
     public StyleTextProp9Atom[] getNumberedListInfo() {
-       final List<StyleTextProp9Atom> result = new LinkedList<StyleTextProp9Atom>();
+       final List<StyleTextProp9Atom> result = new LinkedList<>();
        EscherContainerRecord dgContainer = getDgContainer();
                final EscherContainerRecord spgrContainer = findFirstEscherContainerRecordOfType(RecordTypes.EscherSpgrContainer, dgContainer);
                final EscherContainerRecord[] spContainers = findAllEscherContainerRecordOfType(RecordTypes.EscherSpContainer, spgrContainer);
index 8a1c48269697d2655184c3ef442e4b9778f003a2..9f018d3c9004266590a3c93342b6ae7e10bc3cbc 100644 (file)
@@ -108,7 +108,7 @@ public final class PersistPtrHolder extends PositionDependentRecordAtom
                //      base number for these entries
                //   count * 32 bit offsets
                // Repeat as many times as you have data
-               _slideLocations = new HashMap<Integer,Integer>();
+               _slideLocations = new HashMap<>();
                _ptrData = new byte[len-8];
                System.arraycopy(source,start+8,_ptrData,0,_ptrData.length);
 
@@ -180,7 +180,7 @@ public final class PersistPtrHolder extends PositionDependentRecordAtom
        }
 
        private void normalizePersistDirectory() {
-        TreeMap<Integer,Integer> orderedSlideLocations = new TreeMap<Integer,Integer>(_slideLocations);
+        TreeMap<Integer,Integer> orderedSlideLocations = new TreeMap<>(_slideLocations);
         
         @SuppressWarnings("resource")
         BufAccessBAOS bos = new BufAccessBAOS(); // NOSONAR
index 73017b798d6f5df80ce00b800a00cc2bd195a4f5..038ec27f05373910f84b42eac23439023dc821f4 100644 (file)
@@ -108,7 +108,7 @@ public abstract class Record
         * Default method for finding child records of a container record
         */
        public static Record[] findChildRecords(byte[] b, int start, int len) {
-               List<Record> children = new ArrayList<Record>(5);
+               List<Record> children = new ArrayList<>(5);
 
                // Jump our little way along, creating records as we go
                int pos = start;
index c3fc1f1d2705439eec8bcdda261747517b2781b5..d4bf8ab3378cb5b564270d14769c659ba05c8507 100644 (file)
@@ -139,7 +139,7 @@ public abstract class RecordContainer extends Record
      */
     public Record removeChild(Record ch) {
         Record rm = null;
-        ArrayList<Record> lst = new ArrayList<Record>();
+        ArrayList<Record> lst = new ArrayList<>();
         for(Record r : _children) {
             if(r != ch) {
                 lst.add(r);
index 44595b74736fb4bd699816a0d49941a70534ae42..3fec22b1a0ad3d8eb5117ef6eb4f76637ad24181 100644 (file)
@@ -210,7 +210,7 @@ public enum RecordTypes {
     private static final Map<Short,RecordTypes> LOOKUP;
 
     static {
-        LOOKUP = new HashMap<Short,RecordTypes>();
+        LOOKUP = new HashMap<>();
         for(RecordTypes s : values()) {
             LOOKUP.put(s.typeID, s);
         }
index deeee6fe6b38d5f967f51f69c262d8c56192928d..08ed2e846875e1505f72c2a82d287fe295ac37a7 100644 (file)
@@ -83,7 +83,7 @@ public final class SlideListWithText extends RecordContainer {
                // Group our children together into SlideAtomsSets
                // That way, model layer code can just grab the sets to use,
                //  without having to try to match the children together
-               List<SlideAtomsSet> sets = new ArrayList<SlideAtomsSet>();
+               List<SlideAtomsSet> sets = new ArrayList<>();
                for(int i=0; i<_children.length; i++) {
                        if(_children[i] instanceof SlidePersistAtom) {
                                // Find where the next SlidePersistAtom is
index 9a5cc7b4873f5d299b4872154db0711cd0d7babf..ea60240518e33853b039a93f5619dda5764fec34 100644 (file)
@@ -48,7 +48,7 @@ public final class StyleTextProp9Atom extends RecordAtom {
      */
     protected StyleTextProp9Atom(byte[] source, int start, int len) {
         // Get the header.
-        final List<TextPFException9> schemes = new LinkedList<TextPFException9>();
+        final List<TextPFException9> schemes = new LinkedList<>();
         header = new byte[8];
         System.arraycopy(source,start, header,0,8);
         this.version  = LittleEndian.getShort(header, 0);
index 3940e922291b4817f3b8104900328dfef446d00a..d81b7beca1c5cb0887bbb179155b935bea33b5c0 100644 (file)
@@ -137,8 +137,8 @@ public final class StyleTextPropAtom extends RecordAtom {
         reserved = new byte[0];
 
         // Set empty lists, ready for when they call setParentTextSize
-        paragraphStyles = new ArrayList<TextPropCollection>();
-        charStyles = new ArrayList<TextPropCollection>();
+        paragraphStyles = new ArrayList<>();
+        charStyles = new ArrayList<>();
     }
 
 
@@ -156,8 +156,8 @@ public final class StyleTextPropAtom extends RecordAtom {
         LittleEndian.putInt(_header,4,10);
 
         // Set empty paragraph and character styles
-        paragraphStyles = new ArrayList<TextPropCollection>();
-        charStyles = new ArrayList<TextPropCollection>();
+        paragraphStyles = new ArrayList<>();
+        charStyles = new ArrayList<>();
 
         addParagraphTextPropCollection(parentTextSize);
         addCharacterTextPropCollection(parentTextSize);
index 7f87086bfa2038d20c2e2584842d8f7e2bbabfbf..dd7076605ec2d8134635113ae3cd08c26b46c9f5 100644 (file)
@@ -165,7 +165,7 @@ public final class TextSpecInfoAtom extends RecordAtom {
 
     public TextSpecInfoRun[] getTextSpecInfoRuns(){
         LittleEndianByteArrayInputStream bis = new LittleEndianByteArrayInputStream(_data); // NOSONAR
-        List<TextSpecInfoRun> lst = new ArrayList<TextSpecInfoRun>();
+        List<TextSpecInfoRun> lst = new ArrayList<>();
         while (bis.available() > 0) {
             lst.add(new TextSpecInfoRun(bis));
         }
index b4b8e80046cc2eee9c1634b19dd4c079c90186f2..5c9785f21ceb3b567935b7b647550f7e1715ec50 100644 (file)
@@ -144,8 +144,8 @@ public final class TxMasterStyleAtom extends RecordAtom {
         short levels = LittleEndian.getShort(_data, 0);
         pos += LittleEndian.SHORT_SIZE;
 
-        paragraphStyles = new ArrayList<TextPropCollection>(levels);
-        charStyles = new ArrayList<TextPropCollection>(levels);
+        paragraphStyles = new ArrayList<>(levels);
+        charStyles = new ArrayList<>(levels);
 
         for(short i = 0; i < levels; i++) {
             TextPropCollection prprops = new TextPropCollection(0, TextPropType.paragraph);
index b7919160f6ad2a5fa0ff773817687ba605e36a16..63f30bd45b9fa3188202ba9783e0676c7ccaa1e3 100644 (file)
@@ -186,8 +186,8 @@ public final class HSLFFreeformShape extends HSLFAutoShape implements FreeformSh
         Rectangle2D bounds = path.getBounds2D();
         PathIterator it = path.getPathIterator(new AffineTransform());
 
-        List<byte[]> segInfo = new ArrayList<byte[]>();
-        List<Point2D.Double> pntInfo = new ArrayList<Point2D.Double>();
+        List<byte[]> segInfo = new ArrayList<>();
+        List<Point2D.Double> pntInfo = new ArrayList<>();
         boolean isClosed = false;
         int numPoints = 0;
         while (!it.isDone()) {
index 3d4d57fbdb45492fcb9668808812ffd157657096..7efe2539dae2c17e35754f6e3df461cd3c56bc0d 100644 (file)
@@ -274,7 +274,7 @@ implements HSLFShapeContainer, GroupShape<HSLFShape,HSLFTextParagraph> {
     public List<HSLFShape> getShapes() {
         // Our escher container record should contain several
         // SpContainers, the first of which is the group shape itself
-        List<HSLFShape> shapeList = new ArrayList<HSLFShape>();
+        List<HSLFShape> shapeList = new ArrayList<>();
         boolean isFirst = true;
         for (EscherRecord r : getSpContainer()) {
             if (isFirst) {
index c7750d608484d2b3879714fd6d1d7c1b2b0d893f..73d11905fd0b82bcc1f78484f5607ae4e18e5780 100644 (file)
@@ -328,7 +328,7 @@ public final class HSLFHyperlink implements Hyperlink<HSLFShape,HSLFTextParagrap
      */
     @SuppressWarnings("resource")
     protected static List<HSLFHyperlink> find(List<HSLFTextParagraph> paragraphs){
-        List<HSLFHyperlink> lst = new ArrayList<HSLFHyperlink>();
+        List<HSLFHyperlink> lst = new ArrayList<>();
         if (paragraphs == null || paragraphs.isEmpty()) return lst;
 
         HSLFTextParagraph firstPara = paragraphs.get(0);
@@ -358,7 +358,7 @@ public final class HSLFHyperlink implements Hyperlink<HSLFShape,HSLFTextParagrap
         HSLFEscherClientDataRecord cldata = shape.getClientData(false);
 
         if (exobj != null && cldata != null) {
-            List<HSLFHyperlink> lst = new ArrayList<HSLFHyperlink>();
+            List<HSLFHyperlink> lst = new ArrayList<>();
             find(cldata.getHSLFChildRecords(), exobj, lst);
             return lst.isEmpty() ? null : lst.get(0);
         }
index d64775e117189e892c11bf7fdd541f0bea7fec0d..d922d7a895ab64f3cf844423bbcb04cfee15daa3 100644 (file)
@@ -35,7 +35,7 @@ import org.apache.poi.util.POILogger;
 public final class HSLFNotes extends HSLFSheet implements Notes<HSLFShape,HSLFTextParagraph> {
     protected static final POILogger logger = POILogFactory.getLogger(HSLFNotes.class);
     
-    private List<List<HSLFTextParagraph>> _paragraphs = new ArrayList<List<HSLFTextParagraph>>();
+    private List<List<HSLFTextParagraph>> _paragraphs = new ArrayList<>();
 
     /**
      * Constructs a Notes Sheet from the given Notes record.
index ce809b5518445965fccfa373b6caaa69fd6ecd57..c37d47713fc72f5e3aa648c0456b60a55397f824 100644 (file)
@@ -163,7 +163,7 @@ public abstract class HSLFSheet implements HSLFShapeContainer, Sheet<HSLFShape,H
             throw new IllegalStateException("spgr not found");
         }
 
-        List<HSLFShape> shapeList = new ArrayList<HSLFShape>();
+        List<HSLFShape> shapeList = new ArrayList<>();
         boolean isFirst = true;
         for (EscherRecord r : spgr) {
             if (isFirst) {
index 4d631157203a33e5840c58ca90c7bb8ad24f55ed..14867a5a4605ee29183d33a8735d07f99fba1987 100644 (file)
@@ -59,7 +59,7 @@ import org.apache.poi.sl.usermodel.Slide;
 public final class HSLFSlide extends HSLFSheet implements Slide<HSLFShape,HSLFTextParagraph> {
        private int _slideNo;
        private SlideAtomsSet _atomSet;
-       private final List<List<HSLFTextParagraph>> _paragraphs = new ArrayList<List<HSLFTextParagraph>>();
+       private final List<List<HSLFTextParagraph>> _paragraphs = new ArrayList<>();
        private HSLFNotes _notes; // usermodel needs to set this
 
        /**
index 7919dc2c06b2071b8059dc9b7484ad96374e543d..f6cd41f41d2342f8f19afcd2365053344731b96e 100644 (file)
@@ -36,7 +36,7 @@ import org.apache.poi.util.Internal;
  * @author Yegor Kozlov
  */
 public final class HSLFSlideMaster extends HSLFMasterSheet {
-    private final List<List<HSLFTextParagraph>> _paragraphs = new ArrayList<List<HSLFTextParagraph>>();
+    private final List<List<HSLFTextParagraph>> _paragraphs = new ArrayList<>();
 
     /**
      * all TxMasterStyleAtoms available in this master
index 738b6422ecf956de40b596876ebd47e363bda5d4..a71ebf1249b2058a7ec8b643ae412dacf28296ea 100644 (file)
@@ -96,7 +96,7 @@ public final class HSLFSlideShow implements SlideShow<HSLFShape,HSLFTextParagrap
     enum LoadSavePhase {
         INIT, LOADED
        }
-    private static final ThreadLocal<LoadSavePhase> loadSavePhase = new ThreadLocal<LoadSavePhase>();
+    private static final ThreadLocal<LoadSavePhase> loadSavePhase = new ThreadLocal<>();
     
     // What we're based on
        private final HSLFSlideShowImpl _hslfSlideShow;
@@ -112,10 +112,10 @@ public final class HSLFSlideShow implements SlideShow<HSLFShape,HSLFTextParagrap
        private Document _documentRecord;
 
        // Friendly objects for people to deal with
-       private final List<HSLFSlideMaster> _masters = new ArrayList<HSLFSlideMaster>();
-       private final List<HSLFTitleMaster> _titleMasters = new ArrayList<HSLFTitleMaster>();
-       private final List<HSLFSlide> _slides = new ArrayList<HSLFSlide>();
-       private final List<HSLFNotes> _notes = new ArrayList<HSLFNotes>();
+       private final List<HSLFSlideMaster> _masters = new ArrayList<>();
+       private final List<HSLFTitleMaster> _titleMasters = new ArrayList<>();
+       private final List<HSLFSlide> _slides = new ArrayList<>();
+       private final List<HSLFNotes> _notes = new ArrayList<>();
        private FontCollection _fonts;
 
        // For logging
@@ -196,7 +196,7 @@ public final class HSLFSlideShow implements SlideShow<HSLFShape,HSLFTextParagrap
         */
        private void findMostRecentCoreRecords() {
                // To start with, find the most recent in the byte offset domain
-               Map<Integer,Integer> mostRecentByBytes = new HashMap<Integer,Integer>();
+               Map<Integer,Integer> mostRecentByBytes = new HashMap<>();
                for (Record record : _hslfSlideShow.getRecords()) {
                        if (record instanceof PersistPtrHolder) {
                                PersistPtrHolder pph = (PersistPtrHolder) record;
@@ -224,14 +224,14 @@ public final class HSLFSlideShow implements SlideShow<HSLFShape,HSLFTextParagrap
 
                // We'll also want to be able to turn the slide IDs into a position
                // in this array
-               _sheetIdToCoreRecordsLookup = new HashMap<Integer,Integer>();
+               _sheetIdToCoreRecordsLookup = new HashMap<>();
                Integer[] allIDs = mostRecentByBytes.keySet().toArray(new Integer[mostRecentByBytes.size()]); 
                Arrays.sort(allIDs);
                for (int i = 0; i < allIDs.length; i++) {
                        _sheetIdToCoreRecordsLookup.put(allIDs[i], i);
                }
 
-               Map<Integer,Integer> mostRecentByBytesRev = new HashMap<Integer,Integer>(mostRecentByBytes.size());
+               Map<Integer,Integer> mostRecentByBytesRev = new HashMap<>(mostRecentByBytes.size());
                for (Map.Entry<Integer,Integer> me : mostRecentByBytes.entrySet()) {
                    mostRecentByBytesRev.put(me.getValue(), me.getKey());
                }
@@ -340,7 +340,7 @@ public final class HSLFSlideShow implements SlideShow<HSLFShape,HSLFTextParagrap
                findMasterSlides();
                
                // Having sorted out the masters, that leaves the notes and slides
-        Map<Integer,Integer> slideIdToNotes = new HashMap<Integer,Integer>();
+        Map<Integer,Integer> slideIdToNotes = new HashMap<>();
 
         // Start by finding the notes records
         findNotesSlides(slideIdToNotes);
@@ -626,7 +626,7 @@ public final class HSLFSlideShow implements SlideShow<HSLFShape,HSLFTextParagrap
                _slides.get(newSlideNumber - 1).setSlideNumber(newSlideNumber);
                _slides.get(oldSlideNumber - 1).setSlideNumber(oldSlideNumber);
                
-               ArrayList<Record> lst = new ArrayList<Record>();
+               ArrayList<Record> lst = new ArrayList<>();
                for (SlideAtomsSet s : sas) {
                        lst.add(s.getSlidePersistAtom());
                        lst.addAll(Arrays.asList(s.getSlideRecords()));
@@ -657,8 +657,8 @@ public final class HSLFSlideShow implements SlideShow<HSLFShape,HSLFTextParagrap
                SlideListWithText slwt = _documentRecord.getSlideSlideListWithText();
                SlideAtomsSet[] sas = slwt.getSlideAtomsSets();
 
-               List<Record> records = new ArrayList<Record>();
-               List<SlideAtomsSet> sa = new ArrayList<SlideAtomsSet>(Arrays.asList(sas));
+               List<Record> records = new ArrayList<>();
+               List<SlideAtomsSet> sa = new ArrayList<>(Arrays.asList(sas));
 
                HSLFSlide removedSlide = _slides.remove(index);
                _notes.remove(removedSlide.getNotes());
@@ -685,8 +685,8 @@ public final class HSLFSlideShow implements SlideShow<HSLFShape,HSLFTextParagrap
         int notesId = removedSlide.getSlideRecord().getSlideAtom().getNotesID();
                if (notesId != 0) {
                        SlideListWithText nslwt = _documentRecord.getNotesSlideListWithText();
-                       records = new ArrayList<Record>();
-                       ArrayList<SlideAtomsSet> na = new ArrayList<SlideAtomsSet>();
+                       records = new ArrayList<>();
+                       ArrayList<SlideAtomsSet> na = new ArrayList<>();
                        for (SlideAtomsSet ns : nslwt.getSlideAtomsSets()) {
                                if (ns.getSlidePersistAtom().getSlideIdentifier() == notesId) {
                     continue;
@@ -1090,7 +1090,7 @@ public final class HSLFSlideShow implements SlideShow<HSLFShape,HSLFTextParagrap
        }
 
     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);
        olemap.put("Workbook", ClassID.EXCEL97); // as per BIFF8 spec
        olemap.put("WORKBOOK", ClassID.EXCEL97); // Typically from third party programs
@@ -1107,7 +1107,7 @@ public final class HSLFSlideShow implements SlideShow<HSLFShape,HSLFTextParagrap
         // As we go along, update, and hand over, to any Position Dependent
         // records we happen across
                Map<RecordTypes,PositionDependentRecord> interestingRecords =
-                new HashMap<RecordTypes,PositionDependentRecord>();
+                new HashMap<>();
 
                try {
             _hslfSlideShow.updateAndWriteDependantRecords(null,interestingRecords);
index a2b6c3cdb818a80e1d4e43b4f351db2c8f087ecc..f3495407b3b2d4e1cd6ff32ddc366980b94c2abf 100644 (file)
@@ -409,9 +409,9 @@ public class HSLFSlideShowEncrypted implements Closeable {
 
         UserEditAtom uea = null;
         PersistPtrHolder pph = null;
-        TreeMap<Integer,Integer> slideLocations = new TreeMap<Integer,Integer>();
-        TreeMap<Integer,Record> recordMap = new TreeMap<Integer,Record>();
-        List<Integer> obsoleteOffsets = new ArrayList<Integer>();
+        TreeMap<Integer,Integer> slideLocations = new TreeMap<>();
+        TreeMap<Integer,Record> recordMap = new TreeMap<>();
+        List<Integer> obsoleteOffsets = new ArrayList<>();
         int duplicatedCount = 0;
         for (Record r : records) {
             assert(r instanceof PositionDependentRecord);
@@ -468,7 +468,7 @@ public class HSLFSlideShowEncrypted implements Closeable {
         int deaOffset = -1;
         PersistPtrHolder ptr = null;
         UserEditAtom uea = null;
-        List<Record> recordList = new ArrayList<Record>();
+        List<Record> recordList = new ArrayList<>();
         for (Record r : records) {
             if (r instanceof DocumentEncryptionAtom) {
                 deaOffset = ((DocumentEncryptionAtom)r).getLastOnDiskOffset();
@@ -490,7 +490,7 @@ public class HSLFSlideShowEncrypted implements Closeable {
             return records;
         }
 
-        TreeMap<Integer,Integer> tm = new TreeMap<Integer,Integer>(ptr.getSlideLocationsLookup());
+        TreeMap<Integer,Integer> tm = new TreeMap<>(ptr.getSlideLocationsLookup());
         ptr.clear();
         int maxSlideId = -1;
         for (Map.Entry<Integer,Integer> me : tm.entrySet()) {
index 5220a3fd7679a64971865165823cb8817c1e89ae..1dde0d03d490874d0a6be053a6d01746e6eb24f4 100644 (file)
@@ -250,8 +250,8 @@ public final class HSLFSlideShowImpl extends POIDocument implements Closeable {
     private Record[] read(byte[] docstream, int usrOffset) throws IOException {
         //sort found records by offset.
         //(it is not necessary but SlideShow.findMostRecentCoreRecords() expects them sorted)
-        NavigableMap<Integer, Record> records = new TreeMap<Integer, Record>(); // offset -> record
-        Map<Integer, Integer> persistIds = new HashMap<Integer, Integer>(); // offset -> persistId
+        NavigableMap<Integer, Record> records = new TreeMap<>(); // offset -> record
+        Map<Integer, Integer> persistIds = new HashMap<>(); // offset -> persistId
         initRecordOffsets(docstream, usrOffset, records, persistIds);
         HSLFSlideShowEncrypted decryptData = new HSLFSlideShowEncrypted(docstream, records);
 
@@ -347,7 +347,7 @@ public final class HSLFSlideShowImpl extends POIDocument implements Closeable {
      * This is lazily called as and when we want to touch pictures.
      */
     private void readPictures() throws IOException {
-        _pictures = new ArrayList<HSLFPictureData>();
+        _pictures = new ArrayList<>();
 
         // if the presentation doesn't contain pictures - will use a null set instead
         if (!getDirectory().hasEntry("Pictures")) {
@@ -460,7 +460,7 @@ public final class HSLFSlideShowImpl extends POIDocument implements Closeable {
         // For position dependent records, hold where they were and now are
         // As we go along, update, and hand over, to any Position Dependent
         //  records we happen across
-        Map<Integer, Integer> oldToNewPositions = new HashMap<Integer, Integer>();
+        Map<Integer, Integer> oldToNewPositions = new HashMap<>();
 
         // First pass - figure out where all the position dependent
         //   records are going to end up, in the new scheme
@@ -505,7 +505,7 @@ public final class HSLFSlideShowImpl extends POIDocument implements Closeable {
             throw new HSLFException("UserEditAtom or PersistPtr can't be determined.");
         }
 
-        Map<Integer, Integer> persistIds = new HashMap<Integer, Integer>();
+        Map<Integer, Integer> persistIds = new HashMap<>();
         for (Map.Entry<Integer, Integer> entry : ptr.getSlideLocationsLookup().entrySet()) {
             persistIds.put(oldToNewPositions.get(entry.getValue()), entry.getKey());
         }
@@ -667,7 +667,7 @@ public final class HSLFSlideShowImpl extends POIDocument implements Closeable {
         _records = encryptedSS.updateEncryptionRecord(_records);
 
         // The list of entries we've written out
-        List<String> writtenEntries = new ArrayList<String>(1);
+        List<String> writtenEntries = new ArrayList<>(1);
 
         // Write out the Property Streams
         writeProperties(outFS, writtenEntries);
@@ -830,7 +830,7 @@ public final class HSLFSlideShowImpl extends POIDocument implements Closeable {
      */
     public HSLFObjectData[] getEmbeddedObjects() {
         if (_objects == null) {
-            List<HSLFObjectData> objects = new ArrayList<HSLFObjectData>();
+            List<HSLFObjectData> objects = new ArrayList<>();
             for (Record r : _records) {
                 if (r instanceof ExOleObjStg) {
                     objects.add(new HSLFObjectData((ExOleObjStg) r));
index 7750b25f1552709539c5d4474dd19d7b4b29cf1d..51272e917f31d4485edd82731e4e8a07b580a88c 100644 (file)
@@ -75,7 +75,7 @@ public final class HSLFSoundData {
      * @return the array with the sound data
      */
     public static HSLFSoundData[] find(Document document){
-        ArrayList<HSLFSoundData> lst = new ArrayList<HSLFSoundData>();
+        ArrayList<HSLFSoundData> lst = new ArrayList<>();
         Record[] ch = document.getChildRecords();
         for (int i = 0; i < ch.length; i++) {
             if(ch[i].getRecordType() == RecordTypes.SoundCollection.typeID){
index 586005b570dbee28a73f9ce9e7da7123a072d43e..884902655c7a3811776d9e809662446ae6a80fb9 100644 (file)
@@ -156,7 +156,7 @@ implements HSLFShapeContainer, TableShape<HSLFShape,HSLFTextParagraph> {
     protected void afterInsert(HSLFSheet sh){
         super.afterInsert(sh);
 
-        Set<HSLFLine> lineSet = new HashSet<HSLFLine>();
+        Set<HSLFLine> lineSet = new HashSet<>();
         for (HSLFTableCell row[] : cells) {
             for (HSLFTableCell c : row) {
                 addShape(c);
@@ -176,7 +176,7 @@ implements HSLFShapeContainer, TableShape<HSLFShape,HSLFTextParagraph> {
     }
 
     private void cellListToArray() {
-        List<HSLFTableCell> htc = new ArrayList<HSLFTableCell>();
+        List<HSLFTableCell> htc = new ArrayList<>();
         for (HSLFShape h : getShapes()) {
             if (h instanceof HSLFTableCell) {
                 htc.add((HSLFTableCell)h);
@@ -187,8 +187,8 @@ implements HSLFShapeContainer, TableShape<HSLFShape,HSLFTextParagraph> {
             throw new IllegalStateException("HSLFTable without HSLFTableCells");
         }
         
-        SortedSet<Double> colSet = new TreeSet<Double>();
-        SortedSet<Double> rowSet = new TreeSet<Double>();
+        SortedSet<Double> colSet = new TreeSet<>();
+        SortedSet<Double> rowSet = new TreeSet<>();
         
         // #1 pass - determine cols and rows
         for (HSLFTableCell sh : htc) {
@@ -198,8 +198,8 @@ implements HSLFShapeContainer, TableShape<HSLFShape,HSLFTextParagraph> {
         }
         cells = new HSLFTableCell[rowSet.size()][colSet.size()];
         
-        List<Double> colLst = new ArrayList<Double>(colSet);
-        List<Double> rowLst = new ArrayList<Double>(rowSet);
+        List<Double> colLst = new ArrayList<>(colSet);
+        List<Double> rowLst = new ArrayList<>(rowSet);
         
         // #2 pass - assign shape to table cells
         for (HSLFTableCell sh : htc) {
@@ -254,7 +254,7 @@ implements HSLFShapeContainer, TableShape<HSLFShape,HSLFTextParagraph> {
     }
 
     private void fitLinesToCells() {
-        List<LineRect> lines = new ArrayList<LineRect>();
+        List<LineRect> lines = new ArrayList<>();
         for (HSLFShape h : getShapes()) {
             if (h instanceof HSLFLine) {
                 lines.add(new LineRect((HSLFLine)h));
index 263d45844d82eb0ca1819395eb84b21aa377ff5c..60c1707ecf91e256e25b9ea0209ab86bcd74e2b5 100644 (file)
@@ -96,7 +96,7 @@ public final class HSLFTextParagraph implements TextParagraph<HSLFShape,HSLFText
     private TextPropCollection _masterStyle;
 
     protected TextRulerAtom _ruler;
-    protected final List<HSLFTextRun> _runs = new ArrayList<HSLFTextRun>();
+    protected final List<HSLFTextRun> _runs = new ArrayList<>();
     protected HSLFTextShape _parentShape;
     private HSLFSheet _sheet;
     private int shapeId;
@@ -1251,7 +1251,7 @@ public final class HSLFTextParagraph implements TextParagraph<HSLFShape,HSLFText
      * For a given PPDrawing, grab all the TextRuns
      */
    public static List<List<HSLFTextParagraph>> findTextParagraphs(PPDrawing ppdrawing, HSLFSheet sheet) {
-        List<List<HSLFTextParagraph>> runsV = new ArrayList<List<HSLFTextParagraph>>();
+        List<List<HSLFTextParagraph>> runsV = new ArrayList<>();
         for (EscherTextboxWrapper wrapper : ppdrawing.getTextboxWrappers()) {
             List<HSLFTextParagraph> p = findTextParagraphs(wrapper, sheet);
             if (p != null) {
@@ -1299,7 +1299,7 @@ public final class HSLFTextParagraph implements TextParagraph<HSLFShape,HSLFText
                     } else {
                         // create a new container
                         // TODO: ... is this case really happening?
-                        rv = new ArrayList<HSLFTextParagraph>(rv);
+                        rv = new ArrayList<>(rv);
                         rv.addAll(r);
                     }
                 }
@@ -1352,7 +1352,7 @@ public final class HSLFTextParagraph implements TextParagraph<HSLFShape,HSLFText
      * @param records the records to build from
      */
     protected static List<List<HSLFTextParagraph>> findTextParagraphs(Record[] records) {
-        List<List<HSLFTextParagraph>> paragraphCollection = new ArrayList<List<HSLFTextParagraph>>();
+        List<List<HSLFTextParagraph>> paragraphCollection = new ArrayList<>();
 
         int[] recordIdx = { 0 };
 
@@ -1397,7 +1397,7 @@ public final class HSLFTextParagraph implements TextParagraph<HSLFShape,HSLFText
             String rawText = (tchars != null) ? tchars.getText() : tbytes.getText();
             StyleTextPropAtom styles = findStyleAtomPresent(header, rawText.length());
 
-            List<HSLFTextParagraph> paragraphs = new ArrayList<HSLFTextParagraph>();
+            List<HSLFTextParagraph> paragraphs = new ArrayList<>();
             paragraphCollection.add(paragraphs);
 
             // split, but keep delimiter
index 9db4afbd900b45abc96ae75a1bfd1a75383da7ce..6dc8c3b5572cfe5c9d43f29b07ea48262fb08a31 100644 (file)
@@ -133,7 +133,7 @@ implements TextShape<HSLFShape,HSLFTextParagraph> {
     /**
      * TextRun object which holds actual text and format data
      */
-    private List<HSLFTextParagraph> _paragraphs = new ArrayList<HSLFTextParagraph>();
+    private List<HSLFTextParagraph> _paragraphs = new ArrayList<>();
 
     /**
      * Escher container which holds text attributes such as
@@ -934,7 +934,7 @@ implements TextShape<HSLFShape,HSLFTextParagraph> {
      * @return null, if there's no alternative representation, otherwise the text shape
      */
     public TextShape<?,? extends TextParagraph<?,?,? extends TextRun>> getMetroShape() {
-        HSLFMetroShape<TextShape<?,? extends TextParagraph<?,?,? extends TextRun>>> mbs = new HSLFMetroShape<TextShape<?,? extends TextParagraph<?,?,? extends TextRun>>>(this);
+        HSLFMetroShape<TextShape<?,? extends TextParagraph<?,?,? extends TextRun>>> mbs = new HSLFMetroShape<>(this);
         return mbs.getShape();
     }
 }
\ No newline at end of file
index 2dfd3b05b66e822fb6c0c1af13c19b74c4420ebb..b8e3948cccc72e94f4baaa43ac3c1a2916a9f932 100644 (file)
@@ -27,7 +27,7 @@ import org.apache.poi.hslf.record.SlideAtom;
  * Title masters define the design template for slides with a Title Slide layout.
  */
 public final class HSLFTitleMaster extends HSLFMasterSheet {
-    private final List<List<HSLFTextParagraph>> _paragraphs = new ArrayList<List<HSLFTextParagraph>>();
+    private final List<List<HSLFTextParagraph>> _paragraphs = new ArrayList<>();
 
     /**
      * Constructs a TitleMaster
index 5a5d5dc94231b8a5d82079fd3a3c49afcc2af997..1f4505613d7540a162ad2f7a5a5b4eb0bc1df52a 100644 (file)
@@ -149,8 +149,8 @@ public class MAPIMessage extends POIReadOnlyDocument {
       ChunkGroup[] chunkGroups = POIFSChunkParser.parse(poifsDir);
 
       // Grab interesting bits
-      ArrayList<AttachmentChunks> attachments = new ArrayList<AttachmentChunks>();
-      ArrayList<RecipientChunks>  recipients  = new ArrayList<RecipientChunks>();
+      ArrayList<AttachmentChunks> attachments = new ArrayList<>();
+      ArrayList<RecipientChunks>  recipients  = new ArrayList<>();
       for(ChunkGroup group : chunkGroups) {
          // Should only ever be one of each of these
          if(group instanceof Chunks) {
index 043ef88c28e2b093c1f1eb0ba7295bd7c0d8bb1c..3989af28f0caa1419e1dbd2fa41ed34c83cb41d8 100644 (file)
@@ -62,7 +62,7 @@ public class AttachmentChunks implements ChunkGroup {
     private String poifsName;
 
     /** Holds all the chunks that were found. */
-    private List<Chunk> allChunks = new ArrayList<Chunk>();
+    private List<Chunk> allChunks = new ArrayList<>();
 
     public AttachmentChunks(String poifsName) {
         this.poifsName = poifsName;
index aee1e88c8f6456166eb8abde1f34f754503ccdec..b3f3cf5c5cc9050b3f4c3af1a3d4920e52a3428d 100644 (file)
@@ -44,7 +44,7 @@ public final class Chunks implements ChunkGroupWithProperties {
      * Normally a property will have zero chunks (fixed sized) or one chunk
      * (variable size), but in some cases (eg Unknown) you may get more.
      */
-    private Map<MAPIProperty, List<Chunk>> allChunks = new HashMap<MAPIProperty, List<Chunk>>();
+    private Map<MAPIProperty, List<Chunk>> allChunks = new HashMap<>();
 
     /** Type of message that the MSG represents (ie. IPM.Note) */
     private StringChunk messageClass;
@@ -106,7 +106,7 @@ public final class Chunks implements ChunkGroupWithProperties {
 
     @Override
     public Chunk[] getChunks() {
-        ArrayList<Chunk> chunks = new ArrayList<Chunk>(allChunks.size());
+        ArrayList<Chunk> chunks = new ArrayList<>(allChunks.size());
         for (List<Chunk> c : allChunks.values()) {
             chunks.addAll(c);
         }
@@ -240,7 +240,7 @@ public final class Chunks implements ChunkGroupWithProperties {
 
         // And add to the main list
         if (allChunks.get(prop) == null) {
-            allChunks.put(prop, new ArrayList<Chunk>());
+            allChunks.put(prop, new ArrayList<>());
         }
         allChunks.get(prop).add(chunk);
     }
index 376898b34ee0dd777e6b793cb49ca029e271cf39..b7a0aed574e66d100ffb7cd5da299e32a7073e77 100644 (file)
@@ -44,7 +44,7 @@ import org.apache.poi.hsmf.datatypes.Types.MAPIType;
  * http://msdn.microsoft.com/en-us/library/ms526356%28v=exchg.10%29.aspx
  */
 public class MAPIProperty {
-    private static Map<Integer, MAPIProperty> attributes = new HashMap<Integer, MAPIProperty>();
+    private static Map<Integer, MAPIProperty> attributes = new HashMap<>();
 
     public static final MAPIProperty AB_DEFAULT_DIR =
         new MAPIProperty(0x3d06, BINARY, "AbDefaultDir", "PR_AB_DEFAULT_DIR");
index 33f293d1bf6313d8a197706e459f89856908dcf6..b41bcca83a6569c6271b3fea49ce1dc01ac5fb73 100644 (file)
@@ -27,7 +27,7 @@ public final class NameIdChunks implements ChunkGroup {
     public static final String NAME = "__nameid_version1.0";
 
     /** Holds all the chunks that were found. */
-    private List<Chunk> allChunks = new ArrayList<Chunk>();
+    private List<Chunk> allChunks = new ArrayList<>();
 
     public Chunk[] getAll() {
         return allChunks.toArray(new Chunk[allChunks.size()]);
index 1a8a3305e9b2234f3683cb70f4b69090dabae5ee..a64726ad964e790915005e9d51e779eff7278192 100644 (file)
@@ -58,7 +58,7 @@ public abstract class PropertiesChunk extends Chunk {
      * Holds properties, indexed by type. If a property is multi-valued, or
      * variable length, it will be held via a {@link ChunkBasedPropertyValue}.
      */
-    private Map<MAPIProperty, PropertyValue> properties = new HashMap<MAPIProperty, PropertyValue>();
+    private Map<MAPIProperty, PropertyValue> properties = new HashMap<>();
 
     /**
      * The ChunkGroup that these properties apply to. Used when matching chunks
@@ -95,7 +95,7 @@ public abstract class PropertiesChunk extends Chunk {
      */
     public Map<MAPIProperty, List<PropertyValue>> getProperties() {
         Map<MAPIProperty, List<PropertyValue>> props =
-            new HashMap<MAPIProperty, List<PropertyValue>>(properties.size());
+                new HashMap<>(properties.size());
         for (MAPIProperty prop : properties.keySet()) {
             props.put(prop, getValues(prop));
         }
@@ -135,7 +135,7 @@ public abstract class PropertiesChunk extends Chunk {
     protected void matchVariableSizedPropertiesToChunks() {
         // Index the Parent Group chunks for easy lookup
         // TODO Is this the right way?
-        Map<Integer, Chunk> chunks = new HashMap<Integer, Chunk>();
+        Map<Integer, Chunk> chunks = new HashMap<>();
         for (Chunk chunk : parentGroup.getChunks()) {
             chunks.put(chunk.getChunkId(), chunk);
         }
index 382e3ed82ea475eab8af74ddf76e83c2bccbee3e..6680cde92289597206f448f8b3f20432c6a39868 100644 (file)
@@ -160,7 +160,7 @@ public final class RecipientChunks implements ChunkGroupWithProperties {
     }
 
     /** Holds all the chunks that were found. */
-    private List<Chunk> allChunks = new ArrayList<Chunk>();
+    private List<Chunk> allChunks = new ArrayList<>();
 
     @Override
     public Map<MAPIProperty, List<PropertyValue>> getProperties() {
index 314b788129d2e9fba2d186a0946f30fd689d83d0..19047b59e3ffd9c609c53083c75d97273e023b04 100644 (file)
@@ -26,8 +26,8 @@ import java.util.Map;
  * http://msdn.microsoft.com/en-us/library/microsoft.exchange.data.contenttypes.tnef.tnefpropertytype%28v=EXCHG.140%29.aspx
  */
 public final class Types {
-    private static Map<Integer, MAPIType> builtInTypes = new HashMap<Integer, MAPIType>();
-    private static Map<Integer, MAPIType> customTypes = new HashMap<Integer, Types.MAPIType>();
+    private static Map<Integer, MAPIType> builtInTypes = new HashMap<>();
+    private static Map<Integer, MAPIType> customTypes = new HashMap<>();
 
     /** Unspecified */
     public static final MAPIType UNSPECIFIED = new MAPIType(0x0000,
index 39b0ebce5aa1948f38165e5d52700c0e3550c581..a3bc793ac8ace6c087fd32e2506591c8321b0d9f 100644 (file)
@@ -31,7 +31,7 @@ public class TypesLister {
    public TypesLister() {}
    
    public void listByName(PrintStream out) {
-      ArrayList<MAPIProperty> all = new ArrayList<MAPIProperty>(MAPIProperty.getAll());
+      ArrayList<MAPIProperty> all = new ArrayList<>(MAPIProperty.getAll());
       Collections.sort(all, new Comparator<MAPIProperty>() {
          public int compare(MAPIProperty a, MAPIProperty b) {
             return a.name.compareTo(b.name);
@@ -40,7 +40,7 @@ public class TypesLister {
       list(all, out);
    }
    public void listById(PrintStream out) {
-      ArrayList<MAPIProperty> all = new ArrayList<MAPIProperty>(MAPIProperty.getAll());
+      ArrayList<MAPIProperty> all = new ArrayList<>(MAPIProperty.getAll());
       Collections.sort(all, new Comparator<MAPIProperty>() {
          public int compare(MAPIProperty a, MAPIProperty b) {
             if(a.id < b.id) return -1;
index b5d0e26f0ba134ae965545a61459abba26095cfd..e65a1216ddc3210caa38221cc847f57dea8d9292 100644 (file)
@@ -58,7 +58,7 @@ public final class POIFSChunkParser {
    public static ChunkGroup[] parse(DirectoryNode node) throws IOException {
       Chunks mainChunks = new Chunks();
       
-      ArrayList<ChunkGroup> groups = new ArrayList<ChunkGroup>();
+      ArrayList<ChunkGroup> groups = new ArrayList<>();
       groups.add(mainChunks);
 
       // Find our top level children
index 6865fd51115cd635076bb379244ef0d936c46940..2a3a309c032a69f210710f3d58f829cb901e14f7 100644 (file)
@@ -528,7 +528,7 @@ public class ExcelToFoConverter extends AbstractExcelConverter
             return 0;
         }
 
-        final List<Element> emptyCells = new ArrayList<Element>( maxColIx );
+        final List<Element> emptyCells = new ArrayList<>(maxColIx);
 
         if ( isOutputRowNumbers() )
         {
@@ -659,8 +659,8 @@ public class ExcelToFoConverter extends AbstractExcelConverter
         final CellRangeAddress[][] mergedRanges = ExcelToHtmlUtils
                 .buildMergedRangesMap( sheet );
 
-        final List<Element> emptyRowElements = new ArrayList<Element>(
-                physicalNumberOfRows );
+        final List<Element> emptyRowElements = new ArrayList<>(
+                physicalNumberOfRows);
         int maxSheetColumns = 1;
         for ( int r = sheet.getFirstRowNum(); r <= sheet.getLastRowNum(); r++ )
         {
index c2769861e689c3bf20d172892668df3b668d053f..a7fe782578ad00a464a26780fba4d505899586c4 100644 (file)
@@ -170,7 +170,7 @@ public class ExcelToHtmlConverter extends AbstractExcelConverter
 
     private String cssClassPrefixTable = "t";
 
-    private Map<Short, String> excelStyleToClass = new LinkedHashMap<Short, String>();
+    private Map<Short, String> excelStyleToClass = new LinkedHashMap<>();
 
     private final HtmlDocumentFacade htmlDocumentFacade;
 
@@ -542,7 +542,7 @@ public class ExcelToHtmlConverter extends AbstractExcelConverter
         if ( maxColIx <= 0 )
             return 0;
 
-        final List<Element> emptyCells = new ArrayList<Element>( maxColIx );
+        final List<Element> emptyCells = new ArrayList<>(maxColIx);
 
         if ( isOutputRowNumbers() )
         {
@@ -667,8 +667,8 @@ public class ExcelToHtmlConverter extends AbstractExcelConverter
         final CellRangeAddress[][] mergedRanges = ExcelToHtmlUtils
                 .buildMergedRangesMap( sheet );
 
-        final List<Element> emptyRowElements = new ArrayList<Element>(
-                physicalNumberOfRows );
+        final List<Element> emptyRowElements = new ArrayList<>(
+                physicalNumberOfRows);
         int maxSheetColumns = 1;
         for ( int r = sheet.getFirstRowNum(); r <= sheet.getLastRowNum(); r++ )
         {
index 1b67e52ff9e9688fa1be3c30904e046e9bc8acc3..3e20e9e18bfb380b668388f3e2ec72daac019a10 100644 (file)
@@ -85,11 +85,11 @@ public final class HSSFChart {
        @SuppressWarnings("unused")
     private ChartTitleFormatRecord chartTitleFormat;
        private SeriesTextRecord chartTitleText;
-       private List<ValueRangeRecord> valueRanges = new ArrayList<ValueRangeRecord>(); 
+       private List<ValueRangeRecord> valueRanges = new ArrayList<>();
        
        private HSSFChartType type = HSSFChartType.Unknown;
        
-       private List<HSSFSeries> series = new ArrayList<HSSFSeries>();
+       private List<HSSFSeries> series = new ArrayList<>();
 
        public enum HSSFChartType {
                Area {
@@ -146,7 +146,7 @@ public final class HSSFChart {
        public void createBarChart( HSSFWorkbook workbook, HSSFSheet parentSheet )
        {
 
-               List<Record> records = new ArrayList<Record>();
+               List<Record> records = new ArrayList<>();
                records.add( createMSDrawingObjectRecord() );
                records.add( createOBJRecord() );
                records.add( createBOFRecord() );
@@ -218,7 +218,7 @@ public final class HSSFChart {
         *  these charts yet, as this is very limited support
         */
        public static HSSFChart[] getSheetCharts(HSSFSheet sheet) {
-               List<HSSFChart> charts = new ArrayList<HSSFChart>();
+               List<HSSFChart> charts = new ArrayList<>();
                HSSFChart lastChart = null;
                HSSFSeries lastSeries = null;
                // Find records of interest
@@ -1136,7 +1136,7 @@ public final class HSSFChart {
                                return null;
                        }
                        
-                       List<Ptg> ptgList = new ArrayList<Ptg>();
+                       List<Ptg> ptgList = new ArrayList<>();
                        
                        int rowCount = (range.getLastRow() - range.getFirstRow()) + 1;
                        int colCount = (range.getLastColumn() - range.getFirstColumn()) + 1;
@@ -1181,7 +1181,7 @@ public final class HSSFChart {
        }
        
        public HSSFSeries createSeries() throws Exception {
-               ArrayList<RecordBase> seriesTemplate = new ArrayList<RecordBase>();
+               ArrayList<RecordBase> seriesTemplate = new ArrayList<>();
                boolean seriesTemplateFilled = false;
                
                int idx = 0;
@@ -1245,7 +1245,7 @@ public final class HSSFChart {
                HSSFSeries newSeries = null;
                
                /* duplicate record of the template series */
-               ArrayList<RecordBase> clonedRecords = new ArrayList<RecordBase>();
+               ArrayList<RecordBase> clonedRecords = new ArrayList<>();
                for(final RecordBase record : seriesTemplate) {         
                        
                        Record newRecord = null;
index 0c5950dde264d09e086cc4e1ee1498efca972791..5eccd5d7a96919e2a8d4bbce870ff9a9e58d253f 100644 (file)
@@ -54,9 +54,9 @@ public class HwmfGraphics {
 
     private static final Charset DEFAULT_CHARSET = LocaleUtil.CHARSET_1252;
     private final Graphics2D graphicsCtx;
-    private final List<HwmfDrawProperties> propStack = new LinkedList<HwmfDrawProperties>();
+    private final List<HwmfDrawProperties> propStack = new LinkedList<>();
     private HwmfDrawProperties prop = new HwmfDrawProperties();
-    private List<HwmfObjectTableEntry> objectTable = new ArrayList<HwmfObjectTableEntry>();
+    private List<HwmfObjectTableEntry> objectTable = new ArrayList<>();
     /** Bounding box from the placeable header */ 
     private final Rectangle2D bbox;
     private final AffineTransform initialAT;
index 57888432c1eb5a583e280652e2baaf9fafbee82c..48bcc60b443d5054386a0966ca00f405001d28aa 100644 (file)
@@ -293,7 +293,7 @@ public class HwmfDraw {
      */
     public static class WmfPolyPolygon implements HwmfRecord {
 
-        private List<Path2D> polyList = new ArrayList<Path2D>();
+        private List<Path2D> polyList = new ArrayList<>();
         
         @Override
         public HwmfRecordType getRecordType() {
index c280988ce489a3c573b325ced0a865b0013e735a..cb80c454eefa9db1dcd9281e844fc13192601962 100644 (file)
@@ -102,7 +102,7 @@ public class HwmfPalette {
          */
         private int start;
 
-        private List<PaletteEntry> palette = new ArrayList<PaletteEntry>();
+        private List<PaletteEntry> palette = new ArrayList<>();
 
         @Override
         public int init(LittleEndianInputStream leis, long recordSize, int recordFunction) throws IOException {
@@ -127,7 +127,7 @@ public class HwmfPalette {
         }
         
         protected List<PaletteEntry> getPaletteCopy() {
-            List<PaletteEntry> newPalette = new ArrayList<PaletteEntry>();
+            List<PaletteEntry> newPalette = new ArrayList<>();
             for (PaletteEntry et : palette) {
                 newPalette.add(new PaletteEntry(et));
             }
@@ -169,7 +169,7 @@ public class HwmfPalette {
             HwmfDrawProperties props = ctx.getProperties();
             List<PaletteEntry> palette = props.getPalette();
             if (palette == null) {
-                palette = new ArrayList<PaletteEntry>();
+                palette = new ArrayList<>();
             }
             int start = getPaletteStart();
             for (int i=palette.size(); i<start; i++) {
@@ -220,7 +220,7 @@ public class HwmfPalette {
             HwmfDrawProperties props = ctx.getProperties();
             List<PaletteEntry> palette = props.getPalette();
             if (palette == null) {
-                palette = new ArrayList<PaletteEntry>();
+                palette = new ArrayList<>();
             }
             for (int i=palette.size(); i<numberOfEntries; i++) {
                 palette.add(new PaletteEntry());
@@ -303,7 +303,7 @@ public class HwmfPalette {
             List<PaletteEntry> src = getPaletteCopy();
             int start = getPaletteStart();
             if (dest == null) {
-                dest = new ArrayList<PaletteEntry>();
+                dest = new ArrayList<>();
             }
             for (int i=dest.size(); i<start; i++) {
                 dest.add(new PaletteEntry());
index 17a8568f93522db564c530168d304daaa826da11..07e7d16cdb171ea0b438fd4868389db3840680aa 100644 (file)
@@ -45,7 +45,7 @@ import org.apache.poi.util.Units;
 public class HwmfPicture {
     private static final POILogger logger = POILogFactory.getLogger(HwmfPicture.class);
     
-    final List<HwmfRecord> records = new ArrayList<HwmfRecord>();
+    final List<HwmfRecord> records = new ArrayList<>();
     final HwmfPlaceableHeader placeableHeader;
     final HwmfHeader header;
     
index 07344c83a0c8eb523cc12fe86d5d540f737f249c..e265ada37b66ff529f83e0d2aca995f0301824f4 100644 (file)
@@ -168,7 +168,7 @@ public abstract class AbstractWordConverter
         structures.add( structure );
     }
 
-    private final Set<Bookmark> bookmarkStack = new LinkedHashSet<Bookmark>();
+    private final Set<Bookmark> bookmarkStack = new LinkedHashSet<>();
 
     private FontReplacer fontReplacer = new DefaultFontReplacer();
 
@@ -303,7 +303,7 @@ public abstract class AbstractWordConverter
          * should process char-by-char (slow) or find a correct way to
          * reconstruct the structure of range -- sergey
          */
-        List<Structure> structures = new LinkedList<Structure>();
+        List<Structure> structures = new LinkedList<>();
         if ( wordDocument instanceof HWPFDocument )
         {
             final HWPFDocument doc = (HWPFDocument) wordDocument;
@@ -366,7 +366,7 @@ public abstract class AbstractWordConverter
             }
         }
 
-        structures = new ArrayList<Structure>( structures );
+        structures = new ArrayList<>(structures);
         Collections.sort( structures );
 
         int previous = range.getStartOffset();
@@ -389,7 +389,7 @@ public abstract class AbstractWordConverter
             if ( structure.structure instanceof Bookmark )
             {
                 // other bookmarks with same boundaries
-                List<Bookmark> bookmarks = new LinkedList<Bookmark>();
+                List<Bookmark> bookmarks = new LinkedList<>();
                 for ( Bookmark bookmark : ( (HWPFDocument) wordDocument )
                         .getBookmarks()
                         .getBookmarksStartedBetween( structure.start,
index aff9519f8e81c79f6f940844b73481c936b2e29b..e5b0fac89f0c826635204c8ceb6c576646f447d3 100644 (file)
@@ -67,7 +67,7 @@ public class AbstractWordUtils
      */
     static int[] buildTableCellEdgesArray( Table table )
     {
-        Set<Integer> edges = new TreeSet<Integer>();
+        Set<Integer> edges = new TreeSet<>();
 
         for ( int r = 0; r < table.numRows(); r++ )
         {
@@ -228,7 +228,7 @@ public class AbstractWordUtils
     public static class NumberingState
     {
 
-        private final Map<String, Integer> levels = new HashMap<String, Integer>();
+        private final Map<String, Integer> levels = new HashMap<>();
 
     }
 
index 67f6ea1cd80245bb33c4b2b811298da5f8fdf6ca..792458165cff13362c55a0f9c05d1961c58cd147 100644 (file)
@@ -35,7 +35,7 @@ public class HtmlDocumentFacade
     /**
      * Map from tag name, to map linking known styles and css class names
      */
-    private Map<String, Map<String, String>> stylesheet = new LinkedHashMap<String, Map<String, String>>();
+    private Map<String, Map<String, String>> stylesheet = new LinkedHashMap<>();
     private Element stylesheetElement;
 
     protected Element title;
@@ -251,8 +251,8 @@ public class HtmlDocumentFacade
     public String getOrCreateCssClass( String classNamePrefix, String style )
     {
         if ( !stylesheet.containsKey( classNamePrefix ) )
-            stylesheet.put( classNamePrefix, new LinkedHashMap<String, String>(
-                    1 ) );
+            stylesheet.put( classNamePrefix, new LinkedHashMap<>(
+                    1) );
 
         Map<String, String> styleToClassName = stylesheet.get( classNamePrefix );
         String knownClass = styleToClassName.get( style );
index daf86e7cccddcc6cdc77034e9e0c2a5f68160d63..7ce31b13a5f93b1ee2b19b3bb7823b2d4c4e6b83 100644 (file)
@@ -103,7 +103,7 @@ public class WordToFoConverter extends AbstractWordConverter
         return wordToFoConverter.getDocument();
     }
 
-    private List<Element> endnotes = new ArrayList<Element>( 0 );
+    private List<Element> endnotes = new ArrayList<>(0);
 
     protected final FoDocumentFacade foDocumentFacade;
 
@@ -111,7 +111,7 @@ public class WordToFoConverter extends AbstractWordConverter
 
     private boolean outputCharactersLanguage;
 
-    private Set<String> usedIds = new LinkedHashSet<String>();
+    private Set<String> usedIds = new LinkedHashSet<>();
 
     /**
      * Creates new instance of {@link WordToFoConverter}. Can be used for output
index bfacb4b19ab7e54662d639064b7c14a53297202e..3ea2c596a0b00021b9c5c7ce13313c58c2a0c97a 100644 (file)
@@ -82,7 +82,7 @@ public class WordToHtmlConverter extends AbstractWordConverter
 
     private static final POILogger logger = POILogFactory.getLogger( WordToHtmlConverter.class );
 
-    private final Deque<BlockProperies> blocksProperies = new LinkedList<BlockProperies>();
+    private final Deque<BlockProperies> blocksProperies = new LinkedList<>();
 
     private final HtmlDocumentFacade htmlDocumentFacade;
 
index 7fe2686165007a4db495506b213df03f0ec7fff7..e859ad5c6cbb7d104ac4372bf1363e36a5dffb8d 100644 (file)
@@ -324,7 +324,7 @@ public final class HWPFLister
 
     private void buildParagraphs()
     {
-        paragraphs = new LinkedHashMap<Integer, String>();
+        paragraphs = new LinkedHashMap<>();
 
         StringBuilder part = new StringBuilder();
         String text = _doc.getDocumentText();
@@ -525,7 +525,7 @@ public final class HWPFLister
                     .getFileInformationBlock().getFcPlcfbtePapx(), doc
                     .getFileInformationBlock().getLcbPlcfbtePapx(), 4 );
 
-            List<PAPX> papxs = new ArrayList<PAPX>();
+            List<PAPX> papxs = new ArrayList<>();
 
             int length = binTable.length();
             for ( int x = 0; x < length; x++ )
index e860165dff64ac608d9d5f492cd006fed887a3b4..691273f41a741a526bce2ef120281956fe68a089 100644 (file)
@@ -36,7 +36,7 @@ public class BookmarksTables
 
     private PlexOfCps descriptorsLim = new PlexOfCps( 0 );
 
-    private List<String> names = new ArrayList<String>( 0 );
+    private List<String> names = new ArrayList<>(0);
 
     public BookmarksTables( byte[] tableStream, FileInformationBlock fib )
     {
@@ -118,8 +118,8 @@ public class BookmarksTables
         int namesLength = fib.getLcbSttbfbkmk();
 
         if ( namesStart != 0 && namesLength != 0 )
-            this.names = new ArrayList<String>( Arrays.asList( SttbUtils
-                    .readSttbfBkmk( tableStream, namesStart ) ) );
+            this.names = new ArrayList<>(Arrays.asList(SttbUtils
+                    .readSttbfBkmk(tableStream, namesStart)));
 
         int firstDescriptorsStart = fib.getFcPlcfbkf();
         int firstDescriptorsLength = fib.getLcbPlcfbkf();
index b211248cec890d4eb05a4c800fb5068a8a50fb80..b5aff30977cff952fe735d9688490e25bc1ee0c1 100644 (file)
@@ -53,7 +53,7 @@ public class CHPBinTable
             .getLogger( CHPBinTable.class );
 
   /** List of character properties.*/
-  protected List<CHPX> _textRuns = new ArrayList<CHPX>();
+  protected List<CHPX> _textRuns = new ArrayList<>();
 
   public CHPBinTable()
   {
@@ -171,7 +171,7 @@ public class CHPBinTable
             start = System.currentTimeMillis();
         }
 
-        List<CHPX> oldChpxSortedByStartPos = new ArrayList<CHPX>( _textRuns );
+        List<CHPX> oldChpxSortedByStartPos = new ArrayList<>(_textRuns);
         Collections.sort( oldChpxSortedByStartPos,
                 PropertyNode.StartComparator.instance );
 
@@ -179,7 +179,7 @@ public class CHPBinTable
                 Long.valueOf( System.currentTimeMillis() - start ), " ms" );
         start = System.currentTimeMillis();
 
-        final Map<CHPX, Integer> chpxToFileOrder = new IdentityHashMap<CHPX, Integer>();
+        final Map<CHPX, Integer> chpxToFileOrder = new IdentityHashMap<>();
         {
             int counter = 0;
             for ( CHPX chpx : _textRuns )
@@ -203,15 +203,15 @@ public class CHPBinTable
 
         List<Integer> textRunsBoundariesList;
         {
-            Set<Integer> textRunsBoundariesSet = new HashSet<Integer>();
+            Set<Integer> textRunsBoundariesSet = new HashSet<>();
             for ( CHPX chpx : _textRuns )
             {
                 textRunsBoundariesSet.add( Integer.valueOf( chpx.getStart() ) );
                 textRunsBoundariesSet.add( Integer.valueOf( chpx.getEnd() ) );
             }
             textRunsBoundariesSet.remove( Integer.valueOf( 0 ) );
-            textRunsBoundariesList = new ArrayList<Integer>(
-                    textRunsBoundariesSet );
+            textRunsBoundariesList = new ArrayList<>(
+                    textRunsBoundariesSet);
             Collections.sort( textRunsBoundariesList );
         }
 
@@ -219,7 +219,7 @@ public class CHPBinTable
                 Long.valueOf( System.currentTimeMillis() - start ), " ms" );
         start = System.currentTimeMillis();
 
-        List<CHPX> newChpxs = new LinkedList<CHPX>();
+        List<CHPX> newChpxs = new LinkedList<>();
         int lastTextRunStart = 0;
         for ( Integer objBoundary : textRunsBoundariesList )
         {
@@ -237,7 +237,7 @@ public class CHPBinTable
                     && oldChpxSortedByStartPos.get( startPosition ).getStart() >= boundary )
                 startPosition--;
 
-            List<CHPX> chpxs = new LinkedList<CHPX>();
+            List<CHPX> chpxs = new LinkedList<>();
             for ( int c = startPosition; c < oldChpxSortedByStartPos.size(); c++ )
             {
                 CHPX chpx = oldChpxSortedByStartPos.get( c );
@@ -291,7 +291,7 @@ public class CHPBinTable
 
             continue;
         }
-        this._textRuns = new ArrayList<CHPX>( newChpxs );
+        this._textRuns = new ArrayList<>(newChpxs);
 
         logger.log( POILogger.DEBUG, "CHPX rebuilded in ",
                 Long.valueOf( System.currentTimeMillis() - start ), " ms (",
index 5d7e929e21551d1f773ad3f73fa873bec994ddd9..d21e54b8dab3263835ba2b0814d0e56f42e398dd 100644 (file)
@@ -47,7 +47,7 @@ public final class CHPFormattedDiskPage extends FormattedDiskPage
 {
     private static final int FC_SIZE = 4;
 
-    private ArrayList<CHPX> _chpxList = new ArrayList<CHPX>();
+    private ArrayList<CHPX> _chpxList = new ArrayList<>();
     private ArrayList<CHPX> _overFlow;
 
 
@@ -193,7 +193,7 @@ public final class CHPFormattedDiskPage extends FormattedDiskPage
         // see if we couldn't fit some
         if ( index != size )
         {
-            _overFlow = new ArrayList<CHPX>();
+            _overFlow = new ArrayList<>();
             _overFlow.addAll( _chpxList.subList( index, size ) );
         }
 
index 36792f41e4a1b2f4f609ac84b5c50fef0c0dd920..ca7bd0bfd5618679757b6c9b7bf7c35814b0b278 100644 (file)
@@ -46,7 +46,7 @@ public class ComplexFileTable {
                                Charset charset) throws IOException {
         //skips through the prms before we reach the piece table. These contain data
         //for actual fast saved files
-        List<SprmBuffer> sprmBuffers = new LinkedList<SprmBuffer>();
+        List<SprmBuffer> sprmBuffers = new LinkedList<>();
         while (tableStream[offset] == GRPPRL_TYPE) {
             offset++;
             int size = LittleEndian.getShort(tableStream, offset);
index f5b0dbcf4a7f04cbe32d012310fc582921109e0a..8ab7781464cbc32f4bf0e51caabdb4661fb8ff04 100644 (file)
@@ -37,7 +37,7 @@ public final class EscherRecordHolder {
        private final ArrayList<EscherRecord> escherRecords;
 
        public EscherRecordHolder() {
-               escherRecords = new ArrayList<EscherRecord>();
+               escherRecords = new ArrayList<>();
        }
 
        public EscherRecordHolder(byte[] data, int offset, int size) {
@@ -125,8 +125,8 @@ public final class EscherRecordHolder {
 
     public List<? extends EscherContainerRecord> getDgContainers()
     {
-        List<EscherContainerRecord> dgContainers = new ArrayList<EscherContainerRecord>(
-                1 );
+        List<EscherContainerRecord> dgContainers = new ArrayList<>(
+                1);
         for ( EscherRecord escherRecord : getEscherRecords() )
         {
             if ( escherRecord.getRecordId() == (short) 0xF002 )
@@ -139,8 +139,8 @@ public final class EscherRecordHolder {
 
     public List<? extends EscherContainerRecord> getDggContainers()
     {
-        List<EscherContainerRecord> dggContainers = new ArrayList<EscherContainerRecord>(
-                1 );
+        List<EscherContainerRecord> dggContainers = new ArrayList<>(
+                1);
         for ( EscherRecord escherRecord : getEscherRecords() )
         {
             if ( escherRecord.getRecordId() == (short) 0xF000 )
@@ -153,8 +153,8 @@ public final class EscherRecordHolder {
 
     public List<? extends EscherContainerRecord> getBStoreContainers()
     {
-        List<EscherContainerRecord> bStoreContainers = new ArrayList<EscherContainerRecord>(
-                1 );
+        List<EscherContainerRecord> bStoreContainers = new ArrayList<>(
+                1);
         for ( EscherContainerRecord dggContainer : getDggContainers() )
         {
             for ( EscherRecord escherRecord : dggContainer.getChildRecords() )
@@ -170,8 +170,8 @@ public final class EscherRecordHolder {
 
     public List<? extends EscherContainerRecord> getSpgrContainers()
     {
-        List<EscherContainerRecord> spgrContainers = new ArrayList<EscherContainerRecord>(
-                1 );
+        List<EscherContainerRecord> spgrContainers = new ArrayList<>(
+                1);
         for ( EscherContainerRecord dgContainer : getDgContainers() )
         {
             for ( EscherRecord escherRecord : dgContainer.getChildRecords() )
@@ -187,8 +187,8 @@ public final class EscherRecordHolder {
 
     public List<? extends EscherContainerRecord> getSpContainers()
     {
-        List<EscherContainerRecord> spContainers = new ArrayList<EscherContainerRecord>(
-                1 );
+        List<EscherContainerRecord> spContainers = new ArrayList<>(
+                1);
         for ( EscherContainerRecord spgrContainer : getSpgrContainers() )
         {
             for ( EscherRecord escherRecord : spgrContainer.getChildRecords() )
index 18543f5e4a377231222ff92cd470a61c0325ad1b..ab477332cce480dbe21e8b7eb4c3521e10ef0be7 100644 (file)
@@ -148,7 +148,7 @@ public final class FIBFieldHandler
 
   private static final int FIELD_SIZE = LittleEndian.INT_SIZE * 2;
 
-  private Map<Integer, UnhandledDataStructure> _unknownMap = new HashMap<Integer, UnhandledDataStructure>();
+  private Map<Integer, UnhandledDataStructure> _unknownMap = new HashMap<>();
   private int[] _fields;
 
 
index 37c12c465e0d5f9b6411177698dc36ae4ae6e5f9..67a74cea72c11a789b24d7c38dc1dd0038a47534 100644 (file)
@@ -33,7 +33,7 @@ import org.apache.poi.util.Internal;
 public final class FSPATable
 {
 
-    private final Map<Integer, GenericPropertyNode> _byStart = new LinkedHashMap<Integer, GenericPropertyNode>();
+    private final Map<Integer, GenericPropertyNode> _byStart = new LinkedHashMap<>();
 
     public FSPATable( byte[] tableStream, FileInformationBlock fib,
             FSPADocumentPart part )
@@ -79,7 +79,7 @@ public final class FSPATable
 
     public FSPA[] getShapes()
     {
-        List<FSPA> result = new ArrayList<FSPA>( _byStart.size() );
+        List<FSPA> result = new ArrayList<>(_byStart.size());
         for ( GenericPropertyNode propertyNode : _byStart.values() )
         {
             result.add( new FSPA( propertyNode.getBytes(), 0 ) );
index 4cc1be93854aeb6136a37d8e2c389a463f754dc9..595078e47fb17b0088d4e8e022e3084707826791 100644 (file)
@@ -79,10 +79,10 @@ public class FieldsTables
     private static ArrayList<PlexOfField> toArrayList( PlexOfCps plexOfCps )
     {
         if ( plexOfCps == null )
-            return new ArrayList<PlexOfField>();
+            return new ArrayList<>();
 
-        ArrayList<PlexOfField> fields = new ArrayList<PlexOfField>(
-                plexOfCps.length() );
+        ArrayList<PlexOfField> fields = new ArrayList<>(
+                plexOfCps.length());
         for ( int i = 0; i < plexOfCps.length(); i++ )
         {
             GenericPropertyNode propNode = plexOfCps.getProperty( i );
@@ -97,8 +97,8 @@ public class FieldsTables
 
     public FieldsTables( byte[] tableStream, FileInformationBlock fib )
     {
-        _tables = new HashMap<FieldsDocumentPart, PlexOfCps>(
-                FieldsDocumentPart.values().length );
+        _tables = new HashMap<>(
+                FieldsDocumentPart.values().length);
 
         for ( FieldsDocumentPart part : FieldsDocumentPart.values() )
         {
index 6f66e9aefc55f55179a83b6670c36a638ae6805b..36a16f93556e0dc99f6dc9540d37d631487d5dfd 100644 (file)
@@ -234,7 +234,7 @@ public final class FileInformationBlock
          * fields FIBFieldHandler will load it content into
          * UnhandledDataStructure and save them on save.
          */
-        HashSet<Integer> knownFieldSet = new HashSet<Integer>();
+        HashSet<Integer> knownFieldSet = new HashSet<>();
         knownFieldSet.add( Integer.valueOf( FIBFieldHandler.STSHF ) );
         knownFieldSet.add( Integer.valueOf( FIBFieldHandler.CLX ) );
         knownFieldSet.add( Integer.valueOf( FIBFieldHandler.DOP ) );
index 2d28fd0a3df6d5d80e7b1fd03079c6974bdc9e48..4b8b4b83bfd892e9399e1386a144b5b4a6020f0a 100644 (file)
@@ -38,7 +38,7 @@ public final class ListTables
     /**
      * Both PlfLst and the following LVLs
      */
-    private final LinkedHashMap<Integer, ListData> _listMap = new LinkedHashMap<Integer, ListData>();
+    private final LinkedHashMap<Integer, ListData> _listMap = new LinkedHashMap<>();
     private PlfLfo _plfLfo;
 
   public ListTables()
index dfe1f95e0ec83b24a3bb900144cd51922b54c949..28e6a04303474a00cf6e915b0ada885f1d1c60a2 100644 (file)
@@ -42,7 +42,7 @@ public final class OldFontTable {
         //and it is recorded in the first short.
 
 
-        List<OldFfn> ffns = new ArrayList<OldFfn>();
+        List<OldFfn> ffns = new ArrayList<>();
         int fontTableLength = LittleEndian.getShort(buf, offset);
 
         int endOfTableOffset = offset + length;
index f141cddbabd00c00046ddd94abdf772ea5985a51..60272cad84da3c9350ff088df96902014004ee96 100644 (file)
@@ -98,7 +98,7 @@ public class OldTextPieceTable extends TextPieceTable {
         // In the interest of our sanity, now sort the text pieces
         // into order, if they're not already
         Collections.sort(_textPieces);
-        _textPiecesFCOrder = new ArrayList<TextPiece>(_textPieces);
+        _textPiecesFCOrder = new ArrayList<>(_textPieces);
         Collections.sort(_textPiecesFCOrder, new FCComparator());
 
     }
index 231fb9f9f11778743258bdad206073956bb03a3e..5d186f3d55f0d5478656d8d59e5b512a97cdf678 100644 (file)
@@ -49,7 +49,7 @@ public class PAPBinTable
     private static final POILogger logger = POILogFactory
             .getLogger( PAPBinTable.class );
 
-    protected final ArrayList<PAPX> _paragraphs = new ArrayList<PAPX>();
+    protected final ArrayList<PAPX> _paragraphs = new ArrayList<>();
 
     public PAPBinTable()
     {
@@ -158,7 +158,7 @@ public class PAPBinTable
             start = System.currentTimeMillis();
         }
 
-        List<PAPX> oldPapxSortedByEndPos = new ArrayList<PAPX>( paragraphs );
+        List<PAPX> oldPapxSortedByEndPos = new ArrayList<>(paragraphs);
         Collections.sort( oldPapxSortedByEndPos,
                 PropertyNode.EndComparator.instance );
 
@@ -166,7 +166,7 @@ public class PAPBinTable
                 Long.valueOf( System.currentTimeMillis() - start ), " ms" );
         start = System.currentTimeMillis();
 
-        final Map<PAPX, Integer> papxToFileOrder = new IdentityHashMap<PAPX, Integer>();
+        final Map<PAPX, Integer> papxToFileOrder = new IdentityHashMap<>();
         {
             int counter = 0;
             for ( PAPX papx : paragraphs )
@@ -188,7 +188,7 @@ public class PAPBinTable
                 Long.valueOf( System.currentTimeMillis() - start ), " ms" );
         start = System.currentTimeMillis();
 
-        List<PAPX> newPapxs = new LinkedList<PAPX>();
+        List<PAPX> newPapxs = new LinkedList<>();
         int lastParStart = 0;
         int lastPapxIndex = 0;
         for ( int charIndex = 0; charIndex < docText.length(); charIndex++ )
@@ -201,7 +201,7 @@ public class PAPBinTable
             final int endExclusive = charIndex + 1;
 
             boolean broken = false;
-            List<PAPX> papxs = new LinkedList<PAPX>();
+            List<PAPX> papxs = new LinkedList<>();
             for ( int papxIndex = lastPapxIndex; papxIndex < oldPapxSortedByEndPos
                     .size(); papxIndex++ )
             {
index 408a33f328283f9cd82ce9747c0a937f591aa716..5edf5866b34abaf9f990b2371411acf95048af1a 100644 (file)
@@ -48,7 +48,7 @@ public final class PAPFormattedDiskPage extends FormattedDiskPage {
     private static final int BX_SIZE = 13;
     private static final int FC_SIZE = 4;
 
-    private ArrayList<PAPX> _papxList = new ArrayList<PAPX>();
+    private ArrayList<PAPX> _papxList = new ArrayList<>();
     private ArrayList<PAPX> _overFlow;
 
     /**
@@ -246,7 +246,7 @@ public final class PAPFormattedDiskPage extends FormattedDiskPage {
         // see if we couldn't fit some
         if ( index != size )
         {
-            _overFlow = new ArrayList<PAPX>();
+            _overFlow = new ArrayList<>();
             _overFlow.addAll( _papxList.subList( index, size ) );
         }
 
index b17ec4439161214941c0bc45dd72bb687e31b95c..c729eb2ee53d0a9837972c8721a6b41d5c379a34 100644 (file)
@@ -62,7 +62,7 @@ public class PICFAndOfficeArtData
                 escherRecordFactory );
         offset += recordSize;
 
-        _blipRecords = new LinkedList<EscherRecord>();
+        _blipRecords = new LinkedList<>();
         while ( ( offset - startOffset ) < _picf.getLcb() )
         {
             EscherRecord nextRecord = escherRecordFactory.createRecord(
index 7cbca8ea4f70d7a35daa06933f4429100ab9fc2a..214654a064d8a6e69f5c1410b8652a8f35ef424d 100644 (file)
@@ -220,7 +220,7 @@ public final class PicturesTable
    * @return a list of Picture objects found in current document
    */
   public List<Picture> getAllPictures() {
-    ArrayList<Picture> pictures = new ArrayList<Picture>();
+    ArrayList<Picture> pictures = new ArrayList<>();
 
     Range range = _document.getOverallRange();
     for (int i = 0; i < range.numCharacterRuns(); i++) {
index 034ea4f7003a4b5ba53ca9198c5dd5bd7277e1a6..55e921a4276d6886255ef68957d5b6198321e404 100644 (file)
@@ -37,7 +37,7 @@ public final class PlexOfCps {
     private List<GenericPropertyNode> _props;
 
     public PlexOfCps(int sizeOfStruct) {
-        _props = new ArrayList<GenericPropertyNode>();
+        _props = new ArrayList<>();
         _cbStruct = sizeOfStruct;
     }
 
@@ -52,7 +52,7 @@ public final class PlexOfCps {
         _iMac = (cb - 4) / (4 + cbStruct);
 
         _cbStruct = cbStruct;
-        _props = new ArrayList<GenericPropertyNode>(_iMac);
+        _props = new ArrayList<>(_iMac);
 
         for (int x = 0; x < _iMac; x++) {
             _props.add(getProperty(x, buf, start));
index c038d9babf4122034e47bf70fc6f1def3f8019db..8a484ab1802cf94f1c69155c6a3da77fcb31a81c 100644 (file)
@@ -38,7 +38,7 @@ public class SectionTable
     private final static POILogger _logger = POILogFactory.getLogger(SectionTable.class);
     private static final int SED_SIZE = 12;
 
-    protected List<SEPX> _sections = new ArrayList<SEPX>();
+    protected List<SEPX> _sections = new ArrayList<>();
     protected List<TextPiece> _text;
 
     /** So we can know if things are unicode or not */
index 931c3fc887464d864797a1af0e23cc0188fe82b3..16c78e6e1aa9d8b7e6ebae85c10f6ea5b6aec880 100644 (file)
@@ -44,8 +44,8 @@ public class TextPieceTable implements CharIndexTranslator {
 
     // int _multiple;
     int _cpMin;
-    protected ArrayList<TextPiece> _textPieces = new ArrayList<TextPiece>();
-    protected ArrayList<TextPiece> _textPiecesFCOrder = new ArrayList<TextPiece>();
+    protected ArrayList<TextPiece> _textPieces = new ArrayList<>();
+    protected ArrayList<TextPiece> _textPiecesFCOrder = new ArrayList<>();
 
     public TextPieceTable() {
     }
@@ -110,7 +110,7 @@ public class TextPieceTable implements CharIndexTranslator {
         // In the interest of our sanity, now sort the text pieces
         // into order, if they're not already
         Collections.sort(_textPieces);
-        _textPiecesFCOrder = new ArrayList<TextPiece>(_textPieces);
+        _textPiecesFCOrder = new ArrayList<>(_textPieces);
         Collections.sort(_textPiecesFCOrder, new FCComparator());
     }
 
@@ -234,7 +234,7 @@ public class TextPieceTable implements CharIndexTranslator {
     @Override
     public int[][] getCharIndexRanges(int startBytePosInclusive,
                                       int endBytePosExclusive) {
-        List<int[]> result = new LinkedList<int[]>();
+        List<int[]> result = new LinkedList<>();
         for (TextPiece textPiece : _textPiecesFCOrder) {
             final int tpStart = textPiece.getPieceDescriptor()
                     .getFilePosition();
index f8aa03a1deebef8e8bbb8dfafd6d6a0ca90b5a72..1d1b40343960bda73ce9f9713a7061d51166bcaa 100644 (file)
@@ -27,7 +27,7 @@ import org.apache.poi.util.Internal;
 @Internal
 public final class HWPFFileSystem
 {
-  private Map<String, ByteArrayOutputStream> _streams = new HashMap<String, ByteArrayOutputStream>();
+  private Map<String, ByteArrayOutputStream> _streams = new HashMap<>();
 
   public HWPFFileSystem()
   {
index 5e744bbe685778f177aca6b0024e88ae45d0bd94..637c629070606f2574eb77b4a8a144d93e547c1c 100644 (file)
@@ -32,7 +32,7 @@ public final class CharacterSprmCompressor
   }
   public static byte[] compressCharacterProperty(CharacterProperties newCHP, CharacterProperties oldCHP)
   {
-    List<byte[]> sprmList = new ArrayList<byte[]>();
+    List<byte[]> sprmList = new ArrayList<>();
     int size = 0;
 
     if (newCHP.isFRMarkDel() != oldCHP.isFRMarkDel())
index 2f60b536fe1523634bd976f0b2a8be8982da06f3..65112c748dba6c18167236d9b1ef09baec00f90a 100644 (file)
@@ -37,7 +37,7 @@ public final class ParagraphSprmCompressor
   {
     // page numbers links to Word97-2007BinaryFileFormat(doc)Specification.pdf, accessible from microsoft.com 
 
-    List<byte[]> sprmList = new ArrayList<byte[]>();
+    List<byte[]> sprmList = new ArrayList<>();
     int size = 0;
 
     // Page 50 of public specification begins
index 6634aa4d0bdc027431e250759f2a1a5870ada5fe..43a7c9a47c4816d3cfe15b0a20954f00e938c2ea 100644 (file)
@@ -439,7 +439,7 @@ public final class ParagraphSprmUncompressor
     int[] tabPositions = pap.getRgdxaTab();
     TabDescriptor[] tabDescriptors = pap.getRgtbd();
 
-    Map<Integer, TabDescriptor> tabMap = new HashMap<Integer, TabDescriptor>();
+    Map<Integer, TabDescriptor> tabMap = new HashMap<>();
     for (int x = 0; x < tabPositions.length; x++)
     {
       tabMap.put(Integer.valueOf(tabPositions[x]), tabDescriptors[x]);
@@ -464,7 +464,7 @@ public final class ParagraphSprmUncompressor
     tabPositions = new int[tabMap.size()];
     tabDescriptors = new TabDescriptor[tabPositions.length];
     
-    List<Integer> list = new ArrayList<Integer>(tabMap.keySet());
+    List<Integer> list = new ArrayList<>(tabMap.keySet());
     Collections.sort(list);
 
     for (int x = 0; x < tabPositions.length; x++)
index 8d20a7490f38eaf46bd11bce2b5f74495288f509..14798c35900ad6d216168f9c629c099b0e919c90 100644 (file)
@@ -35,7 +35,7 @@ public final class SectionSprmCompressor
     public static byte[] compressSectionProperty(SectionProperties newSEP)
     {
         int size = 0;
-        List<byte[]> sprmList = new ArrayList<byte[]>();
+        List<byte[]> sprmList = new ArrayList<>();
 
         if (newSEP.getCnsPgn() != DEFAULT_SEP.getCnsPgn())
         {
index ec5fe937d4435b3382b9563811c34f8e3823f6f1..3773740a343887d62e045dedb09eb05277b39d0e 100644 (file)
@@ -37,7 +37,7 @@ public final class TableSprmCompressor
   public static byte[] compressTableProperty(TableProperties newTAP)
   {
     int size = 0;
-    List<byte[]> sprmList = new ArrayList<byte[]>();
+    List<byte[]> sprmList = new ArrayList<>();
 
     if (newTAP.getJc() != 0)
     {
index e692d0c1e7ff6de9d981631015e6c0bd33305f37..7f466b4885665666b24cd68d9f5849d6f1c69b7b 100644 (file)
@@ -165,7 +165,7 @@ public class BookmarksImpl implements Bookmarks
         if ( nodes == null || nodes.isEmpty() )
             return Collections.emptyList();
 
-        List<Bookmark> result = new ArrayList<Bookmark>( nodes.size() );
+        List<Bookmark> result = new ArrayList<>(nodes.size());
         for ( GenericPropertyNode node : nodes )
         {
             result.add( getBookmark( node ) );
@@ -192,7 +192,7 @@ public class BookmarksImpl implements Bookmarks
         if ( endLookupIndex < 0 )
             endLookupIndex = -( endLookupIndex + 1 );
 
-        Map<Integer, List<Bookmark>> result = new LinkedHashMap<Integer, List<Bookmark>>();
+        Map<Integer, List<Bookmark>> result = new LinkedHashMap<>();
         for ( int lookupIndex = startLookupIndex; lookupIndex < endLookupIndex; lookupIndex++ )
         {
             int s = sortedStartPositions[lookupIndex];
@@ -225,7 +225,7 @@ public class BookmarksImpl implements Bookmarks
         if ( sortedDescriptors != null )
             return;
 
-        Map<Integer, List<GenericPropertyNode>> result = new HashMap<Integer, List<GenericPropertyNode>>();
+        Map<Integer, List<GenericPropertyNode>> result = new HashMap<>();
         for ( int b = 0; b < bookmarksTables.getDescriptorsFirstCount(); b++ )
         {
             GenericPropertyNode property = bookmarksTables
@@ -234,7 +234,7 @@ public class BookmarksImpl implements Bookmarks
             List<GenericPropertyNode> atPositionList = result.get( positionKey );
             if ( atPositionList == null )
             {
-                atPositionList = new LinkedList<GenericPropertyNode>();
+                atPositionList = new LinkedList<>();
                 result.put( positionKey, atPositionList );
             }
             atPositionList.add( property );
@@ -246,8 +246,8 @@ public class BookmarksImpl implements Bookmarks
                 .entrySet() )
         {
             indices[counter++] = entry.getKey().intValue();
-            List<GenericPropertyNode> updated = new ArrayList<GenericPropertyNode>(
-                    entry.getValue() );
+            List<GenericPropertyNode> updated = new ArrayList<>(
+                    entry.getValue());
             Collections.sort( updated, PropertyNode.EndComparator.instance );
             entry.setValue( updated );
         }
index 0e2dcdbeb11e87a00a46580768fcd3835ff1b82b..d0c98a7fa8290b2ec35eb4a145be365b49e43643 100644 (file)
@@ -101,8 +101,8 @@ public class FieldsImpl implements Fields
 
     public FieldsImpl( FieldsTables fieldsTables )
     {
-        _fieldsByOffset = new HashMap<FieldsDocumentPart, Map<Integer, FieldImpl>>(
-                FieldsDocumentPart.values().length );
+        _fieldsByOffset = new HashMap<>(
+                FieldsDocumentPart.values().length);
 
         for ( FieldsDocumentPart part : FieldsDocumentPart.values() )
         {
@@ -134,15 +134,15 @@ public class FieldsImpl implements Fields
             List<PlexOfField> plexOfFields )
     {
         if ( plexOfFields == null || plexOfFields.isEmpty() )
-            return new HashMap<Integer, FieldImpl>();
+            return new HashMap<>();
 
         Collections.sort( plexOfFields, comparator );
-        List<FieldImpl> fields = new ArrayList<FieldImpl>(
-                plexOfFields.size() / 3 + 1 );
+        List<FieldImpl> fields = new ArrayList<>(
+                plexOfFields.size() / 3 + 1);
         parseFieldStructureImpl( plexOfFields, 0, plexOfFields.size(), fields );
 
-        HashMap<Integer, FieldImpl> result = new HashMap<Integer, FieldImpl>(
-                fields.size() );
+        HashMap<Integer, FieldImpl> result = new HashMap<>(
+                fields.size());
         for ( FieldImpl field : fields )
         {
             result.put( Integer.valueOf( field.getFieldStartOffset() ), field );
index 54a0c959692d8bd2e1e763267ece3204b77fbc5c..16c8ada155c3c735ab664a8c5d391345eff80c77 100644 (file)
@@ -74,7 +74,7 @@ public class NotesImpl implements Notes
         if ( anchorToIndexMap != null )
             return;
 
-        Map<Integer, Integer> result = new HashMap<Integer, Integer>();
+        Map<Integer, Integer> result = new HashMap<>();
         for ( int n = 0; n < notesTables.getDescriptorsCount(); n++ )
         {
             int anchorPosition = notesTables.getDescriptor( n ).getStart();
index 9e464f7bb14993cf37a9fe4dab16cd2bff067ed1..46b88c16a9d3896dcfd7489e55cc3eb796ea1aa0 100644 (file)
@@ -305,7 +305,7 @@ public class OfficeDrawingsImpl implements OfficeDrawings
 
     public Collection<OfficeDrawing> getOfficeDrawings()
     {
-        List<OfficeDrawing> result = new ArrayList<OfficeDrawing>();
+        List<OfficeDrawing> result = new ArrayList<>();
         for ( FSPA fspa : _fspaTable.getShapes() )
         {
             result.add( getOfficeDrawing( fspa ) );
index 6b5a51529e9aa336bc2f23246ef0ff33b9f6693f..8f7de73d7c6e0bb494cd34db467a8c2eba8eca67 100644 (file)
@@ -41,7 +41,7 @@ import org.apache.poi.hwpf.model.PicturesTable;
  */
 public class PictureRunMapper {
     private PicturesTable picturesTable;
-    private Set<Picture> claimed = new HashSet<Picture>();
+    private Set<Picture> claimed = new HashSet<>();
     private Map<Integer, Picture> lookup;
     private List<Picture> nonU1based;
     private List<Picture> all;
@@ -52,7 +52,7 @@ public class PictureRunMapper {
         all = picturesTable.getAllPictures();
 
         // Build the Offset-Picture lookup map
-        lookup = new HashMap<Integer, Picture>();
+        lookup = new HashMap<>();
         for (Picture p : all) {
             lookup.put(p.getStartOffset(), p);
         }
@@ -62,7 +62,7 @@ public class PictureRunMapper {
         // These are \u0008 escher floating ones, ones
         //  found outside the normal text, and who
         //  knows what else...
-        nonU1based = new ArrayList<Picture>();
+        nonU1based = new ArrayList<>();
         nonU1based.addAll(all);
         Range r = doc.getRange();
         for (int i = 0; i < r.numCharacterRuns(); i++) {
index 425e8036e882f8cfe815d8432bf89b3127848f16..eae15813c96c55f9fe4de948d99225de522d6260 100644 (file)
@@ -167,7 +167,7 @@ public class Range { // TODO -instantiable superclass
                _paragraphs = _doc.getParagraphTable().getParagraphs();
                _characters = _doc.getCharacterTable().getTextRuns();
                _text = _doc.getText();
-               _parent = new WeakReference<Range>(null);
+               _parent = new WeakReference<>(null);
 
                sanityCheckStartEnd();
        }
@@ -190,7 +190,7 @@ public class Range { // TODO -instantiable superclass
                _paragraphs = parent._paragraphs;
                _characters = parent._characters;
                _text = parent._text;
-               _parent = new WeakReference<Range>(parent);
+               _parent = new WeakReference<>(parent);
 
                sanityCheckStartEnd();
                sanityCheck();
index 74921b15b575544674fa20173c5c03cf1106cb0b..40ef0d4219f753d92958624b4774eaa470679b15 100644 (file)
@@ -51,7 +51,7 @@ public final class Table extends Range
         if ( _rowsFound )
             return;
 
-        _rows = new ArrayList<TableRow>();
+        _rows = new ArrayList<>();
         int rowStart = 0;
         int rowEnd = 0;
 
index 4bfac1d4adf5efb671f419fe7d586f9f8ce49775..7080addfcf1d32aa688cefcbecb65e0c7489a88d 100644 (file)
@@ -126,8 +126,8 @@ public final class TableRow extends Range
         final short expectedCellsCount = _tprops.getItcMac();
 
         int lastCellStart = 0;
-        List<TableCell> cells = new ArrayList<TableCell>(
-                expectedCellsCount + 1 );
+        List<TableCell> cells = new ArrayList<>(
+                expectedCellsCount + 1);
         for ( int p = 0; p < numParagraphs(); p++ )
         {
             Paragraph paragraph = getParagraph( p );
index 0cc33fdaa25953fb8345c83019ced3be1accb0ba..8d32b21a5e9828fdae31b75b65c0c05d009b9fe1 100644 (file)
@@ -135,7 +135,7 @@ public class HemfExtractorTest {
         long lastX = -1;
         long fudgeFactorX = 1000;//derive this from the font or frame/bounds information
         StringBuilder sb = new StringBuilder();
-        Set<String> expectedParts = new HashSet<String>();
+        Set<String> expectedParts = new HashSet<>();
         expectedParts.add("C:\\Users\\tallison\\");
         expectedParts.add("testPDF.pdf");
         int foundExpected = 0;
index c42233ab7e16833201579bbe0c61f29bcf85d12c..f3bdbf7b4f56242d346a81da65f2130eefeabd97 100644 (file)
@@ -54,7 +54,7 @@ public class HemfPlusExtractorTest {
 
         //test that the HemfCommentEMFPlus record at offset 1
         //contains 6 HemfCommentEMFPlus records within it
-        List<HemfPlusRecordType> expected = new ArrayList<HemfPlusRecordType>();
+        List<HemfPlusRecordType> expected = new ArrayList<>();
         expected.add(HemfPlusRecordType.setPixelOffsetMode);
         expected.add(HemfPlusRecordType.setAntiAliasMode);
         expected.add(HemfPlusRecordType.setCompositingQuality);
index f6d18a981642528da4db180c6c92c98d529e9d36..e9d24f4a1e1765561a1060b303cb91a05553673b 100644 (file)
@@ -77,8 +77,8 @@ public final class TestReWriteSanity {
         // Find the location of the PersistPtrIncrementalBlocks and
         // UserEditAtoms
         Record[] r = wss.getRecords();
-        Map<Integer,Record> pp = new HashMap<Integer,Record>();
-        Map<Integer,Object> ue = new HashMap<Integer,Object>();
+        Map<Integer,Record> pp = new HashMap<>();
+        Map<Integer,Object> ue = new HashMap<>();
         ue.put(Integer.valueOf(0),Integer.valueOf(0)); // Will show 0 if first
         int pos = 0;
         int lastUEPos = -1;
index 7aeb42ccf2be8a0ee11050128501cf97779cc022..e73b5ad8aee8aa4bac8ea2414ff73771b5d9d442 100644 (file)
@@ -159,7 +159,7 @@ public final class TestHyperlink {
     }
     
     private static List<HSLFHyperlink> findHyperlinks(List<HSLFTextParagraph> paras) {
-        List<HSLFHyperlink> links = new ArrayList<HSLFHyperlink>();
+        List<HSLFHyperlink> links = new ArrayList<>();
         for (HSLFTextParagraph p : paras) {
             for (HSLFTextRun r : p) {
                 HSLFHyperlink hl = r.getHyperlink();
index c6a17eaa23647b232e077f7237781c27a5f169df..ce4ce48fb57f2b957ceed1f97a234e20babaf7e0 100644 (file)
@@ -291,7 +291,7 @@ public final class TestShapes {
     private void textBoxSet(String filename) throws IOException {
         HSLFSlideShow ss = new HSLFSlideShow(_slTests.openResourceAsStream(filename));
         for (HSLFSlide sld : ss.getSlides()) {
-            ArrayList<String> lst1 = new ArrayList<String>();
+            ArrayList<String> lst1 = new ArrayList<>();
             for (List<HSLFTextParagraph> txt : sld.getTextParagraphs()) {
                 for (HSLFTextParagraph p : txt) {
                     for (HSLFTextRun r : p) {
@@ -300,7 +300,7 @@ public final class TestShapes {
                 }
             }
 
-            ArrayList<String> lst2 = new ArrayList<String>();
+            ArrayList<String> lst2 = new ArrayList<>();
             for (HSLFShape sh : sld.getShapes()) {
                 if (sh instanceof HSLFTextShape){
                     HSLFTextShape tbox = (HSLFTextShape)sh;
index 360bbd5d1aa29dfad62f3be73e8719a7b0f69390..064ede9f8201f40d9c7ef917f83ad1500a56aec0 100644 (file)
@@ -77,7 +77,7 @@ public final class TestExHyperlink {
                assertNotNull(exObjList);
 
                // Within that, grab out the Hyperlink atoms
-               List<ExHyperlink> linksA = new ArrayList<ExHyperlink>();
+               List<ExHyperlink> linksA = new ArrayList<>();
                for (Record ch : exObjList._children) {
                        if(ch instanceof ExHyperlink) {
                                linksA.add((ExHyperlink) ch);
index a2d4da329527fb5d5635a360a8c9f42ace393427..7e7c9f4d371ca3e7f2443e77c7a3ddaa8805ad2a 100644 (file)
@@ -201,7 +201,7 @@ public final class TestTxMasterStyleAtom extends TestCase {
      * There must be a TxMasterStyleAtom per each type of text defined in TextHeaderAtom
      */
     protected TxMasterStyleAtom[] getMasterStyles(){
-        List<TxMasterStyleAtom> lst = new ArrayList<TxMasterStyleAtom>();
+        List<TxMasterStyleAtom> lst = new ArrayList<>();
 
         Record[] coreRecs = _ppt.getMostRecentCoreRecords();
         for (final Record coreRec : coreRecs) {
index 4e9c3b012d76f5690505b1c1378041dedc66ea30..1efd586cf092254d0d94c895837381f5185e97b2 100644 (file)
@@ -150,7 +150,7 @@ public final class TestBugs {
         HSLFSlideShow ppt = open("42474-2.ppt");
 
         //map slide number and starting phrase of its notes
-        Map<Integer, String> notesMap = new HashMap<Integer, String>();
+        Map<Integer, String> notesMap = new HashMap<>();
         notesMap.put(Integer.valueOf(4), "For  decades before calculators");
         notesMap.put(Integer.valueOf(5), "Several commercial applications");
         notesMap.put(Integer.valueOf(6), "There are three variations of LNS that are discussed here");
@@ -308,7 +308,7 @@ public final class TestBugs {
         List<List<HSLFTextParagraph>> paras = slide.get(0).getTextParagraphs();
         assertEquals(4, paras.size());
 
-        Set<String> expected = new HashSet<String>();
+        Set<String> expected = new HashSet<>();
         expected.add("\u201CHAPPY BIRTHDAY SCOTT\u201D");
         expected.add("Have a HAPPY DAY");
         expected.add("PS Nobody is allowed to hassle Scott TODAY\u2026");
@@ -344,7 +344,7 @@ public final class TestBugs {
         assertEquals("Second run", HSLFTextParagraph.getRawText(slTr.get(2)));
 
         // Check the shape based text runs
-        List<HSLFTextParagraph> lst = new ArrayList<HSLFTextParagraph>();
+        List<HSLFTextParagraph> lst = new ArrayList<>();
         for (HSLFShape shape : slide.getShapes()) {
             if (shape instanceof HSLFTextShape){
                 List<HSLFTextParagraph> textRun = ((HSLFTextShape)shape).getTextParagraphs();
index 1e5147eb9e240ef49fd101ca39ecff473b3805e1..99c40c3f79c7a8be33863b7cfc4f705c47258cbb 100644 (file)
@@ -67,8 +67,8 @@ public class TestFontRendering {
         
         // setup fonts (especially needed, when run under *nix systems)
         GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
-        Map<String,String> fontMap = new HashMap<String,String>();
-        Map<String,String> fallbackMap = new HashMap<String,String>();
+        Map<String,String> fontMap = new HashMap<>();
+        Map<String,String> fallbackMap = new HashMap<>();
         
         for (String fontFile[] : fontFiles) {
             File f = new File(fontFile[0]);
index 1cfe61379eef9d447d6aa352bde6ce58c56e68fc..8499ed7b48b8f98f4a2c880f6495835f735732a7 100644 (file)
@@ -74,7 +74,7 @@ public final class TestTextShape {
     public void read() throws IOException {
         HSLFSlideShow ppt = HSLFTestDataSamples.getSlideShow("text_shapes.ppt");
 
-        List<String> lst1 = new ArrayList<String>();
+        List<String> lst1 = new ArrayList<>();
         HSLFSlide slide = ppt.getSlides().get(0);
         for (HSLFShape shape : slide.getShapes()) {
             assertTrue("Expected TextShape but found " + shape.getClass().getName(), shape instanceof HSLFTextShape);
@@ -112,7 +112,7 @@ public final class TestTextShape {
             lst1.add(rawText);
         }
 
-        List<String> lst2 = new ArrayList<String>();
+        List<String> lst2 = new ArrayList<>();
         for (List<HSLFTextParagraph> paras : slide.getTextParagraphs()) {
             lst2.add(HSLFTextParagraph.getRawText(paras));
         }
@@ -163,7 +163,7 @@ public final class TestTextShape {
 
         HSLFSlide slide = ppt.getSlides().get(0);
 
-        Map<String,HSLFTextShape> map = new HashMap<String,HSLFTextShape>();
+        Map<String,HSLFTextShape> map = new HashMap<>();
         for (HSLFShape shape : slide.getShapes()) {
             if(shape instanceof HSLFTextShape){
                 HSLFTextShape tx = (HSLFTextShape)shape;
index ecedca384aa1d04f49394372cc6dc5fc6f71fad5..40266c327260cea8c6eda8ed9c7296042009fd62 100644 (file)
@@ -114,8 +114,8 @@ public final class TestFixedSizedProperties {
        
        // Ask to have the values looked up
        Map<MAPIProperty,List<PropertyValue>> props = mainChunks.getProperties();
-       HashSet<Class<? extends PropertyValue>> seenTypes = 
-               new HashSet<Class<? extends PropertyValue>>();
+       HashSet<Class<? extends PropertyValue>> seenTypes =
+               new HashSet<>();
        for (List<PropertyValue> pvs : props.values()) {
            for (PropertyValue pv : pvs) {
                seenTypes.add(pv.getClass());
index 799a44c0797de4d1a2af8fa187a8f575af6183cd..a398e8e024f4f555cdb32b21566c0e4eb811fb56 100644 (file)
@@ -50,7 +50,7 @@ public class TestExcelConverterSuite
 
     @Parameterized.Parameters(name="{index}: {0}")
     public static Iterable<Object[]> files() {
-        List<Object[]> files = new ArrayList<Object[]>();
+        List<Object[]> files = new ArrayList<>();
         File directory = POIDataSamples.getDocumentInstance().getFile(
                 "../spreadsheet" );
         for ( final File child : directory.listFiles( new FilenameFilter()
index 5a3bc6e3853273719c1d61590b0a1d9c148a8ec8..3525ba78b3e26e47cb65a2bb193784545fce7246 100644 (file)
@@ -52,7 +52,7 @@ public class TestWordToConverterSuite
 
     @Parameterized.Parameters(name="{index}: {0}")
     public static Iterable<Object[]> files() {
-        List<Object[]> files = new ArrayList<Object[]>();
+        List<Object[]> files = new ArrayList<>();
         File directory = POIDataSamples.getDocumentInstance().getFile(
                 "../document" );
         for ( final File child : directory.listFiles( new FilenameFilter()
index 88c6eb69eeeca30a51a99021b5dcf088cffeb007..4aec492a4cb9011cbfec09db11c9cc3f6d933e91 100644 (file)
@@ -176,7 +176,7 @@ public final class POITestCase {
                 @Override
                 @SuppressForbidden("Test only")
                 public List<Field> run() throws Exception {
-                    List<Field> flds = new ArrayList<Field>();
+                    List<Field> flds = new ArrayList<>();
                     for (Class<?> c = expected.getClass(); c != null; c = c.getSuperclass()) {
                         Field[] fs = c.getDeclaredFields();
                         AccessibleObject.setAccessible(fs, true);                        
index ce3cf6d34dbe2ddf9a52adf9499c8e94d66ccc57..ad42ee053457fd2bf6e13924cc3b22afcb9df899 100644 (file)
@@ -60,7 +60,7 @@ public class TestReadAllFiles {
     
     @Parameters(name="{index}: {0} using {1}")
     public static Iterable<Object[]> files() {
-        final List<Object[]> files = new ArrayList<Object[]>();
+        final List<Object[]> files = new ArrayList<>();
         
         _samples.getFile("").listFiles(new FileFilter() {
             @Override
@@ -112,7 +112,7 @@ public class TestReadAllFiles {
     @Test
     public void recreate() throws IOException, HPSFException {
         /* Read the POI filesystem's property set streams: */
-        Map<String,PropertySet> psMap = new HashMap<String,PropertySet>();
+        Map<String,PropertySet> psMap = new HashMap<>();
         
         /* Create a new POI filesystem containing the origin file's
          * property set streams: */
index 911a27b699e5b649beb3c6f0f8736c6016d1e2dd..278ac9421dde58aacdb9fc6e0221e4a27becb627 100644 (file)
@@ -480,7 +480,7 @@ public class TestWrite {
         final POIFSFileSystem poiFs = new POIFSFileSystem();
         final PropertySet ps1 = new PropertySet();
         final Section s = ps1.getSections().get(0);
-        final Map<Long,String> m = new HashMap<Long,String>(3, 1.0f);
+        final Map<Long,String> m = new HashMap<>(3, 1.0f);
         m.put(Long.valueOf(1), "String 1");
         m.put(Long.valueOf(2), "String 2");
         m.put(Long.valueOf(3), "String 3");
@@ -744,7 +744,7 @@ public class TestWrite {
         final POIFSFileSystem poiFs = new POIFSFileSystem();
         final PropertySet ps1 = new PropertySet();
         final Section s = ps1.getSections().get(0);
-        final Map<Long,String> m = new HashMap<Long, String>(3, 1.0f);
+        final Map<Long,String> m = new HashMap<>(3, 1.0f);
         m.put(Long.valueOf(1), "String 1");
         m.put(Long.valueOf(2), "String 2");
         m.put(Long.valueOf(3), "String 3");
index 46cf64b51cb693d3f37f309aa743b2d5e70e95e0..af4674e4d1463588d64df468fae05bc5a8df900f 100644 (file)
@@ -550,7 +550,7 @@ public class TestWriteWellKnown {
         final int ID_2 = 3;
         final String NAME_1 = "Schl\u00fcssel \u00e4";
         final String VALUE_1 = "Wert 1";
-        final Map<Long,String> dictionary = new HashMap<Long, String>();
+        final Map<Long,String> dictionary = new HashMap<>();
 
         DocumentSummaryInformation dsi = PropertySetFactory.newDocumentSummaryInformation();
         CustomProperties cps;
index cc489d8533a641c9fc5f5c7f57ac898203850d5b..daa58d789dec9fb2371a7d9c83e5f64e6254e972 100644 (file)
@@ -60,7 +60,7 @@ final class Util {
      */
     public static List<POIFile> readPOIFiles(final File poiFs, final String... poiFiles)
     throws FileNotFoundException, IOException {
-        final List<POIFile> files = new ArrayList<POIFile>();
+        final List<POIFile> files = new ArrayList<>();
         POIFSReader r = new POIFSReader();
         POIFSReaderListener pfl = new POIFSReaderListener() {
             @Override
@@ -116,7 +116,7 @@ final class Util {
      * @exception IOException if an I/O exception occurs
      */
     public static List<POIFile> readPropertySets(final File poiFs) throws IOException {
-        final List<POIFile> files = new ArrayList<POIFile>(7);
+        final List<POIFile> files = new ArrayList<>(7);
         final POIFSReader r = new POIFSReader();
         POIFSReaderListener pfl = new POIFSReaderListener() {
             @Override
index e69c700deab80591d317f4d902b7ec8eea0f8476..d740a8a37ebfc41ec7aabf3f456ea2e7c54f3faf 100644 (file)
@@ -54,7 +54,7 @@ public abstract class BaseXLSIteratingTest {
     public ExpectedException thrown = ExpectedException.none();
     
        protected static final Map<String,Class<? extends Throwable>> EXCLUDED =
-        new HashMap<String,Class<? extends Throwable>>();
+            new HashMap<>();
 
     @Parameters(name="{index}: {0}")
     public static Iterable<Object[]> files() {
@@ -63,7 +63,7 @@ public abstract class BaseXLSIteratingTest {
             dataDirName = "test-data";
         }
 
-        List<Object[]> files = new ArrayList<Object[]>();
+        List<Object[]> files = new ArrayList<>();
         findFile(files, dataDirName + "/spreadsheet");
         findFile(files, dataDirName + "/hpsf");
         
index 609640c6dd27f87909668ed6bea714fc1bece5b6..296eff64581e71a4d17370c669b48e5a955e513b 100644 (file)
@@ -150,8 +150,8 @@ public final class TestEventWorkbookBuilder extends TestCase {
 
     private static final class MockHSSFListener implements HSSFListener {
         public MockHSSFListener() {}
-        private final List<Record> _records = new ArrayList<Record>();
-        private final List<Record> _frecs = new ArrayList<Record>();
+        private final List<Record> _records = new ArrayList<>();
+        private final List<Record> _frecs = new ArrayList<>();
 
         @Override
         public void processRecord(Record record) {
index e617735b6ab3b4e5ec302b050eed4abc63895b07..89efb527f5b5ee13f0331d806a19c51c792fa84d 100644 (file)
@@ -106,7 +106,7 @@ public final class TestFormatTrackingHSSFListener {
        
        private static final class MockHSSFListener implements HSSFListener {
                public MockHSSFListener() {}
-               private final List<Record> _records = new ArrayList<Record>();
+               private final List<Record> _records = new ArrayList<>();
 
                @Override
         public void processRecord(Record record) {
index 040b83cfb055db9ebfe1170f227d3ea83339ab5b..e57118b835979baca1899ceda0d66352459cb21b 100644 (file)
@@ -121,7 +121,7 @@ public final class TestHSSFEventFactory extends TestCase {
     }
 
     private static class MockHSSFListener implements HSSFListener {
-        private final List<Record> records = new ArrayList<Record>();
+        private final List<Record> records = new ArrayList<>();
 
         public MockHSSFListener() {}
         public Record[] getRecords() {
index 0867720f79ec3c60d8d527a476fb45a43fcff821..5387723b81e98b0e8082f24bedf5c24128456338 100644 (file)
@@ -364,7 +364,7 @@ public final class TestMissingRecordAwareHSSFListener extends TestCase {
 
        private static final class MockHSSFListener implements HSSFListener {
                public MockHSSFListener() {}
-               private final List<Record> _records = new ArrayList<Record>();
+               private final List<Record> _records = new ArrayList<>();
                private final boolean logToStdOut = false;
 
                @Override
index ddeacd6fb8650e69c491253449eff6503a39b10f..f051529b753281da3214b9b8cb31d0818e2104a1 100644 (file)
@@ -102,7 +102,7 @@ public class TestDrawingAggregate {
                 }
             }
             if(info != null){
-                info.aggRecords = new ArrayList<RecordBase>(
+                info.aggRecords = new ArrayList<>(
                         records.subList(info.startRecordIndex, info.endRecordIndex + 1));
             }
             return info;
@@ -134,7 +134,7 @@ public class TestDrawingAggregate {
      */
     private static void assertWriteAndReadBack(HSSFWorkbook wb) throws IOException {
         // map aggregate info by sheet index
-        Map<Integer, DrawingAggregateInfo> aggs = new HashMap<Integer, DrawingAggregateInfo>();
+        Map<Integer, DrawingAggregateInfo> aggs = new HashMap<>();
         for(int i = 0; i < wb.getNumberOfSheets(); i++){
             HSSFSheet sheet = wb.getSheetAt(i);
             DrawingAggregateInfo info = DrawingAggregateInfo.get(sheet);
@@ -223,7 +223,7 @@ public class TestDrawingAggregate {
             "+2eqbvLdxQ0ndhy5KJ/lc1ZZK9okY5X/gSbrHZTH1vE/ozagTcwAAAA=";
         byte[] dgBytes = decompress(data);
 
-        List<EscherRecord> records = new ArrayList<EscherRecord>();
+        List<EscherRecord> records = new ArrayList<>();
         EscherRecordFactory recordFactory = new DefaultEscherRecordFactory();
         int pos = 0;
         while (pos < dgBytes.length) {
index d34de10923ea201b3f09e37fa29a7896fceff01f..fbd562b444439bc795d335c803d40c51ba8a6955 100644 (file)
@@ -175,7 +175,7 @@ public final class TestLinkTable extends TestCase {
                };
                final List<Record> recList = Arrays.asList(recs);
                final WorkbookRecordList wrl = new WorkbookRecordList();
-               final Map<String, NameCommentRecord> commentRecords = new LinkedHashMap<String, NameCommentRecord>();
+               final Map<String, NameCommentRecord> commentRecords = new LinkedHashMap<>();
 
                final LinkTable lt = new LinkTable(recList, 0, wrl, commentRecords);
                assertNotNull(lt);
index ec090bd537354a352fb113045c38d51ec9db02de..cf5fc4ab360087c3da19f92d1229a640bb766191 100644 (file)
@@ -72,7 +72,7 @@ public final class TestRVA {
         workbook = new HSSFWorkbook(poifs);
         sheet = workbook.getSheetAt(0);
 
-        List<Object[]> data = new ArrayList<Object[]>(); 
+        List<Object[]> data = new ArrayList<>();
         
         for (int rowIdx = 0; true; rowIdx++) {
             HSSFRow row = sheet.getRow(rowIdx);
index cbd1200eed068a0467ecae48afe3ed6135536d98..e8e2db0823c2470dce9e5e6360ed35ae73145f61 100644 (file)
@@ -87,7 +87,7 @@ public final class TestSheet {
        @Test
        public void testCreateSheet() {
                // Check we're adding row and cell aggregates
-               List<Record> records = new ArrayList<Record>();
+               List<Record> records = new ArrayList<>();
                records.add(BOFRecord.createSheetBOF());
                records.add( new DimensionsRecord() );
                records.add(createWindow2Record());
@@ -205,7 +205,7 @@ public final class TestSheet {
         */
     @Test
        public void testMovingMergedRegion() {
-               List<Record> records = new ArrayList<Record>();
+               List<Record> records = new ArrayList<>();
 
                CellRangeAddress[] cras = {
                        new CellRangeAddress(0, 1, 0, 2),
@@ -244,7 +244,7 @@ public final class TestSheet {
         */
     @Test
        public void testRowAggregation() {
-               List<Record> records = new ArrayList<Record>();
+               List<Record> records = new ArrayList<>();
 
                records.add(InternalSheet.createBOF());
                records.add(new DimensionsRecord());
@@ -479,7 +479,7 @@ public final class TestSheet {
     @Test
        public void testUncalcSize_bug45066() {
 
-               List<Record> records = new ArrayList<Record>();
+               List<Record> records = new ArrayList<>();
                records.add(BOFRecord.createSheetBOF());
                records.add(new UncalcedRecord());
                records.add(new DimensionsRecord());
@@ -640,7 +640,7 @@ public final class TestSheet {
                nr.setColumn((short) colIx);
                nr.setValue(3.0);
 
-               List<Record> inRecs = new ArrayList<Record>();
+               List<Record> inRecs = new ArrayList<>();
                inRecs.add(BOFRecord.createSheetBOF());
                inRecs.add(new RowRecord(rowIx));
                inRecs.add(nr);
@@ -777,7 +777,7 @@ public final class TestSheet {
         r2.setStr(new HSSFRichTextString("Aggregated"));
         NoteRecord n2 = new NoteRecord();
 
-        List<Record> recordStream = new ArrayList<Record>();
+        List<Record> recordStream = new ArrayList<>();
         recordStream.add(InternalSheet.createBOF());
         recordStream.add( d1 );
         recordStream.add( r1 );
@@ -787,7 +787,7 @@ public final class TestSheet {
         confirmAggregatedRecords(recordStream);
 
 
-        recordStream = new ArrayList<Record>();
+        recordStream = new ArrayList<>();
         recordStream.add(InternalSheet.createBOF());
         recordStream.add( d1 );
         recordStream.add( r1 );
@@ -798,7 +798,7 @@ public final class TestSheet {
 
         confirmAggregatedRecords(recordStream);
 
-        recordStream = new ArrayList<Record>();
+        recordStream = new ArrayList<>();
         recordStream.add(InternalSheet.createBOF());
         recordStream.add( d1 );
         recordStream.add( r1 );
index d50ae9e73aa32756e301e16f4c70e8fc7659a79f..b231e36781d7315fc94b91ea651af6c8e38c0a0d 100644 (file)
@@ -88,7 +88,7 @@ public final class TestBoundSheetRecord extends TestCase {
                bs2.setPositionOfBof(33);
                bs3.setPositionOfBof(22);
 
-               List<BoundSheetRecord> l = new ArrayList<BoundSheetRecord>();
+               List<BoundSheetRecord> l = new ArrayList<>();
                l.add(bs1);
                l.add(bs2);
                l.add(bs3);
index 0df5d44f40b438a6e271b8bcf2429e670eb7d446..0e9a0ba297a00872e3fb8547bbad3f695d178351 100644 (file)
@@ -70,7 +70,7 @@ public final class TestEscherAggregate extends TestCase {
 
         ObjRecord r2 = new ObjRecord();
 
-        List<RecordBase> records = new ArrayList<RecordBase>();
+        List<RecordBase> records = new ArrayList<>();
         records.add( d1 );
         records.add( r1 );
         records.add( d2 );
index d7d05ab459d81a8b93828e1364fa58b7f0ab5543..fdc2fd779e290beaa5a9646bdf69ae342f55f5db 100644 (file)
@@ -65,7 +65,7 @@ public final class TestMergeCellsRecord extends TestCase {
        };
        public void testMCTable_bug46009() {
                MergedCellsTable mct = new MergedCellsTable();
-               List<Record> recList = new ArrayList<Record>();
+               List<Record> recList = new ArrayList<>();
                CellRangeAddress[] cras = new CellRangeAddress[] {
                                new CellRangeAddress(0, 0, 0, 3), 
                };
index c7797115a4b3ff15b93711afeb50d9d221af81de..17a5a8852fe348b3f5684b86c1e001f58dd0f027 100644 (file)
@@ -59,7 +59,7 @@ public final class TestSSTDeserializer {
         RecordInputStream in = TestcaseRecordInputStream.create(concat(header, continueBytes));
       
 
-        IntMapper<UnicodeString> strings = new IntMapper<UnicodeString>();
+        IntMapper<UnicodeString> strings = new IntMapper<>();
         SSTDeserializer deserializer = new SSTDeserializer( strings );
         deserializer.manufactureStrings(1, in );
 
@@ -72,7 +72,7 @@ public final class TestSSTDeserializer {
         byte[] continueBytes = readSampleHexData("evencontinuation.txt", "continue1", ContinueRecord.sid);
         RecordInputStream in = TestcaseRecordInputStream.create(concat(header, continueBytes));
 
-        IntMapper<UnicodeString> strings = new IntMapper<UnicodeString>();
+        IntMapper<UnicodeString> strings = new IntMapper<>();
         SSTDeserializer deserializer = new SSTDeserializer( strings );
         deserializer.manufactureStrings( 2, in);
 
@@ -91,7 +91,7 @@ public final class TestSSTDeserializer {
         
         RecordInputStream in = TestcaseRecordInputStream.create(concat(header, concat(continue1, continue2)));
 
-        IntMapper<UnicodeString> strings = new IntMapper<UnicodeString>();
+        IntMapper<UnicodeString> strings = new IntMapper<>();
         SSTDeserializer deserializer = new SSTDeserializer( strings );
         deserializer.manufactureStrings( 2, in);
 
@@ -105,7 +105,7 @@ public final class TestSSTDeserializer {
         byte[] continueBytes = readSampleHexData("extendedtextstrings.txt", "rich-continue1", ContinueRecord.sid);
         RecordInputStream in = TestcaseRecordInputStream.create(concat(header, continueBytes));
         
-        IntMapper<UnicodeString> strings = new IntMapper<UnicodeString>();
+        IntMapper<UnicodeString> strings = new IntMapper<>();
         SSTDeserializer deserializer = new SSTDeserializer( strings );
         deserializer.manufactureStrings( 1, in);
 
@@ -116,7 +116,7 @@ public final class TestSSTDeserializer {
         continueBytes = readSampleHexData("extendedtextstrings.txt", "norich-continue1", ContinueRecord.sid);
         in = TestcaseRecordInputStream.create(concat(header, continueBytes));
         
-        strings = new IntMapper<UnicodeString>();
+        strings = new IntMapper<>();
         deserializer = new SSTDeserializer( strings );
         deserializer.manufactureStrings( 1, in);
 
index 80380ac5e299f290b34efa623a8c61f28ecdb1fd..e2b2652a435a0caa9f9686a82fe5a1a3c4034c8d 100644 (file)
@@ -33,7 +33,7 @@ public final class TestSSTRecordSizeCalculator extends TestCase {
        private static final int COMPRESSED_PLAIN_STRING_OVERHEAD = 3;
        private static final int OPTION_FIELD_SIZE = 1;
        
-       private final IntMapper<UnicodeString> strings = new IntMapper<UnicodeString>();
+       private final IntMapper<UnicodeString> strings = new IntMapper<>();
 
        private void confirmSize(int expectedSize) {
                ContinuableRecordOutput cro = ContinuableRecordOutput.createForCountingOnly();
index ee04ed01a1f580018ed8f971e859cd1e857a7798..26455497b01209af7f3a2549432cb3f8e0646265 100644 (file)
@@ -49,7 +49,7 @@ public final class TestCFRecordsAggregate extends TestCase {
         HSSFWorkbook workbook = new HSSFWorkbook();
         HSSFSheet sheet = workbook.createSheet();
 
-        List<Record> recs = new ArrayList<Record>();
+        List<Record> recs = new ArrayList<>();
         CFHeaderBase header = new CFHeaderRecord();
         CFRuleBase rule1 = CFRuleRecord.create(sheet, "7");
         CFRuleBase rule2 = CFRuleRecord.create(sheet, ComparisonOperator.BETWEEN, "2", "5");
index 28299b8cadabd83116b420447cf03bb62791b6e4..b4e696fe30119e00578888cf7ff90a9d030f1d99 100644 (file)
@@ -64,7 +64,7 @@ public final class TestColumnInfoRecordsAggregate {
 
        private static final class CIRCollector implements RecordVisitor {
 
-               private final List<Record> _list = new ArrayList<Record>();
+               private final List<Record> _list = new ArrayList<>();
 
                @Override
         public void visitRecord(Record r) {
index be9e6a90174556487966e50728fa64cdf2f9930a..e63e8167bbf158b9a7a30efca0a53079b42145ed 100644 (file)
@@ -52,7 +52,7 @@ public final class TestValueRecordsAggregate {
        private final ValueRecordsAggregate valueRecord = new ValueRecordsAggregate();
        
        private List<CellValueRecordInterface> getValueRecords() {
-           List<CellValueRecordInterface> list = new ArrayList<CellValueRecordInterface>();
+           List<CellValueRecordInterface> list = new ArrayList<>();
            for ( CellValueRecordInterface rec : valueRecord ) {
                list.add(rec);
            }
@@ -65,7 +65,7 @@ public final class TestValueRecordsAggregate {
         */
     @Test
        public void testSharedFormula() {
-               List<Record> records = new ArrayList<Record>();
+               List<Record> records = new ArrayList<>();
                records.add(new FormulaRecord());
                records.add(new SharedFormulaRecord());
                records.add(new WindowTwoRecord());
@@ -91,7 +91,7 @@ public final class TestValueRecordsAggregate {
        }
 
        private static List<Record> testData() {
-               List<Record> records = new ArrayList<Record>();
+               List<Record> records = new ArrayList<>();
                FormulaRecord formulaRecord = new FormulaRecord();
                BlankRecord blankRecord = new BlankRecord();
                formulaRecord.setRow(1);
index d65c37e7028235016e2d0c7249c6d53fb82804d7..53d03f4b8b748a17f52b09c0187420a6f08d8d37 100644 (file)
@@ -67,7 +67,7 @@ public final class TestChartTitleFormatRecord {
                private final List<ChartTitleFormatRecord> chartTitleFormatRecords;
                
                public ChartTitleFormatRecordGrabber() {
-                       chartTitleFormatRecords = new ArrayList<ChartTitleFormatRecord>();
+                       chartTitleFormatRecords = new ArrayList<>();
                }
 
                @Override
index 1784d95aa64fd198b15402110b3cf7853bf616a8..2a49b7d25045882cbd14e2b5238975fd968ef80a 100644 (file)
@@ -39,7 +39,7 @@ public final class RecordInspector {
                private final List<Record> _list;
 
                public RecordCollector() {
-                       _list = new ArrayList<Record>(128);
+                       _list = new ArrayList<>(128);
                }
 
                @Override
index 06aa0b84b8d78bc48b6695fbc01ab25839216339..d467333ffcb42c03b0b7b1d4fdc656ddecc97d3c 100644 (file)
@@ -82,7 +82,7 @@ public final class StreamUtility {
        private static int[] diffInternal(InputStream isA, InputStream isB, int[] allowableDifferenceRegions)
                        throws IOException {
                int offset = 0;
-               List<Integer> temp = new ArrayList<Integer>();
+               List<Integer> temp = new ArrayList<>();
                while (true) {
                        int b = isA.read();
                        int b2 = isB.read();
index f249fadf40af8e7f32355f5580b5f4baa2421727..244bad98bd5cb4901ed1afd1d5815c31ded27499 100644 (file)
@@ -2055,7 +2055,7 @@ public final class TestBugs extends BaseTestBugzillaIssues {
                 "Good", "Heading 1", "Heading 2", "Heading 3", "Heading 4", "Input", "Linked Cell",
                 "Neutral", "Note", "Output", "Title", "Total", "Warning Text");
 
-        List<String> collecteddStyles = new ArrayList<String>();
+        List<String> collecteddStyles = new ArrayList<>();
         for (int i = 0; i < numCellStyles; i++) {
             HSSFCellStyle cellStyle = wb.getCellStyleAt(i);
             String styleName = cellStyle.getUserStyleName();
@@ -2492,7 +2492,7 @@ public final class TestBugs extends BaseTestBugzillaIssues {
 
     @Test
     public void bug51675() throws Exception {
-        final List<Short> list = new ArrayList<Short>();
+        final List<Short> list = new ArrayList<>();
         HSSFWorkbook wb = openSample("51675.xls");
         HSSFSheet sh = wb.getSheetAt(0);
         InternalSheet ish = HSSFTestHelper.getSheetForTest(sh);
index 55e1d77db68d935a2947f52057b672fa21bc406a..fdcd8b21a83e7317e853e34d4195b4f8833cb83d 100644 (file)
@@ -225,7 +225,7 @@ public final class TestHSSFWorkbook extends BaseTestWorkbook {
     }
     
     private static List<Integer> arrayToList(int[] array) {
-        List<Integer> list = new ArrayList<Integer>(array.length);
+        List<Integer> list = new ArrayList<>(array.length);
         for ( Integer element : array ) {
             list.add(element);
         }
index c656248dcff86bf877526705e3c797695a300d75..c8b10d1b3951c64a14e6d035609c1460ed21a590 100644 (file)
@@ -47,7 +47,7 @@ public final class TestSanityChecker {
        @Test
        public void testCheckRecordOrder() {
                final SanityChecker c = new SanityChecker();
-               List<Record> records = new ArrayList<Record>();
+               List<Record> records = new ArrayList<>();
                records.add(new BOFRecord());
                records.add(INTERFACEHDR);
                records.add(createBoundSheetRec());
index 7a0e3d6d0c3ed7b9c90e6b92bb2d152a49b79925..d920d2ce8c05c05a803167b0a878283177afe032 100644 (file)
@@ -103,7 +103,7 @@ public final class TestPOIFSReaderRegistry extends TestCase {
                 else
                 {
                     Set<POIFSReaderListener> registeredListeners =
-                            new HashSet<POIFSReaderListener>();
+                            new HashSet<>();
 
                     while (listeners.hasNext())
                     {
@@ -135,7 +135,7 @@ public final class TestPOIFSReaderRegistry extends TestCase {
                 Iterator<POIFSReaderListener> listeners =
                     registry.getListeners(path, name);
                 Set<POIFSReaderListener> registeredListeners =
-                    new HashSet<POIFSReaderListener>();
+                        new HashSet<>();
 
                 while (listeners.hasNext())
                 {
index 2aae3729dc6c4032281a9350f2ff7d6986ada216..54257598bf89f1b4d2612ee0c902b2fa99cb13b5 100644 (file)
@@ -58,7 +58,7 @@ public class ReaderWriter
     {
         this.filesystem = filesystem;
         root            = this.filesystem.getRoot();
-        dataMap         = new HashMap<DocumentDescriptor, byte[]>();
+        dataMap         = new HashMap<>();
     }
 
     /**
index da3e3839256b04be6114987230a265931da0c711..502c1fa62edf3b4fc471d220ee10a1bde42d8aff 100644 (file)
@@ -85,7 +85,7 @@ public class TestEntryUtils {
        fsD = new POIFSFileSystem();
        assertEquals(0, fsD.getRoot().getEntryCount());
        
-       EntryUtils.copyNodes(fs, fsD, new ArrayList<String>());
+       EntryUtils.copyNodes(fs, fsD, new ArrayList<>());
        assertEquals(3, fsD.getRoot().getEntryCount());
        assertNotNull(fsD.getRoot().getEntry(dirA.getName()));
        assertNotNull(fsD.getRoot().getEntry(dirB.getName()));
index 2bdcb0052c767db0ccfa29faa1e51bc33bff3272..6b859d9380189abebe75801e082a82097b4031d4 100644 (file)
@@ -65,7 +65,7 @@ public final class TestFileSystemBugs extends TestCase {
     }
     protected DirectoryNode[] openSamples(InputStream[] inps, boolean oldFails) throws Exception {
         NPOIFSFileSystem nfs = new NPOIFSFileSystem(inps[0]);
-        if (openedFSs == null) openedFSs = new ArrayList<NPOIFSFileSystem>();
+        if (openedFSs == null) openedFSs = new ArrayList<>();
         openedFSs.add(nfs);
         
         OPOIFSFileSystem ofs = null;
@@ -131,7 +131,7 @@ public final class TestFileSystemBugs extends TestCase {
     public void testHeavilyNestedReWrite() throws Exception {
         for (DirectoryNode root : openSSSample("ex42570-20305.xls", false)) {
             // Record the structure
-            Map<String,Integer> entries = new HashMap<String, Integer>();
+            Map<String,Integer> entries = new HashMap<>();
             fetchSizes("/", root, entries);
             
             // Prepare to copy
index bef0281f23f7d35f9dc8082e4847990874ad44d9..0bf0e54ee5f7c10aef666ff63015452539d8601c 100644 (file)
@@ -51,7 +51,7 @@ public final class TestFilteringDirectoryNode extends TestCase {
     }
     
     public void testNoFiltering() throws Exception {
-       FilteringDirectoryNode d = new FilteringDirectoryNode(fs.getRoot(), new HashSet<String>());
+       FilteringDirectoryNode d = new FilteringDirectoryNode(fs.getRoot(), new HashSet<>());
        assertEquals(3, d.getEntryCount());
        assertEquals(dirA.getName(), d.getEntry(dirA.getName()).getName());
        
index d63061c38903a1a4f7ed2dde72a66e02ca26d844..9bde78ee8215cb9b4335ba15b26c9b588040dec9 100644 (file)
@@ -64,7 +64,7 @@ public class TestOle10Native {
         
         for (File f : files) {
             NPOIFSFileSystem fs = new NPOIFSFileSystem(f, true);
-            List<Entry> entries = new ArrayList<Entry>();
+            List<Entry> entries = new ArrayList<>();
             findOle10(entries, fs.getRoot(), "/", "");
             
             for (Entry e : entries) {
index 09388c233e35911bffdff0ff495f4329ba5f67dc..fd2c3d3b7483997e23003f5a75182e06587b79fe 100644 (file)
@@ -123,7 +123,7 @@ public final class TestPropertySorter extends TestCase {
         DirectoryNode vba = (DirectoryNode)vba_project.getEntry(VBA);
         DirectoryProperty  p = (DirectoryProperty)vba.getProperty();
 
-        List<Property> lst = new ArrayList<Property>();
+        List<Property> lst = new ArrayList<>();
         for (Iterator<Property> it = p.getChildren(); it.hasNext();){
             Property ch = it.next();
             lst.add(ch);
index 12e2f16f02aec6134c2268020c4004e07bdafffb..71a210b8d792ced659441add69a8a16bb0239dbf 100644 (file)
@@ -64,7 +64,7 @@ public class TestVBAMacroReader {
     }
 
     static {
-        final Map<POIDataSamples, String> _expectedMacroContents = new HashMap<POIDataSamples, String>();
+        final Map<POIDataSamples, String> _expectedMacroContents = new HashMap<>();
         final POIDataSamples[] dataSamples = {
                 POIDataSamples.getSpreadSheetInstance(),
                 POIDataSamples.getSlideShowInstance(),
index 8db101c25d87251258899ba80419f74d3834081b..2d94aba13a7c0bd3d1bb0c1e5fac3a9c5a682b26 100644 (file)
@@ -102,7 +102,7 @@ public final class TestDirectoryProperty {
 
     private void verifyChildren(int count) {
         Iterator<Property> iter = _property.getChildren();
-        List<Property> children = new ArrayList<Property>();
+        List<Property> children = new ArrayList<>();
 
         while (iter.hasNext())
         {
index 7358f0024931d2bc4d20818468293ccd883874c3..ae9969a39845a488a9a1545904fac7e18d595913 100644 (file)
@@ -39,7 +39,7 @@ public final class LocalRawDataBlockList extends RawDataBlockList {
         throws IOException
     {
         super(new ByteArrayInputStream(new byte[ 0 ]), POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS);
-        _list  = new ArrayList<RawDataBlock>();
+        _list  = new ArrayList<>();
         _array = null;
     }
 
index 5ee530926427a5998d849f106124087afed2462d..025425e0b25d41c615fb2b2a5428431f64f78ed1 100644 (file)
@@ -337,7 +337,7 @@ public final class TestBATBlock extends TestCase {
     
     public void testGetBATBlockAndIndex() throws Exception {
        HeaderBlock header = new HeaderBlock(POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS);
-       List<BATBlock> blocks = new ArrayList<BATBlock>();
+       List<BATBlock> blocks = new ArrayList<>();
        int offset;
        
        
index 344b514853a6ab3d14f78060b2301fd5d1db2bac..6666fc8b237259959d3c7083777f876883245ed3 100644 (file)
@@ -174,7 +174,7 @@ public final class TestBlockListImpl {
         // that includes a reserved (XBAT) block, and one that
         // points off into space somewhere
         BlockListImpl list       = create();
-        List<RawDataBlock>  raw_blocks = new ArrayList<RawDataBlock>();
+        List<RawDataBlock>  raw_blocks = new ArrayList<>();
         byte[]        data       = new byte[ 512 ];
         int           offset     = 0;
 
index e4af23a99af1792c5b304e078c92af29537706fb..cc9d27cb60e12104d002e10aeb4df2337bb5a2a2 100644 (file)
@@ -37,7 +37,7 @@ public final class TestPropertyBlock {
     public void testCreatePropertyBlocks() throws Exception {
 
         // test with 0 properties
-        List<Property> properties = new ArrayList<Property>();
+        List<Property> properties = new ArrayList<>();
         BlockWritable[] blocks     =
             PropertyBlock.createPropertyBlockArray(POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS,properties);
 
index 9bb4f6a16632b2eba5ad805f8bb50e0bb6292cc2..dc96174a584a0ed10a364ea1896314481ca34c01 100644 (file)
@@ -37,7 +37,7 @@ import org.apache.poi.poifs.property.RootProperty;
 public final class TestSmallBlockTableWriter extends TestCase {
 
     public void testWritingConstructor() throws IOException {
-        List<OPOIFSDocument> documents = new ArrayList<OPOIFSDocument>();
+        List<OPOIFSDocument> documents = new ArrayList<>();
 
         documents.add(
             new OPOIFSDocument(
index 2d6ef1845cabed80f8b2f1a38cddbe1801999458..c637e79706cb75b6e4d1b97c25d48d975f615ecc 100644 (file)
@@ -52,7 +52,7 @@ public final class TestSmallDocumentBlock extends TestCase {
         throws IOException
     {
         ByteArrayInputStream stream    = new ByteArrayInputStream(_testdata);
-        List<DocumentBlock> documents  = new ArrayList<DocumentBlock>();
+        List<DocumentBlock> documents  = new ArrayList<>();
 
         while (true)
         {
@@ -138,7 +138,7 @@ public final class TestSmallDocumentBlock extends TestCase {
     {
         for (int j = 0; j <= 8; j++)
         {
-            List<SmallDocumentBlock> blocks = new ArrayList<SmallDocumentBlock>();
+            List<SmallDocumentBlock> blocks = new ArrayList<>();
 
             for (int k = 0; k < j; k++)
             {
index 1e7ea393aa02f81ff13fe6d42ee7b78c8c4c6389..df20a3c8e7deec165b7f30dba29ea6178522792c 100644 (file)
@@ -103,7 +103,7 @@ public class CellFormatTestBase {
 
         readFlags(workbook);
 
-        Set<String> runCategories = new TreeSet<String>(
+        Set<String> runCategories = new TreeSet<>(
                 String.CASE_INSENSITIVE_ORDER);
         String runCategoryList = flagString("Categories", "");
         if (runCategoryList != null) {
@@ -155,7 +155,7 @@ public class CellFormatTestBase {
      */
     private void readFlags(Workbook wb) {
         Sheet flagSheet = wb.getSheet("Flags");
-        testFlags = new TreeMap<String, String>(String.CASE_INSENSITIVE_ORDER);
+        testFlags = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
         if (flagSheet != null) {
             int end = flagSheet.getLastRowNum();
             // Skip the header row, therefore "+ 1"
index 4641c4fdc30d9d2c5ad571162ecab5e42c7bf727..923392a30c4e85e7a5d0e9a992528f06bcbb2335 100644 (file)
@@ -96,9 +96,9 @@ public class TestEvaluationCache extends TestCase {
 
                public EvalListener(HSSFWorkbook wb) {
                        _book = wb;
-                       _logList = new ArrayList<String>();
-                       _formulaCellsByCacheEntry = new HashMap<ICacheEntry,EvaluationCell>();
-                       _plainCellLocsByCacheEntry = new HashMap<ICacheEntry, Loc>();
+                       _logList = new ArrayList<>();
+                       _formulaCellsByCacheEntry = new HashMap<>();
+                       _plainCellLocsByCacheEntry = new HashMap<>();
                }
                @Override
         public void onCacheHit(int sheetIndex, int rowIndex, int columnIndex, ValueEval result) {
index 3e467b2bef28a8863b19dfc0b5d4d84269481a70..b9f09a1318755479326e0d911cb06aa5dade1643 100644 (file)
@@ -117,7 +117,7 @@ public class TestMissingWorkbook extends TestCase {
 
                FormulaEvaluator lMainWorkbookEvaluator = mainWorkbook.getCreationHelper().createFormulaEvaluator();
                FormulaEvaluator lSourceEvaluator = sourceWorkbook.getCreationHelper().createFormulaEvaluator();
-               Map<String,FormulaEvaluator> workbooks = new HashMap<String, FormulaEvaluator>();
+               Map<String,FormulaEvaluator> workbooks = new HashMap<>();
                workbooks.put(MAIN_WORKBOOK_FILENAME, lMainWorkbookEvaluator);
                workbooks.put(SOURCE_DUMMY_WORKBOOK_FILENAME, lSourceEvaluator);
                lMainWorkbookEvaluator.setupReferencedWorkbooks(workbooks);
index f92204d872a1ed893b6d7bb970dade1f2a9e0f41..678b766fe8bf58b3948b2fdcf8802ced1445249e 100644 (file)
@@ -88,7 +88,7 @@ public class TestNetworkdaysFunction extends TestCase {
 
         public MockAreaEval(String... holidays) {
             this(0, 0, 0, holidays.length - 1);
-            this.holidays = new ArrayList<ValueEval>();
+            this.holidays = new ArrayList<>();
             for (String holiday : holidays) {
                 this.holidays.add(new StringEval(holiday));
             }
index bbd6e56aad78e3442af22a8eb396e271536a6282..365d1352ccf3f4311029fd3eb1a09d047d55b594 100644 (file)
@@ -177,7 +177,7 @@ public class TestWorkdayFunction {
 
         public MockAreaEval(String... holidays) {
             this(0, 0, 0, holidays.length - 1);
-            this.holidays = new ArrayList<ValueEval>();
+            this.holidays = new ArrayList<>();
             for (String holiday : holidays) {
                 this.holidays.add(new StringEval(holiday));
             }
index 87b1fed4a4a1f81bcef254f7e70c448e188f7fe9..99f1b8a56e77d48df4ec034808576f3e093602fc 100644 (file)
@@ -124,7 +124,7 @@ public final class TestFormulasFromSpreadsheet {
         sheet = workbook.getSheetAt( 0 );
         evaluator = new HSSFFormulaEvaluator(workbook);
         
-        List<Object[]> data = new ArrayList<Object[]>();
+        List<Object[]> data = new ArrayList<>();
         
         processFunctionGroup(data, SS.START_OPERATORS_ROW_INDEX, null);
         processFunctionGroup(data, SS.START_FUNCTIONS_ROW_INDEX, null);
index 2dab84ca7ea0d42f0906b90b00f1697b04209ff4..8da0aded7e1125a3fffc301a23aa2dac7fb0ef29 100644 (file)
@@ -159,10 +159,10 @@ public final class ExcelFileFormatDocFunctionExtractor {
 
                public FunctionDataCollector(PrintStream ps) {
                        _ps = ps;
-                       _allFunctionsByIndex = new HashMap<Integer, FunctionData>();
-                       _allFunctionsByName = new HashMap<String, FunctionData>();
-                       _groupFunctionIndexes = new HashSet<Integer>();
-                       _groupFunctionNames = new HashSet<String>();
+                       _allFunctionsByIndex = new HashMap<>();
+                       _allFunctionsByName = new HashMap<>();
+                       _groupFunctionIndexes = new HashSet<>();
+                       _groupFunctionNames = new HashSet<>();
                }
 
                public void addFuntion(int funcIx, boolean hasFootnote, String funcName, int minParams, int maxParams,
@@ -265,11 +265,11 @@ public final class ExcelFileFormatDocFunctionExtractor {
 
                public EFFDocHandler(FunctionDataCollector fdc) {
                        _fdc = fdc;
-                       _elemNameStack = new Stack<String>();
+                       _elemNameStack = new Stack<>();
                        _isInsideTable = false;
-                       _rowData = new ArrayList<String>();
+                       _rowData = new ArrayList<>();
                        _textNodeBuffer = new StringBuffer();
-                       _rowNoteFlags = new ArrayList<Boolean>();
+                       _rowNoteFlags = new ArrayList<>();
                }
 
                private boolean matchesTargetPath() {
index 2d589217eda490876a5a5fb91d740dc96d66a949..72ab0b67db4e243beb05f5e53d489e453967296a 100644 (file)
@@ -87,7 +87,7 @@ public abstract class BaseTestFunctionsFromSpreadsheet {
         HSSFWorkbook workbook = HSSFTestDataSamples.openSampleWorkbook(filename);
         confirmReadMeSheet(workbook, clazz);
 
-        List<Object[]> data = new ArrayList<Object[]>();
+        List<Object[]> data = new ArrayList<>();
 
         int nSheets = workbook.getNumberOfSheets();
         for(int sheetIdx=1; sheetIdx< nSheets; sheetIdx++) {
index 914d2b97fd305848c12046b7bb5aab2c11a0d51d..5cad19f4d8662137e0df9e2a1eff370cffe9e60c 100644 (file)
@@ -936,7 +936,7 @@ public abstract class BaseTestBugzillaIssues {
         Workbook wb3 = _testDataProvider.createWorkbook();
         wb3.createSheet().createRow(1).createCell(0).setCellValue(otherCellText);
 
-        Map<String,FormulaEvaluator> evaluators = new HashMap<String, FormulaEvaluator>();
+        Map<String,FormulaEvaluator> evaluators = new HashMap<>();
         evaluators.put(refLocal, wb3.getCreationHelper().createFormulaEvaluator());
         evaluators.put(refHttp,  wb3.getCreationHelper().createFormulaEvaluator());
 
index 38192d90f147394ad19a049e328fe6c1728e7329..1c15804fb79fbe05a6a8da9cef4edc3b20b16f2c 100644 (file)
@@ -430,7 +430,7 @@ public abstract class BaseTestSheet {
         Workbook wb = _testDataProvider.createWorkbook();
         Sheet sheet = wb.createSheet();
         
-        Map<Integer, CellRangeAddress> mergedRegions = new HashMap<Integer, CellRangeAddress>();
+        Map<Integer, CellRangeAddress> mergedRegions = new HashMap<>();
         for (int r=0; r<10; r++) {
             CellRangeAddress region = new CellRangeAddress(r, r, 0, 1);
             mergedRegions.put(r, region);
@@ -447,8 +447,8 @@ public abstract class BaseTestSheet {
     }
     
     private static <T> void assertCollectionEquals(Collection<T> expected, Collection<T> actual) {
-        Set<T> e = new HashSet<T>(expected);
-        Set<T> a = new HashSet<T>(actual);
+        Set<T> e = new HashSet<>(expected);
+        Set<T> a = new HashSet<>(actual);
         assertEquals(e, a);
     }
 
index 30764c4cb9efbfd653c3d964aef5efdc92c30359..882be57da8432f8e341007df3d90e7fc453912af 100644 (file)
@@ -323,7 +323,7 @@ public abstract class BaseTestSheetShiftRows {
         sheet.shiftRows(4, sheet.getLastRowNum(), 1);
         
         // all regions should still start at row 3, and elongate by 1 row
-        List<CellRangeAddress> expectedMergedRegions = new ArrayList<CellRangeAddress>();
+        List<CellRangeAddress> expectedMergedRegions = new ArrayList<>();
         CellRangeAddress A4_B8 = CellRangeAddress.valueOf("A4:B8"); //A4:B7 should be elongated by 1 row
         CellRangeAddress C4_D8 = CellRangeAddress.valueOf("C4:D8"); //C4:B7 should be elongated by 1 row
         expectedMergedRegions.add(A4_B8);
index af5baf2fb2ba0dfebf0b00ba5cecffa8bdc7b091..e966f8ad22d4060075aaf14ee7734be9e781e2a8 100644 (file)
@@ -84,7 +84,7 @@ public class TestExcelStyleDateFormatter {
                 "\u004a", "\u004a", "\u0041", "\u0053", "\u004f", "\u004e", "\u0044");
 
 
-        Map<Locale, List<String>> testMap = new HashMap<Locale, List<String>>();
+        Map<Locale, List<String>> testMap = new HashMap<>();
         testMap.put(germanLocale,        germanResultList);
         testMap.put(russianLocale,        russianResultList);
         testMap.put(austrianLocale,        austrianResultList);
index be653fd91b443f544e3bf6859b4a2e090f18c5b9..215b64a340c835ddeec615805a390ea85a7bd6eb 100644 (file)
@@ -118,7 +118,7 @@ public class BaseTestCellUtil {
 
         // Add multiple border properties to cell should create a single new style
         int styCnt1 = wb.getNumCellStyles();
-        Map<String, Object> props = new HashMap<String, Object>();
+        Map<String, Object> props = new HashMap<>();
         props.put(CellUtil.BORDER_TOP, BorderStyle.THIN);
         props.put(CellUtil.BORDER_BOTTOM, BorderStyle.THIN);
         props.put(CellUtil.BORDER_LEFT, BorderStyle.THIN);
@@ -376,7 +376,7 @@ public class BaseTestCellUtil {
     public void setFillForegroundColorBeforeFillBackgroundColor() throws IOException {
         Workbook wb1 = _testDataProvider.createWorkbook();
         Cell A1 = wb1.createSheet().createRow(0).createCell(0);
-        Map<String, Object> properties = new HashMap<String, Object>();
+        Map<String, Object> properties = new HashMap<>();
         properties.put(CellUtil.FILL_PATTERN, FillPatternType.BRICKS);
         properties.put(CellUtil.FILL_FOREGROUND_COLOR, IndexedColors.BLUE.index);
         properties.put(CellUtil.FILL_BACKGROUND_COLOR, IndexedColors.RED.index);
@@ -396,7 +396,7 @@ public class BaseTestCellUtil {
     public void setFillForegroundColorBeforeFillBackgroundColorEnum() throws IOException {
         Workbook wb1 = _testDataProvider.createWorkbook();
         Cell A1 = wb1.createSheet().createRow(0).createCell(0);
-        Map<String, Object> properties = new HashMap<String, Object>();
+        Map<String, Object> properties = new HashMap<>();
         properties.put(CellUtil.FILL_PATTERN, FillPatternType.BRICKS);
         properties.put(CellUtil.FILL_FOREGROUND_COLOR, IndexedColors.BLUE.index);
         properties.put(CellUtil.FILL_BACKGROUND_COLOR, IndexedColors.RED.index);
index 265e40d8c95a05ee7740761cbe6d67c2c0c7326f..79fe64cda7c0fb533f84924a2267cf9c72a51f57 100644 (file)
@@ -66,7 +66,7 @@ final class NumberComparisonExamples {
 
        private static ComparisonExample[] initExamples() {
 
-               List<ComparisonExample> temp = new ArrayList<ComparisonExample>();
+               List<ComparisonExample> temp = new ArrayList<>();
 
                addStepTransition(temp, 0x4010000000000005L);
                addStepTransition(temp, 0x4010000000000010L);
index f810f3093e4e9f2124085efcdda417391ac8eeda..35ea428c8894646589d5b8e8fe276408a7b99662 100644 (file)
@@ -58,7 +58,7 @@ public class NumberRenderingSpreadsheetGenerator {
                        writeHeaderRow(wb, sheet);
                        _sheet = sheet;
                        _rowIndex = 1;
-                       _replacementNaNs = new ArrayList<Long>();
+                       _replacementNaNs = new ArrayList<>();
                }
 
                public void addTestRow(long rawBits, String expectedExcelRendering) {
index 7da48ce269bf38466d2ea35f4936dada3e209465..ca8b2ca61570aab6cef94f990c418ebbf4c82a48 100644 (file)
@@ -25,10 +25,10 @@ import java.util.List;
  */
 @Internal
 public class DummyPOILogger extends POILogger {
-       public List<String>logged = new ArrayList<String>(); 
+       public List<String>logged = new ArrayList<>();
 
        public void reset() {
-               logged = new ArrayList<String>();
+               logged = new ArrayList<>();
        }
        
     @Override