pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1863090 - /pdfbox/branches/issue4569/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
Date Mon, 15 Jul 2019 16:28:22 GMT
Author: tilman
Date: Mon Jul 15 16:28:22 2019
New Revision: 1863090

URL: http://svn.apache.org/viewvc?rev=1863090&view=rev
Log:
PDFBOX-4071: SonarQube fix

Modified:
    pdfbox/branches/issue4569/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java

Modified: pdfbox/branches/issue4569/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java?rev=1863090&r1=1863089&r2=1863090&view=diff
==============================================================================
--- pdfbox/branches/issue4569/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
(original)
+++ pdfbox/branches/issue4569/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
Mon Jul 15 16:28:22 2019
@@ -43,13 +43,14 @@ import java.awt.image.DataBufferByte;
 import java.awt.image.Raster;
 import java.awt.image.WritableRaster;
 import java.io.IOException;
+import java.util.ArrayDeque;
 import java.util.ArrayList;
+import java.util.Deque;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import java.util.Stack;
 import java.util.StringTokenizer;
 
 import org.apache.commons.logging.Log;
@@ -146,7 +147,7 @@ public class PageDrawer extends PDFGraph
 
     private final TilingPaintFactory tilingPaintFactory = new TilingPaintFactory(this);
     
-    private final Stack<TransparencyGroup> transparencyGroupStack = new Stack<>();
+    private final Deque<TransparencyGroup> transparencyGroupStack = new ArrayDeque<>();
 
     // if greater zero the content is hidden and wil not be rendered
     private int nestedHiddenOCGCount;
@@ -438,7 +439,7 @@ public class PageDrawer extends PDFGraph
         at.concatenate(font.getFontMatrix().createAffineTransform());
 
         // create cache if it does not exist
-        PDVectorFont vectorFont = ((PDVectorFont)font);
+        PDVectorFont vectorFont = (PDVectorFont) font;
         GlyphCache cache = glyphCaches.get(font);
         if (cache == null)
         {
@@ -854,6 +855,9 @@ public class PageDrawer extends PDFGraph
 
                 case PathIterator.SEG_CLOSE:
                     break;
+
+                default:
+                    break;
             }
             iter.next();
         }



Mime
View raw message