pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1768861 - /pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/content/PreflightStreamEngine.java
Date Wed, 09 Nov 2016 07:53:29 GMT
Author: tilman
Date: Wed Nov  9 07:53:29 2016
New Revision: 1768861

URL: http://svn.apache.org/viewvc?rev=1768861&view=rev
Log:
PDFBOX-2852: add missing type arguments + remove unneeded code

Modified:
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/content/PreflightStreamEngine.java

Modified: pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/content/PreflightStreamEngine.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/content/PreflightStreamEngine.java?rev=1768861&r1=1768860&r2=1768861&view=diff
==============================================================================
--- pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/content/PreflightStreamEngine.java
(original)
+++ pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/content/PreflightStreamEngine.java
Wed Nov  9 07:53:29 2016
@@ -222,7 +222,7 @@ public abstract class PreflightStreamEng
      * @throws ContentStreamException
      *             ERROR_GRAPHIC_UNEXPECTED_VALUE_FOR_KEY if the operand is invalid
      */
-    protected void validateRenderingIntent(Operator operator, List<?> arguments) throws
ContentStreamException
+    protected void validateRenderingIntent(Operator operator, List<COSBase> arguments)
throws ContentStreamException
     {
         if ("ri".equals(operator.getName()))
         {
@@ -231,10 +231,6 @@ public abstract class PreflightStreamEng
             {
                 riArgument0 = ((COSName) arguments.get(0)).getName();
             }
-            else if (arguments.get(0) instanceof String)
-            {
-                riArgument0 = (String) arguments.get(0);
-            }
 
             if (!RenderingIntents.contains(riArgument0))
             {
@@ -518,7 +514,7 @@ public abstract class PreflightStreamEng
      * @param arguments
      * @throws IOException
      */
-    protected void checkSetColorSpaceOperators(Operator operator, List<?> arguments)
throws IOException
+    protected void checkSetColorSpaceOperators(Operator operator, List<COSBase> arguments)
throws IOException
     {
         if (!("CS".equals(operator.getName()) || "cs".equals(operator.getName())))
         {
@@ -526,11 +522,7 @@ public abstract class PreflightStreamEng
         }
 
         String colorSpaceName;
-        if (arguments.get(0) instanceof String)
-        {
-            colorSpaceName = (String) arguments.get(0);
-        }
-        else if (arguments.get(0) instanceof COSString)
+        if (arguments.get(0) instanceof COSString)
         {
             colorSpaceName = (arguments.get(0)).toString();
         }



Mime
View raw message