pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1791301 [1/3] - in /pdfbox/trunk/pdfbox/src: main/java/org/apache/pdfbox/contentstream/ main/java/org/apache/pdfbox/contentstream/operator/ main/java/org/apache/pdfbox/contentstream/operator/text/ main/java/org/apache/pdfbox/cos/ main/java...
Date Thu, 13 Apr 2017 19:59:09 GMT
Author: tilman
Date: Thu Apr 13 19:59:07 2017
New Revision: 1791301

URL: http://svn.apache.org/viewvc?rev=1791301&view=rev
Log:
PDFBOX-2852: use JDK7 syntax

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDAbstractContentStream.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/Operator.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/MoveTextSetLeading.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/NextLine.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSArray.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSDictionary.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSDocument.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSInputStream.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSName.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSStream.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/PDFDocEncoding.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/FilterFactory.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/LZWFilter.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/io/RandomAccessBuffer.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/LayerUtility.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/Overlay.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFCloneUtility.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFMergerUtility.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/Splitter.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFObjectStreamParser.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFStreamParser.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFXrefStreamParser.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/DefaultResourceCache.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocumentCatalog.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocumentInformation.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPage.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageContentStream.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageTree.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDResources.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/COSArrayList.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/COSDictionaryMap.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDNameTreeNode.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDNumberTreeNode.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDPageLabels.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDStream.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/ExecutionContext.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/InstructionSequence.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/InstructionSequenceBuilder.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/Operators.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/StackOperators.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDDefaultAttributeObject.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureElement.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureNode.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureTreeRoot.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDUserAttributeObject.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/Revisions.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/markedcontent/PDMarkedContent.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/taggedpdf/StandardStructureTypes.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/SecurityHandler.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFAnnotationInk.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFDictionary.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFField.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFJavaScript.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFPage.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFTemplate.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDCIDFont.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDCIDFontType0.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDCIDFontType2.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDCIDFontType2Embedder.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDSimpleFont.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDTrueTypeFont.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDTrueTypeFontEmbedder.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDType1CFont.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDType1FontEmbedder.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDType3CharProc.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/ToUnicodeWriter.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/encoding/DictionaryEncoding.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/encoding/Encoding.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/encoding/GlyphList.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/blend/BlendMode.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDDeviceNAttributes.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDDeviceNProcess.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDSeparation.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PDImageXObject.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/image/PDInlineImage.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/optionalcontent/PDOptionalContentProperties.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/GouraudShadingContext.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/Line.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/Patch.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/PatchMeshesShadingContext.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/ShadedTriangle.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/Type4ShadingContext.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/Type5ShadingContext.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/action/PDAction.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAppearanceEntry.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSeedValue.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/FieldUtils.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDAcroForm.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDButton.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDChoice.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDDefaultAppearanceString.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDFieldTree.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDNonTerminalField.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDRadioButton.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDSignatureField.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDTerminalField.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PlainText.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/GlyphCache.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/TilingPaintFactory.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/text/PDFMarkedContentExtractor.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStripper.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStripperByArea.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/text/TextPosition.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/QuickSort.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/SmallMap.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/filetypedetector/ByteTrie.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/util/filetypedetector/FileTypeDetector.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/cos/PDFDocEncodingTest.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/encryption/TestSymmetricKeyEncryption.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/multipdf/MergeAnnotationsTest.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/PageLayoutTest.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/common/PDStreamTest.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/common/TestPDNameTreeNode.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/common/TestPDNumberTreeNode.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/fdf/FDFAnnotationTest.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/fdf/FDFFieldTest.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/image/ValidateXImage.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/optionalcontent/TestOptionalContentGroups.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/ControlCharacterTest.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDSignatureFieldTest.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestCheckBox.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestListBox.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/TestRadioButtons.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/rendering/TestPDFToImage.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/rendering/TestRendering.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/text/TestTextStripper.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDAbstractContentStream.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDAbstractContentStream.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDAbstractContentStream.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDAbstractContentStream.java Thu Apr 13 19:59:07 2017
@@ -91,10 +91,10 @@ public abstract class PDAbstractContentS
     private PDResources resources;
 
     private boolean inTextMode = false;
-    private final Stack<PDFont> fontStack = new Stack<PDFont>();
+    private final Stack<PDFont> fontStack = new Stack<>();
 
