You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2018/07/24 17:03:03 UTC

svn commit: r1836572 - /pdfbox/branches/1.8/preflight/src/main/java/org/apache/pdfbox/preflight/process/reflect/ExtGStateValidationProcess.java

Author: tilman
Date: Tue Jul 24 17:03:02 2018
New Revision: 1836572

URL: http://svn.apache.org/viewvc?rev=1836572&view=rev
Log:
PDFBOX-4276: handle all ExtGState names, not just those with gs and number

Modified:
    pdfbox/branches/1.8/preflight/src/main/java/org/apache/pdfbox/preflight/process/reflect/ExtGStateValidationProcess.java

Modified: pdfbox/branches/1.8/preflight/src/main/java/org/apache/pdfbox/preflight/process/reflect/ExtGStateValidationProcess.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/preflight/src/main/java/org/apache/pdfbox/preflight/process/reflect/ExtGStateValidationProcess.java?rev=1836572&r1=1836571&r2=1836572&view=diff
==============================================================================
--- pdfbox/branches/1.8/preflight/src/main/java/org/apache/pdfbox/preflight/process/reflect/ExtGStateValidationProcess.java (original)
+++ pdfbox/branches/1.8/preflight/src/main/java/org/apache/pdfbox/preflight/process/reflect/ExtGStateValidationProcess.java Tue Jul 24 17:03:02 2018
@@ -92,20 +92,17 @@ public class ExtGStateValidationProcess
             for (Object object : extGStates.keySet())
             {
                 COSName key = (COSName) object;
-                if (key.getName().matches(TRANPARENCY_DICTIONARY_KEY_EXTGSTATE_ENTRY_REGEX))
+                COSBase gsBase = extGStates.getItem(key);
+                COSDictionary gsDict = COSUtils.getAsDictionary(gsBase, cosDocument);
+                if (gsDict == null)
                 {
-                    COSBase gsBase = extGStates.getItem(key);
-                    COSDictionary gsDict = COSUtils.getAsDictionary(gsBase, cosDocument);
-                    if (gsDict == null)
-                    {
-                        throw new ValidationException("The Extended Graphics State dictionary is invalid");
-                    }
-                    listOfExtGState.add(gsDict);
+                    throw new ValidationException("The Extended Graphics State dictionary is invalid");
                 }
+                listOfExtGState.add(gsDict);
             }
         }
         return listOfExtGState;
-            }
+    }
 
     /**
      * Validate all ExtGState dictionaries of this container