-    private final Stack<PDColorSpace> nonStrokingColorSpaceStack = new Stack<PDColorSpace>();
-    private final Stack<PDColorSpace> strokingColorSpaceStack = new Stack<PDColorSpace>();
+    private final Stack<PDColorSpace> nonStrokingColorSpaceStack = new Stack<>();
+    private final Stack<PDColorSpace> strokingColorSpaceStack = new Stack<>();
 
     // number format
     private final NumberFormat formatDecimal = NumberFormat.getNumberInstance(Locale.US);

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java Thu Apr 13 19:59:07 2017
@@ -73,12 +73,12 @@ public abstract class PDFStreamEngine
 {
     private static final Log LOG = LogFactory.getLog(PDFStreamEngine.class);
 
-    private final Map<String, OperatorProcessor> operators = new HashMap<String, OperatorProcessor>(80);
+    private final Map<String, OperatorProcessor> operators = new HashMap<>(80);
 
     private Matrix textMatrix;
     private Matrix textLineMatrix;
 
-    private Stack<PDGraphicsState> graphicsStack = new Stack<PDGraphicsState>();
+    private Stack<PDGraphicsState> graphicsStack = new Stack<>();
 
     private PDResources resources;
     private PDPage currentPage;
@@ -481,7 +481,7 @@ public abstract class PDFStreamEngine
      */
     private void processStreamOperators(PDContentStream contentStream) throws IOException
     {
-        List<COSBase> arguments = new ArrayList<COSBase>();
+        List<COSBase> arguments = new ArrayList<>();
         PDFStreamParser parser = new PDFStreamParser(contentStream);
         Object token = parser.parseNextToken();
         while (token != null)
@@ -493,7 +493,7 @@ public abstract class PDFStreamEngine
             else if (token instanceof Operator)
             {
                 processOperator((Operator) token, arguments);
-                arguments = new ArrayList<COSBase>();
+                arguments = new ArrayList<>();
             }
             else
             {
@@ -912,7 +912,7 @@ public abstract class PDFStreamEngine
     protected final Stack<PDGraphicsState> saveGraphicsStack()
     {
         Stack<PDGraphicsState> savedStack = graphicsStack;
-        graphicsStack = new Stack<PDGraphicsState>();
+        graphicsStack = new Stack<>();
         graphicsStack.add(savedStack.peek().clone());
         return savedStack;
     }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/Operator.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/Operator.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/Operator.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/Operator.java Thu Apr 13 19:59:07 2017
@@ -33,7 +33,7 @@ public final class Operator
     private COSDictionary imageParameters;
 
     /** map for singleton operator objects; use {@link ConcurrentHashMap} for better scalability with multiple threads */
-    private static final ConcurrentMap<String,Operator> operators = new ConcurrentHashMap<String, Operator>();
+    private static final ConcurrentMap<String,Operator> operators = new ConcurrentHashMap<>();
 
     /**
      * Constructor.

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/MoveTextSetLeading.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/MoveTextSetLeading.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/MoveTextSetLeading.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/MoveTextSetLeading.java Thu Apr 13 19:59:07 2017
@@ -50,7 +50,7 @@ public class MoveTextSetLeading extends
         }
         COSNumber y = (COSNumber) base1;
         
-        List<COSBase> args = new ArrayList<COSBase>();
+        List<COSBase> args = new ArrayList<>();
         args.add(new COSFloat(-1 * y.floatValue()));
         context.processOperator("TL", args);
         context.processOperator("Td", arguments);

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/NextLine.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/NextLine.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/NextLine.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/operator/text/NextLine.java Thu Apr 13 19:59:07 2017
@@ -36,7 +36,7 @@ public class NextLine extends OperatorPr
     public void process(Operator operator, List<COSBase> arguments) throws IOException
     {
         //move to start of next text line
-        List<COSBase> args = new ArrayList<COSBase>();
+        List<COSBase> args = new ArrayList<>();
         args.add(new COSFloat(0f));
         // this must be -leading instead of just leading as written in the
         // specification (p.369) the acrobat reader seems to implement it the same way

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSArray.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSArray.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSArray.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSArray.java Thu Apr 13 19:59:07 2017
@@ -31,7 +31,7 @@ import org.apache.pdfbox.pdmodel.common.
  */
 public class COSArray extends COSBase implements Iterable<COSBase>, COSUpdateInfo
 {
-    private final List<COSBase> objects = new ArrayList<COSBase>();
+    private final List<COSBase> objects = new ArrayList<>();
     private boolean needToBeUpdated;
 
     /**
@@ -563,7 +563,7 @@ public class COSArray extends COSBase im
      */
     public List<? extends COSBase> toList()
     {
-        List<COSBase> retList = new ArrayList<COSBase>(size());
+        List<COSBase> retList = new ArrayList<>(size());
         for (int i = 0; i < size(); i++)
         {
             retList.add(get(i));

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSDictionary.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSDictionary.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSDictionary.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSDictionary.java Thu Apr 13 19:59:07 2017
@@ -49,7 +49,7 @@ public class COSDictionary extends COSBa
      * The name-value pairs of this dictionary. The pairs are kept in the order they were added to the dictionary.
      */
 //    protected Map<COSName, COSBase> items = new LinkedHashMap<COSName, COSBase>();
-    protected Map<COSName, COSBase> items = new SmallMap<COSName, COSBase>();
+    protected Map<COSName, COSBase> items = new SmallMap<>();
 
     /**
      * Constructor.
@@ -94,7 +94,7 @@ public class COSDictionary extends COSBa
         {
             synchronized (DICT_INSTANCES)
             {
-                DICT_INSTANCES.add(new WeakReference<COSDictionary>(this));
+                DICT_INSTANCES.add(new WeakReference<>(this));
                 // print statistics at each 10,000th instance
                 if (DICT_INSTANCES.size() % 10000 == 0)
                 {

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSDocument.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSDocument.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSDocument.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSDocument.java Thu Apr 13 19:59:07 2017
@@ -50,18 +50,18 @@ public class COSDocument extends COSBase
      * are also stored in COSDictionary objects that map a name to a specific object.
      */
     private final Map<COSObjectKey, COSObject> objectPool =
-        new HashMap<COSObjectKey, COSObject>();
+        new HashMap<>();
 
     /**
      * Maps object and generation id to object byte offsets.
      */
     private final Map<COSObjectKey, Long> xrefTable =
-        new HashMap<COSObjectKey, Long>();
+        new HashMap<>();
 
     /**
      * List containing all streams which are created when creating a new pdf. 
      */
-    private final List<COSStream> streams = new ArrayList<COSStream>();
+    private final List<COSStream> streams = new ArrayList<>();
     
     /**
      * Document trailer dictionary.
@@ -199,7 +199,7 @@ public class COSDocument extends COSBase
      */
     public List<COSObject> getObjectsByType( COSName type ) throws IOException
     {
-        List<COSObject> retval = new ArrayList<COSObject>();
+        List<COSObject> retval = new ArrayList<>();
         for( COSObject object : objectPool.values() )
         {
             COSBase realObject = object.getObject();
@@ -382,7 +382,7 @@ public class COSDocument extends COSBase
      */
     public List<COSObject> getObjects()
     {
-        return new ArrayList<COSObject>(objectPool.values());
+        return new ArrayList<>(objectPool.values());
     }
 
     /**

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSInputStream.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSInputStream.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSInputStream.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSInputStream.java Thu Apr 13 19:59:07 2017
@@ -51,7 +51,7 @@ public final class COSInputStream extend
     static COSInputStream create(List<Filter> filters, COSDictionary parameters, InputStream in,
                                  ScratchFile scratchFile) throws IOException
     {
-        List<DecodeResult> results = new ArrayList<DecodeResult>();
+        List<DecodeResult> results = new ArrayList<>();
         InputStream input = in;
         if (filters.isEmpty())
         {

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSName.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSName.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSName.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSName.java Thu Apr 13 19:59:07 2017
@@ -33,11 +33,11 @@ import org.apache.pdfbox.util.Hex;
 public final class COSName extends COSBase implements Comparable<COSName>
 {
     // using ConcurrentHashMap because this can be accessed by multiple threads
-    private static Map<String, COSName> nameMap = new ConcurrentHashMap<String, COSName>(8192);
+    private static Map<String, COSName> nameMap = new ConcurrentHashMap<>(8192);
 
     // all common COSName values are stored in this HashMap
     // they are already defined as static constants and don't need to be synchronized
-    private static Map<String, COSName> commonNameMap = new HashMap<String, COSName>(768);
+    private static Map<String, COSName> commonNameMap = new HashMap<>(768);
 
     //
     // IMPORTANT: this list is *alphabetized* and does not need any JavaDoc

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSStream.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSStream.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSStream.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSStream.java Thu Apr 13 19:59:07 2017
@@ -281,7 +281,7 @@ public class COSStream extends COSDictio
      */
     private List<Filter> getFilterList() throws IOException
     {
-        List<Filter> filterList = new ArrayList<Filter>();
+        List<Filter> filterList = new ArrayList<>();
         COSBase filters = getFilters();
         if (filters instanceof COSName)
         {

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/PDFDocEncoding.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/PDFDocEncoding.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/PDFDocEncoding.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/PDFDocEncoding.java Thu Apr 13 19:59:07 2017
@@ -35,7 +35,7 @@ final class PDFDocEncoding
     static
     {
         CODE_TO_UNI = new int[256];
-        UNI_TO_CODE = new HashMap<Character, Integer>(256);
+        UNI_TO_CODE = new HashMap<>(256);
 
         // initialize with basically ISO-8859-1
         for (int i = 0; i < 256; i++)

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/FilterFactory.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/FilterFactory.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/FilterFactory.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/FilterFactory.java Thu Apr 13 19:59:07 2017
@@ -34,7 +34,7 @@ public final class FilterFactory
      */
     public static final FilterFactory INSTANCE = new FilterFactory();
 
-    private final Map<COSName, Filter> filters = new HashMap<COSName, Filter>();
+    private final Map<COSName, Filter> filters = new HashMap<>();
 
     private FilterFactory()
     {

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/LZWFilter.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/LZWFilter.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/LZWFilter.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/filter/LZWFilter.java Thu Apr 13 19:59:07 2017
@@ -103,7 +103,7 @@ public class LZWFilter extends Filter
 
     private void doLZWDecode(InputStream encoded, OutputStream decoded, int earlyChange) throws IOException
     {
-        List<byte[]> codeTable = new ArrayList<byte[]>();
+        List<byte[]> codeTable = new ArrayList<>();
         int chunk = 9;
         final MemoryCacheImageInputStream in = new MemoryCacheImageInputStream(encoded);
         long nextCommand;
@@ -292,7 +292,7 @@ public class LZWFilter extends Filter
      */
     private List<byte[]> createCodeTable()
     {
-        List<byte[]> codeTable = new ArrayList<byte[]>(4096);
+        List<byte[]> codeTable = new ArrayList<>(4096);
         for (int i = 0; i < 256; ++i)
         {
             codeTable.add(new byte[] { (byte) (i & 0xFF) });

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/io/RandomAccessBuffer.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/io/RandomAccessBuffer.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/io/RandomAccessBuffer.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/io/RandomAccessBuffer.java Thu Apr 13 19:59:07 2017
@@ -60,7 +60,7 @@ public class RandomAccessBuffer implemen
     private RandomAccessBuffer(int definedChunkSize)
     {
         // starting with one chunk
-        bufferList = new ArrayList<byte[]>();
+        bufferList = new ArrayList<>();
         chunkSize = definedChunkSize;
         currentBuffer = new byte[chunkSize];
         bufferList.add(currentBuffer);
@@ -80,7 +80,7 @@ public class RandomAccessBuffer implemen
     {
         // this is a special case. The given byte array is used as the one
         // and only chunk.
-        bufferList = new ArrayList<byte[]>(1);
+        bufferList = new ArrayList<>(1);
         chunkSize = input.length;
         currentBuffer = input;
         bufferList.add(currentBuffer);
@@ -114,7 +114,7 @@ public class RandomAccessBuffer implemen
     {
         RandomAccessBuffer copy = new RandomAccessBuffer(chunkSize);
 
-        copy.bufferList = new ArrayList<byte[]>(bufferList.size());
+        copy.bufferList = new ArrayList<>(bufferList.size());
         for (byte [] buffer : bufferList)
         {
             byte [] newBuffer = new byte [buffer.length];

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/LayerUtility.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/LayerUtility.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/LayerUtility.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/LayerUtility.java Thu Apr 13 19:59:07 2017
@@ -134,7 +134,7 @@ public class LayerUtility
         return importPageAsForm(sourceDoc, page);
     }
 
-    private static final Set<String> PAGE_TO_FORM_FILTER = new java.util.HashSet<String>(
+    private static final Set<String> PAGE_TO_FORM_FILTER = new java.util.HashSet<>(
             Arrays.asList(new String[] {"Group", "LastModified", "Metadata"}));
 
     /**

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/Overlay.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/Overlay.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/Overlay.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/Overlay.java Thu Apr 13 19:59:07 2017
@@ -60,8 +60,8 @@ public class Overlay
     private LayoutPage oddPageOverlayPage;
     private LayoutPage evenPageOverlayPage;
 
-    private final Map<Integer, PDDocument> specificPageOverlay = new HashMap<Integer, PDDocument>();
-    private Map<Integer, LayoutPage> specificPageOverlayPage = new HashMap<Integer, LayoutPage>();
+    private final Map<Integer, PDDocument> specificPageOverlay = new HashMap<>();
+    private Map<Integer, LayoutPage> specificPageOverlayPage = new HashMap<>();
 
     private Position position = Position.BACKGROUND;
 
@@ -258,7 +258,7 @@ public class Overlay
     private Map<Integer,LayoutPage> getLayoutPages(PDDocument doc) throws IOException
     {
         int numberOfPages = doc.getNumberOfPages();
-        Map<Integer,LayoutPage> layoutPages = new HashMap<Integer, Overlay.LayoutPage>(numberOfPages);
+        Map<Integer,LayoutPage> layoutPages = new HashMap<>(numberOfPages);
         for (int i=0;i<numberOfPages;i++)
         {
             PDPage page = doc.getPage(i);
@@ -297,7 +297,7 @@ public class Overlay
 
     private List<COSStream> createContentStreamList(COSBase contents) throws IOException
     {
-        List<COSStream> contentStreams = new ArrayList<COSStream>();
+        List<COSStream> contentStreams = new ArrayList<>();
         if (contents instanceof COSStream)
         {
             contentStreams.add((COSStream) contents);

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFCloneUtility.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFCloneUtility.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFCloneUtility.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFCloneUtility.java Thu Apr 13 19:59:07 2017
@@ -40,7 +40,7 @@ public class PDFCloneUtility
 {
 
     private final PDDocument destination;
-    private final Map<Object,COSBase> clonedVersion = new HashMap<Object,COSBase>();
+    private final Map<Object,COSBase> clonedVersion = new HashMap<>();
 
     /**
      * Creates a new instance for the given target document.

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFMergerUtility.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFMergerUtility.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFMergerUtility.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFMergerUtility.java Thu Apr 13 19:59:07 2017
@@ -80,8 +80,8 @@ public class PDFMergerUtility
      */
     public PDFMergerUtility()
     {
-        sources = new ArrayList<InputStream>();
-        fileInputStreams = new ArrayList<FileInputStream>();
+        sources = new ArrayList<>();
+        fileInputStreams = new ArrayList<>();
     }
 
     /**
@@ -243,7 +243,7 @@ public class PDFMergerUtility
         PDDocument source;
         if (sources != null && sources.size() > 0)
         {
-            List<PDDocument> tobeclosed = new ArrayList<PDDocument>();
+            List<PDDocument> tobeclosed = new ArrayList<>();
 
             try
             {
@@ -555,7 +555,7 @@ public class PDFMergerUtility
             }
         }
 
-        Map<COSDictionary, COSDictionary> objMapping = new HashMap<COSDictionary, COSDictionary>();
+        Map<COSDictionary, COSDictionary> objMapping = new HashMap<>();
         for (PDPage page : srcCatalog.getPages())
         {
             PDPage newPage = new PDPage((COSDictionary) cloner.cloneForNewDocument(page.getCOSObject()));
@@ -801,7 +801,7 @@ public class PDFMergerUtility
     {
         page.setStructParents(page.getStructParents() + structParentOffset);
         List<PDAnnotation> annots = page.getAnnotations();
-        List<PDAnnotation> newannots = new ArrayList<PDAnnotation>();
+        List<PDAnnotation> newannots = new ArrayList<>();
         for (PDAnnotation annot : annots)
         {
             annot.setStructParent(annot.getStructParent() + structParentOffset);

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/Splitter.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/Splitter.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/Splitter.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/Splitter.java Thu Apr 13 19:59:07 2017
@@ -58,7 +58,7 @@ public class Splitter
      */
     public List<PDDocument> split(PDDocument document) throws IOException
     {
-        destinationDocuments = new ArrayList<PDDocument>();
+        destinationDocuments = new ArrayList<>();
         sourceDocument = document;
         processPages();
         return destinationDocuments;

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java Thu Apr 13 19:59:07 2017
@@ -529,12 +529,12 @@ public class COSParser extends BaseParse
     protected void parseDictObjects(COSDictionary dict, COSName... excludeObjects) throws IOException
     {
         // ---- create queue for objects waiting for further parsing
-        final Queue<COSBase> toBeParsedList = new LinkedList<COSBase>();
+        final Queue<COSBase> toBeParsedList = new LinkedList<>();
         // offset ordered object map
-        final TreeMap<Long, List<COSObject>> objToBeParsed = new TreeMap<Long, List<COSObject>>();
+        final TreeMap<Long, List<COSObject>> objToBeParsed = new TreeMap<>();
         // in case of compressed objects offset points to stmObj
-        final Set<Long> parsedObjects = new HashSet<Long>();
-        final Set<Long> addedObjects = new HashSet<Long>();
+        final Set<Long> parsedObjects = new HashSet<>();
+        final Set<Long> addedObjects = new HashSet<>();
 
         addExcludedToList(excludeObjects, dict, parsedObjects);
         addNewToList(toBeParsedList, dict.getValues(), addedObjects);
@@ -592,7 +592,7 @@ public class COSParser extends BaseParse
                                 List<COSObject> stmObjects = objToBeParsed.get(fileOffset);
                                 if (stmObjects == null)
                                 {
-                                    stmObjects = new ArrayList<COSObject>();
+                                    stmObjects = new ArrayList<>();
                                     objToBeParsed.put(fileOffset, stmObjects);
                                 }
                                 stmObjects.add(obj);
@@ -1288,7 +1288,7 @@ public class COSParser extends BaseParse
                 bfSearchForObjects();
                 if (bfSearchCOSObjectKeyOffsets != null && !bfSearchCOSObjectKeyOffsets.isEmpty())
                 {
-                    List<COSObjectKey> objStreams = new ArrayList<COSObjectKey>();
+                    List<COSObjectKey> objStreams = new ArrayList<>();
                     // find all object streams
                     for (COSObjectKey key : xrefOffset.keySet())
                     {
@@ -1404,7 +1404,7 @@ public class COSParser extends BaseParse
         if (bfSearchCOSObjectKeyOffsets == null)
         {
             bfSearchForLastEOFMarker();
-            bfSearchCOSObjectKeyOffsets = new HashMap<COSObjectKey, Long>();
+            bfSearchCOSObjectKeyOffsets = new HashMap<>();
             long originOffset = source.getPosition();
             long currentOffset = MINIMUM_SEARCH_OFFSET;
             String objString = " obj";
@@ -1588,7 +1588,7 @@ public class COSParser extends BaseParse
         if (bfSearchXRefTablesOffsets == null)
         {
             // a pdf may contain more than one xref entry
-            bfSearchXRefTablesOffsets = new Vector<Long>();
+            bfSearchXRefTablesOffsets = new Vector<>();
             long originOffset = source.getPosition();
             source.seek(MINIMUM_SEARCH_OFFSET);
             // search for xref tables
@@ -1621,7 +1621,7 @@ public class COSParser extends BaseParse
         if (bfSearchXRefStreamsOffsets == null)
         {
             // a pdf may contain more than one /XRef entry
-            bfSearchXRefStreamsOffsets = new Vector<Long>();
+            bfSearchXRefStreamsOffsets = new Vector<>();
             long originOffset = source.getPosition();
             source.seek(MINIMUM_SEARCH_OFFSET);
             // search for XRef streams

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFObjectStreamParser.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFObjectStreamParser.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFObjectStreamParser.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFObjectStreamParser.java Thu Apr 13 19:59:07 2017
@@ -69,8 +69,8 @@ public class PDFObjectStreamParser exten
         {
             //need to first parse the header.
             int numberOfObjects = stream.getInt( "N" );
-            List<Long> objectNumbers = new ArrayList<Long>( numberOfObjects );
-            streamObjects = new ArrayList<COSObject>( numberOfObjects );
+            List<Long> objectNumbers = new ArrayList<>( numberOfObjects );
+            streamObjects = new ArrayList<>( numberOfObjects );
             for( int i=0; i<numberOfObjects; i++ )
             {
                 long objectNumber = readObjectNumber();

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFStreamParser.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFStreamParser.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFStreamParser.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFStreamParser.java Thu Apr 13 19:59:07 2017
@@ -48,7 +48,7 @@ public class PDFStreamParser extends Bas
      */
     private static final Log LOG = LogFactory.getLog(PDFStreamParser.class);
 
-    private final List<Object> streamObjects = new ArrayList<Object>( 100 );
+    private final List<Object> streamObjects = new ArrayList<>( 100 );
     
     private static final int MAX_BIN_CHAR_TEST_LENGTH = 10;
     private final byte[] binCharTestArr = new byte[MAX_BIN_CHAR_TEST_LENGTH];

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFXrefStreamParser.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFXrefStreamParser.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFXrefStreamParser.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFXrefStreamParser.java Thu Apr 13 19:59:07 2017
@@ -83,7 +83,7 @@ public class PDFXrefStreamParser extends
             indexArray.add(stream.getDictionaryObject(COSName.SIZE));
         }
 
-        List<Long> objNums = new ArrayList<Long>();
+        List<Long> objNums = new ArrayList<>();
 
         /*
          * Populates objNums with all object numbers available

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/DefaultResourceCache.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/DefaultResourceCache.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/DefaultResourceCache.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/DefaultResourceCache.java Thu Apr 13 19:59:07 2017
@@ -39,25 +39,25 @@ import org.apache.pdfbox.pdmodel.graphic
 public class DefaultResourceCache implements ResourceCache
 {
     private final Map<COSObject, SoftReference<PDFont>> fonts =
-            new HashMap<COSObject, SoftReference<PDFont>>();
+            new HashMap<>();
     
     private final Map<COSObject, SoftReference<PDColorSpace>> colorSpaces =
-            new HashMap<COSObject, SoftReference<PDColorSpace>>();
+            new HashMap<>();
 
     private final Map<COSObject, SoftReference<PDXObject>> xobjects =
-            new HashMap<COSObject, SoftReference<PDXObject>>();
+            new HashMap<>();
 
     private final Map<COSObject, SoftReference<PDExtendedGraphicsState>> extGStates =
-            new HashMap<COSObject, SoftReference<PDExtendedGraphicsState>>();
+            new HashMap<>();
 
     private final Map<COSObject, SoftReference<PDShading>> shadings =
-            new HashMap<COSObject, SoftReference<PDShading>>();
+            new HashMap<>();
 
     private final Map<COSObject, SoftReference<PDAbstractPattern>> patterns =
-            new HashMap<COSObject, SoftReference<PDAbstractPattern>>();
+            new HashMap<>();
 
     private final Map<COSObject, SoftReference<PDPropertyList>> properties =
-            new HashMap<COSObject, SoftReference<PDPropertyList>>();
+            new HashMap<>();
 
     @Override
     public PDFont getFont(COSObject indirect) throws IOException
@@ -73,7 +73,7 @@ public class DefaultResourceCache implem
     @Override
     public void put(COSObject indirect, PDFont font) throws IOException
     {
-        fonts.put(indirect, new SoftReference<PDFont>(font));
+        fonts.put(indirect, new SoftReference<>(font));
     }
 
     @Override
@@ -90,7 +90,7 @@ public class DefaultResourceCache implem
     @Override
     public void put(COSObject indirect, PDColorSpace colorSpace) throws IOException
     {
-        colorSpaces.put(indirect, new SoftReference<PDColorSpace>(colorSpace));
+        colorSpaces.put(indirect, new SoftReference<>(colorSpace));
     }
 
     @Override
@@ -107,7 +107,7 @@ public class DefaultResourceCache implem
     @Override
     public void put(COSObject indirect, PDExtendedGraphicsState extGState)
     {
-        extGStates.put(indirect, new SoftReference<PDExtendedGraphicsState>(extGState));
+        extGStates.put(indirect, new SoftReference<>(extGState));
     }
 
     @Override
@@ -124,7 +124,7 @@ public class DefaultResourceCache implem
     @Override
     public void put(COSObject indirect, PDShading shading) throws IOException
     {
-        shadings.put(indirect, new SoftReference<PDShading>(shading));
+        shadings.put(indirect, new SoftReference<>(shading));
     }
 
     @Override
@@ -141,7 +141,7 @@ public class DefaultResourceCache implem
     @Override
     public void put(COSObject indirect, PDAbstractPattern pattern) throws IOException
     {
-        patterns.put(indirect, new SoftReference<PDAbstractPattern>(pattern));
+        patterns.put(indirect, new SoftReference<>(pattern));
     }
     
     @Override
@@ -158,7 +158,7 @@ public class DefaultResourceCache implem
     @Override
     public void put(COSObject indirect, PDPropertyList propertyList)
     {
-        properties.put(indirect, new SoftReference<PDPropertyList>(propertyList));
+        properties.put(indirect, new SoftReference<>(propertyList));
     }
 
     @Override
@@ -175,6 +175,6 @@ public class DefaultResourceCache implem
     @Override
     public void put(COSObject indirect, PDXObject xobject) throws IOException
     {
-        xobjects.put(indirect, new SoftReference<PDXObject>(xobject));
+        xobjects.put(indirect, new SoftReference<>(xobject));
     }
 }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocumentCatalog.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocumentCatalog.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocumentCatalog.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocumentCatalog.java Thu Apr 13 19:59:07 2017
@@ -181,12 +181,12 @@ public class PDDocumentCatalog implement
             array = new COSArray();
             root.setItem(COSName.THREADS, array);
         }
-        List<PDThread> pdObjects = new ArrayList<PDThread>();
+        List<PDThread> pdObjects = new ArrayList<>();
         for (int i = 0; i < array.size(); i++)
         {
             pdObjects.add(new PDThread((COSDictionary)array.getObject(i)));
         }
-        return new COSArrayList<PDThread>(pdObjects, array);
+        return new COSArrayList<>(pdObjects, array);
     }
 
     /**
@@ -379,7 +379,7 @@ public class PDDocumentCatalog implement
      */
     public List<PDOutputIntent> getOutputIntents()
     {
-        List<PDOutputIntent> retval = new ArrayList<PDOutputIntent>();
+        List<PDOutputIntent> retval = new ArrayList<>();
         COSArray array = (COSArray)root.getDictionaryObject(COSName.OUTPUT_INTENTS);
         if (array != null)
         {

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocumentInformation.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocumentInformation.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocumentInformation.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocumentInformation.java Thu Apr 13 19:59:07 2017
@@ -261,7 +261,7 @@ public class PDDocumentInformation imple
      */
     public Set<String> getMetadataKeys()
     {
-        Set<String> keys = new TreeSet<String>();
+        Set<String> keys = new TreeSet<>();
         for (COSName key : info.keySet())
         {
             keys.add(key.getName());

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPage.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPage.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPage.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPage.java Thu Apr 13 19:59:07 2017
@@ -121,7 +121,7 @@ public class PDPage implements COSObject
      */
     public Iterator<PDStream> getContentStreams()
     {
-        List<PDStream> streams = new ArrayList<PDStream>();
+        List<PDStream> streams = new ArrayList<>();
         COSBase base = page.getDictionaryObject(COSName.CONTENTS);
         if (base instanceof COSStream)
         {
@@ -151,7 +151,7 @@ public class PDPage implements COSObject
         {
             COSArray streams = (COSArray)base;
             byte[] delimiter = new byte[] { '\n' };
-            List<InputStream> inputStreams = new ArrayList<InputStream>();
+            List<InputStream> inputStreams = new ArrayList<>();
             for (int i = 0; i < streams.size(); i++)
             {
                 COSBase strm = streams.getObject(i);
@@ -531,7 +531,7 @@ public class PDPage implements COSObject
         {
             beads = new COSArray();
         }
-        List<PDThreadBead> pdObjects = new ArrayList<PDThreadBead>();
+        List<PDThreadBead> pdObjects = new ArrayList<>();
         for (int i = 0; i < beads.size(); i++)
         {
             COSDictionary beadDic = (COSDictionary) beads.getObject(i);
@@ -543,7 +543,7 @@ public class PDPage implements COSObject
             }
             pdObjects.add(bead);
         }
-        return new COSArrayList<PDThreadBead>(pdObjects, beads);
+        return new COSArrayList<>(pdObjects, beads);
     }
 
     /**
@@ -653,11 +653,11 @@ public class PDPage implements COSObject
         COSArray annots = (COSArray) page.getDictionaryObject(COSName.ANNOTS);
         if (annots == null)
         {
-            return new COSArrayList<PDAnnotation>(page, COSName.ANNOTS);
+            return new COSArrayList<>(page, COSName.ANNOTS);
         }
         else
         {
-            List<PDAnnotation> actuals = new ArrayList<PDAnnotation>();
+            List<PDAnnotation> actuals = new ArrayList<>();
             for (int i = 0; i < annots.size(); i++)
             {
                 COSBase item = annots.getObject(i);
@@ -667,7 +667,7 @@ public class PDPage implements COSObject
                 }
                 actuals.add(PDAnnotation.createAnnotation(item));
             }
-            retval = new COSArrayList<PDAnnotation>(actuals, annots);
+            retval = new COSArrayList<>(actuals, annots);
         }
         return retval;
     }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageContentStream.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageContentStream.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageContentStream.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageContentStream.java Thu Apr 13 19:59:07 2017
@@ -86,10 +86,10 @@ public final class PDPageContentStream e
 
     private final PDDocument document;
 
-    private final Stack<PDFont> fontStack = new Stack<PDFont>();
+    private final Stack<PDFont> fontStack = new Stack<>();
 
-    private final Stack<PDColorSpace> nonStrokingColorSpaceStack = new Stack<PDColorSpace>();
-    private final Stack<PDColorSpace> strokingColorSpaceStack = new Stack<PDColorSpace>();
+    private final Stack<PDColorSpace> nonStrokingColorSpaceStack = new Stack<>();
+    private final Stack<PDColorSpace> strokingColorSpaceStack = new Stack<>();
 
     /**
      * Create a new PDPage content stream.

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageTree.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageTree.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageTree.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageTree.java Thu Apr 13 19:59:07 2017
@@ -130,7 +130,7 @@ public class PDPageTree implements COSOb
      */
     private List<COSDictionary> getKids(COSDictionary node)
     {
-        List<COSDictionary> result = new ArrayList<COSDictionary>();
+        List<COSDictionary> result = new ArrayList<>();
 
         COSArray kids = (COSArray)node.getDictionaryObject(COSName.KIDS);
         if (kids == null)
@@ -152,7 +152,7 @@ public class PDPageTree implements COSOb
      */
     private final class PageIterator implements Iterator<PDPage>
     {
-        private final Queue<COSDictionary> queue = new ArrayDeque<COSDictionary>();
+        private final Queue<COSDictionary> queue = new ArrayDeque<>();
 
         private PageIterator(COSDictionary node)
         {

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDResources.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDResources.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDResources.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDResources.java Thu Apr 13 19:59:07 2017
@@ -55,7 +55,7 @@ public final class PDResources implement
     // PDFBOX-3442 cache fonts that are not indirect objects, as these aren't cached in ResourceCache
     // and this would result in huge memory footprint in text extraction
     private final Map <COSName,SoftReference<PDFont>> directFontCache = 
-            new HashMap<COSName, SoftReference<PDFont>>();
+            new HashMap<>();
 
     /**
      * Constructor for embedding.
@@ -149,7 +149,7 @@ public final class PDResources implement
         }
         else if (indirect == null)
         {
-            directFontCache.put(name, new SoftReference<PDFont>(font));
+            directFontCache.put(name, new SoftReference<>(font));
         }
         return font;
     }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/COSArrayList.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/COSArrayList.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/COSArrayList.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/COSArrayList.java Thu Apr 13 19:59:07 2017
@@ -52,7 +52,7 @@ public class COSArrayList<E> implements
     public COSArrayList()
     {
         array = new COSArray();
-        actual = new ArrayList<E>();
+        actual = new ArrayList<>();
     }
 
     /**
@@ -78,7 +78,7 @@ public class COSArrayList<E> implements
     public COSArrayList(COSDictionary dictionary, COSName dictionaryKey)
     {
         array = new COSArray();
-        actual = new ArrayList<E>();
+        actual = new ArrayList<>();
         parentDict = dictionary;
         dictKey = dictionaryKey;
     }
@@ -102,7 +102,7 @@ public class COSArrayList<E> implements
     {
         array = new COSArray();
         array.add( item );
-        actual = new ArrayList<E>();
+        actual = new ArrayList<>();
         actual.add( actualObject );
 
         parentDict = dictionary;
@@ -275,7 +275,7 @@ public class COSArrayList<E> implements
         List<Integer> retval = null;
         if (intArray != null)
         {
-            List<Integer> numbers = new ArrayList<Integer>();
+            List<Integer> numbers = new ArrayList<>();
             for (int i = 0; i < intArray.size(); i++)
             {
                 COSNumber num;
@@ -289,7 +289,7 @@ public class COSArrayList<E> implements
                 }
                 numbers.add(num.intValue());
             }
-            retval = new COSArrayList<Integer>(numbers, intArray);
+            retval = new COSArrayList<>(numbers, intArray);
         }
         return retval;
     }
@@ -307,7 +307,7 @@ public class COSArrayList<E> implements
         List<Float> retval = null;
         if( floatArray != null )
         {
-            List<Float> numbers = new ArrayList<Float>(floatArray.size());
+            List<Float> numbers = new ArrayList<>(floatArray.size());
             for( int i=0; i<floatArray.size(); i++ )
             {
                 COSBase base = floatArray.getObject(i);
@@ -320,7 +320,7 @@ public class COSArrayList<E> implements
                     numbers.add(null);
                 }
             }
-            retval = new COSArrayList<Float>( numbers, floatArray );
+            retval = new COSArrayList<>( numbers, floatArray );
         }
         return retval;
     }
@@ -338,12 +338,12 @@ public class COSArrayList<E> implements
         List<String> retval = null;
         if( nameArray != null )
         {
-            List<String>names = new ArrayList<String>();
+            List<String>names = new ArrayList<>();
             for( int i=0; i<nameArray.size(); i++ )
             {
                 names.add( ((COSName)nameArray.getObject( i )).getName() );
             }
-            retval = new COSArrayList<String>( names, nameArray );
+            retval = new COSArrayList<>( names, nameArray );
         }
         return retval;
     }
@@ -361,12 +361,12 @@ public class COSArrayList<E> implements
         List<String> retval = null;
         if( stringArray != null )
         {
-            List<String> string = new ArrayList<String>();
+            List<String> string = new ArrayList<>();
             for( int i=0; i<stringArray.size(); i++ )
             {
                 string.add( ((COSString)stringArray.getObject( i )).getString() );
             }
-            retval = new COSArrayList<String>( string, stringArray );
+            retval = new COSArrayList<>( string, stringArray );
         }
         return retval;
     }
@@ -465,7 +465,7 @@ public class COSArrayList<E> implements
 
     private List<COSBase> toCOSObjectList( Collection<?> list )
     {
-        List<COSBase> cosObjects = new ArrayList<COSBase>();
+        List<COSBase> cosObjects = new ArrayList<>();
         for (Object next : list)
         {
             if( next instanceof String )

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/COSDictionaryMap.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/COSDictionaryMap.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/COSDictionaryMap.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/COSDictionaryMap.java Thu Apr 13 19:59:07 2017
@@ -233,7 +233,7 @@ public class COSDictionaryMap<K,V> imple
         COSDictionaryMap<String, Object> retval = null;
         if( map != null )
         {
-            Map<String, Object> actualMap = new HashMap<String, Object>();
+            Map<String, Object> actualMap = new HashMap<>();
             for( COSName key : map.keySet() )
             {
                 COSBase cosObj = map.getDictionaryObject( key );
@@ -264,7 +264,7 @@ public class COSDictionaryMap<K,V> imple
                 }
                 actualMap.put( key.getName(), actualObject );
             }
-            retval = new COSDictionaryMap<String, Object>( actualMap, map );
+            retval = new COSDictionaryMap<>( actualMap, map );
         }
 
         return retval;

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDNameTreeNode.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDNameTreeNode.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDNameTreeNode.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDNameTreeNode.java Thu Apr 13 19:59:07 2017
@@ -115,12 +115,12 @@ public abstract class PDNameTreeNode<T e
         COSArray kids = (COSArray)node.getDictionaryObject( COSName.KIDS );
         if( kids != null )
         {
-            List<PDNameTreeNode<T>> pdObjects = new ArrayList<PDNameTreeNode<T>>();
+            List<PDNameTreeNode<T>> pdObjects = new ArrayList<>();
             for( int i=0; i<kids.size(); i++ )
             {
                 pdObjects.add( createChildNode( (COSDictionary)kids.getObject(i) ) );
             }
-            retval = new COSArrayList<PDNameTreeNode<T>>(pdObjects, kids);
+            retval = new COSArrayList<>(pdObjects, kids);
         }
 
         return retval;
@@ -256,7 +256,7 @@ public abstract class PDNameTreeNode<T e
         COSArray namesArray = (COSArray)node.getDictionaryObject( COSName.NAMES );
         if( namesArray != null )
         {
-            Map<String, T> names = new LinkedHashMap<String, T>();
+            Map<String, T> names = new LinkedHashMap<>();
             for( int i=0; i<namesArray.size(); i+=2 )
             {
                 COSString key = (COSString)namesArray.getObject(i);
@@ -307,7 +307,7 @@ public abstract class PDNameTreeNode<T e
         else
         {
             COSArray array = new COSArray();
-            List<String> keys = new ArrayList<String>(names.keySet());
+            List<String> keys = new ArrayList<>(names.keySet());
             Collections.sort(keys);
             for (String key : keys) 
             {

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDNumberTreeNode.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDNumberTreeNode.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDNumberTreeNode.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDNumberTreeNode.java Thu Apr 13 19:59:07 2017
@@ -91,12 +91,12 @@ public class PDNumberTreeNode implements
         COSArray kids = (COSArray)node.getDictionaryObject( COSName.KIDS );
         if( kids != null )
         {
-            List<PDNumberTreeNode> pdObjects = new ArrayList<PDNumberTreeNode>();
+            List<PDNumberTreeNode> pdObjects = new ArrayList<>();
             for( int i=0; i<kids.size(); i++ )
             {
                 pdObjects.add( createChildNode( (COSDictionary)kids.getObject(i) ) );
             }
-            retval = new COSArrayList<PDNumberTreeNode>(pdObjects,kids);
+            retval = new COSArrayList<>(pdObjects,kids);
         }
 
         return retval;
@@ -178,7 +178,7 @@ public class PDNumberTreeNode implements
         COSArray namesArray = (COSArray)node.getDictionaryObject( COSName.NUMS );
         if( namesArray != null )
         {
-            indices = new HashMap<Integer,COSObjectable>();
+            indices = new HashMap<>();
             for( int i=0; i<namesArray.size(); i+=2 )
             {
                 COSInteger key = (COSInteger)namesArray.getObject(i);
@@ -242,7 +242,7 @@ public class PDNumberTreeNode implements
         }
         else
         {
-            List<Integer> keys = new ArrayList<Integer>( numbers.keySet() );
+            List<Integer> keys = new ArrayList<>( numbers.keySet() );
             Collections.sort( keys );
             COSArray array = new COSArray();
             for (Integer key : keys)

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDPageLabels.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDPageLabels.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDPageLabels.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDPageLabels.java Thu Apr 13 19:59:07 2017
@@ -59,7 +59,7 @@ public class PDPageLabels implements COS
      */
     public PDPageLabels(PDDocument document)
     {
-        labels = new TreeMap<Integer, PDPageLabelRange>();
+        labels = new TreeMap<>();
         this.doc = document;
         PDPageLabelRange defaultRange = new PDPageLabelRange();
         defaultRange.setStyle(PDPageLabelRange.STYLE_DECIMAL);
@@ -203,7 +203,7 @@ public class PDPageLabels implements COS
     public Map<String, Integer> getPageIndicesByLabels()
     {
         final Map<String, Integer> labelMap = 
-            new HashMap<String, Integer>(doc.getNumberOfPages());
+            new HashMap<>(doc.getNumberOfPages());
         computeLabels(new LabelHandler()
         {
             @Override

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDStream.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDStream.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDStream.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDStream.java Thu Apr 13 19:59:07 2017
@@ -182,7 +182,7 @@ public class PDStream implements COSObje
             }
             else
             {
-                filters = new ArrayList<COSName>();
+                filters = new ArrayList<>();
                 filters.add(COSName.FLATE_DECODE);
                 setFilters(filters);
             }
@@ -308,7 +308,7 @@ public class PDStream implements COSObje
         if (filters instanceof COSName)
         {
             COSName name = (COSName) filters;
-            retval = new COSArrayList<COSName>(name, name, stream, COSName.FILTER);
+            retval = new COSArrayList<>(name, name, stream, COSName.FILTER);
         } 
         else if (filters instanceof COSArray)
         {
@@ -356,14 +356,14 @@ public class PDStream implements COSObje
         else if (dp instanceof COSArray)
         {
             COSArray array = (COSArray) dp;
-            List<Object> actuals = new ArrayList<Object>();
+            List<Object> actuals = new ArrayList<>();
             for (int i = 0; i < array.size(); i++)
             {
                 actuals.add(COSDictionaryMap
                         .convertBasicTypesToMap((COSDictionary) array
                                 .getObject(i)));
             }
-            retval = new COSArrayList<Object>(actuals, array);
+            retval = new COSArrayList<>(actuals, array);
         }
 
         return retval;
@@ -416,7 +416,7 @@ public class PDStream implements COSObje
         if (filters instanceof COSName)
         {
             COSName name = (COSName) filters;
-            retval = new COSArrayList<String>(name.getName(), name, stream,
+            retval = new COSArrayList<>(name.getName(), name, stream,
                     COSName.F_FILTER);
         } 
         else if (filters instanceof COSArray)
@@ -460,14 +460,14 @@ public class PDStream implements COSObje
         else if (dp instanceof COSArray)
         {
             COSArray array = (COSArray) dp;
-            List<Object> actuals = new ArrayList<Object>();
+            List<Object> actuals = new ArrayList<>();
             for (int i = 0; i < array.size(); i++)
             {
                 actuals.add(COSDictionaryMap
                         .convertBasicTypesToMap((COSDictionary) array
                                 .getObject(i)));
             }
-            retval = new COSArrayList<Object>(actuals, array);
+            retval = new COSArrayList<>(actuals, array);
         }
 
         return retval;

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/ExecutionContext.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/ExecutionContext.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/ExecutionContext.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/ExecutionContext.java Thu Apr 13 19:59:07 2017
@@ -26,7 +26,7 @@ public class ExecutionContext
 {
 
     private final Operators operators;
-    private final Stack<Object> stack = new Stack<Object>();
+    private final Stack<Object> stack = new Stack<>();
 
     /**
      * Creates a new execution context.

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/InstructionSequence.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/InstructionSequence.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/InstructionSequence.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/InstructionSequence.java Thu Apr 13 19:59:07 2017
@@ -26,7 +26,7 @@ import java.util.Stack;
 public class InstructionSequence
 {
 
-    private final List<Object> instructions = new java.util.ArrayList<Object>();
+    private final List<Object> instructions = new java.util.ArrayList<>();
 
     /**
      * Add a name (ex. an operator)

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/InstructionSequenceBuilder.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/InstructionSequenceBuilder.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/InstructionSequenceBuilder.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/InstructionSequenceBuilder.java Thu Apr 13 19:59:07 2017
@@ -28,7 +28,7 @@ public final class InstructionSequenceBu
 {
 
     private final InstructionSequence mainSequence = new InstructionSequence();
-    private final Stack<InstructionSequence> seqStack = new Stack<InstructionSequence>();
+    private final Stack<InstructionSequence> seqStack = new Stack<>();
 
     private InstructionSequenceBuilder()
     {

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/Operators.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/Operators.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/Operators.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/Operators.java Thu Apr 13 19:59:07 2017
@@ -74,7 +74,7 @@ public class Operators
     private static final Operator POP = new StackOperators.Pop();
     private static final Operator ROLL = new StackOperators.Roll();
 
-    private final Map<String, Operator> operators = new java.util.HashMap<String, Operator>();
+    private final Map<String, Operator> operators = new java.util.HashMap<>();
 
     /**
      * Creates a new Operators object with the default set of operators.

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/StackOperators.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/StackOperators.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/StackOperators.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/StackOperators.java Thu Apr 13 19:59:07 2017
@@ -39,7 +39,7 @@ class StackOperators
             {
                 int size = stack.size();
                 //Need to copy to a new list to avoid ConcurrentModificationException
-                List<Object> copy = new java.util.ArrayList<Object>(
+                List<Object> copy = new java.util.ArrayList<>(
                         stack.subList(size - n, size));
                 stack.addAll(copy);
             }
@@ -122,8 +122,8 @@ class StackOperators
                 throw new IllegalArgumentException("rangecheck: " + n);
             }
 
-            LinkedList<Object> rolled = new LinkedList<Object>();
-            LinkedList<Object> moved = new LinkedList<Object>();
+            LinkedList<Object> rolled = new LinkedList<>();
+            LinkedList<Object> moved = new LinkedList<>();
             if (j < 0)
             {
                 //negative roll

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDDefaultAttributeObject.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDDefaultAttributeObject.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDDefaultAttributeObject.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDDefaultAttributeObject.java Thu Apr 13 19:59:07 2017
@@ -58,7 +58,7 @@ public class PDDefaultAttributeObject ex
      */
     public List<String> getAttributeNames()
     {
-        List<String> attrNames = new ArrayList<String>();
+        List<String> attrNames = new ArrayList<>();
         for (Entry<COSName, COSBase> entry : this.getCOSObject().entrySet())
         {
             COSName key = entry.getKey();

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureElement.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureElement.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureElement.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureElement.java Thu Apr 13 19:59:07 2017
@@ -164,7 +164,7 @@ public class PDStructureElement extends
     public Revisions<PDAttributeObject> getAttributes()
     {
         Revisions<PDAttributeObject> attributes =
-            new Revisions<PDAttributeObject>();
+            new Revisions<>();
         COSBase a = this.getCOSObject().getDictionaryObject(COSName.A);
         if (a instanceof COSArray)
         {
@@ -331,7 +331,7 @@ public class PDStructureElement extends
     public Revisions<String> getClassNames()
     {
         COSName key = COSName.C;
-        Revisions<String> classNames = new Revisions<String>();
+        Revisions<String> classNames = new Revisions<>();
         COSBase c = this.getCOSObject().getDictionaryObject(key);
         if (c instanceof COSName)
         {

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureNode.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureNode.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureNode.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureNode.java Thu Apr 13 19:59:07 2017
@@ -106,7 +106,7 @@ public abstract class PDStructureNode im
      */
     public List<Object> getKids()
     {
-        List<Object> kidObjects = new ArrayList<Object>();
+        List<Object> kidObjects = new ArrayList<>();
         COSBase k = this.getCOSObject().getDictionaryObject(COSName.K);
         if (k instanceof COSArray)
         {

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureTreeRoot.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureTreeRoot.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureTreeRoot.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureTreeRoot.java Thu Apr 13 19:59:07 2017
@@ -202,7 +202,7 @@ public class PDStructureTreeRoot extends
                 LOG.error(e,e);
             }
         }
-        return new Hashtable<String, Object>();
+        return new Hashtable<>();
     }
 
     /**

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDUserAttributeObject.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDUserAttributeObject.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDUserAttributeObject.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDUserAttributeObject.java Thu Apr 13 19:59:07 2017
@@ -64,7 +64,7 @@ public class PDUserAttributeObject exten
     {
         COSArray p = (COSArray) this.getCOSObject()
             .getDictionaryObject(COSName.P);
-        List<PDUserProperty> properties = new ArrayList<PDUserProperty>(p.size());
+        List<PDUserProperty> properties = new ArrayList<>(p.size());
         for (int i = 0; i < p.size(); i++)
         {
             properties.add(

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/Revisions.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/Revisions.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/Revisions.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/Revisions.java Thu Apr 13 19:59:07 2017
@@ -34,7 +34,7 @@ public class Revisions<T>
     {
         if (this.objects == null)
         {
-            this.objects = new ArrayList<T>();
+            this.objects = new ArrayList<>();
         }
         return this.objects;
     }
@@ -43,7 +43,7 @@ public class Revisions<T>
     {
         if (this.revisionNumbers == null)
         {
-            this.revisionNumbers = new ArrayList<Integer>();
+            this.revisionNumbers = new ArrayList<>();
         }
         return this.revisionNumbers;
     }

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/markedcontent/PDMarkedContent.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/markedcontent/PDMarkedContent.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/markedcontent/PDMarkedContent.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/markedcontent/PDMarkedContent.java Thu Apr 13 19:59:07 2017
@@ -65,7 +65,7 @@ public class PDMarkedContent
     {
         this.tag = tag == null ? null : tag.getName();
         this.properties = properties;
-        this.contents = new ArrayList<Object>();
+        this.contents = new ArrayList<>();
     }
 
 

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/taggedpdf/StandardStructureTypes.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/taggedpdf/StandardStructureTypes.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/taggedpdf/StandardStructureTypes.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/documentinterchange/taggedpdf/StandardStructureTypes.java Thu Apr 13 19:59:07 2017
@@ -297,7 +297,7 @@ public class StandardStructureTypes
     /**
      * All standard structure types.
      */
-    public static List<String> types = new ArrayList<String>();
+    public static List<String> types = new ArrayList<>();
 
     static
     {

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/SecurityHandler.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/SecurityHandler.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/SecurityHandler.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/SecurityHandler.java Thu Apr 13 19:59:07 2017
@@ -83,7 +83,7 @@ public abstract class SecurityHandler
     /** indicates if the Metadata have to be decrypted of not. */
     private boolean decryptMetadata;
 
-    private final Set<COSBase> objects = new HashSet<COSBase>();
+    private final Set<COSBase> objects = new HashSet<>();
 
     private boolean useAES;
 

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFAnnotationInk.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFAnnotationInk.java?rev=1791301&r1=1791300&r2=1791301&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFAnnotationInk.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFAnnotationInk.java Thu Apr 13 19:59:07 2017
@@ -88,7 +88,7 @@ public class FDFAnnotationInk extends FD
             {
                 throw new IOException("Error: missing element 'gesture'");
             }
-            List<float[]> inklist = new ArrayList<float[]>();
+            List<float[]> inklist = new ArrayList<>();
             for (int i = 0; i < gestures.getLength(); i++)
             {
                 Node node = gestures.item(i);
@@ -143,7 +143,7 @@ public class FDFAnnotationInk extends FD
         COSArray array = (COSArray) annot.getDictionaryObject(COSName.INKLIST);
         if (array != null)
         {
-            List<float[]> retval = new ArrayList<float[]>();
+            List<float[]> retval = new ArrayList<>();
             for (COSBase entry : array)
             {
                 retval.add(((COSArray) entry).toFloatArray());



Mime
View raw message