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 2014/12/02 08:45:10 UTC
svn commit: r1642810 -
/pdfbox/branches/1.8/preflight/src/main/java/org/apache/pdfbox/preflight/parser/PreflightParser.java
Author: tilman
Date: Tue Dec 2 07:45:10 2014
New Revision: 1642810
URL: http://svn.apache.org/r1642810
Log:
PDFBOX-2533: DRY refactoring of decryption code that is used in PreflightParser and in NonSequentialParser
Modified:
pdfbox/branches/1.8/preflight/src/main/java/org/apache/pdfbox/preflight/parser/PreflightParser.java
Modified: pdfbox/branches/1.8/preflight/src/main/java/org/apache/pdfbox/preflight/parser/PreflightParser.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/preflight/src/main/java/org/apache/pdfbox/preflight/parser/PreflightParser.java?rev=1642810&r1=1642809&r2=1642810&view=diff
==============================================================================
--- pdfbox/branches/1.8/preflight/src/main/java/org/apache/pdfbox/preflight/parser/PreflightParser.java (original)
+++ pdfbox/branches/1.8/preflight/src/main/java/org/apache/pdfbox/preflight/parser/PreflightParser.java Tue Dec 2 07:45:10 2014
@@ -794,26 +794,7 @@ public class PreflightParser extends Non
}
else if (securityHandler != null)
{
- // decrypt
- if (pb instanceof COSString)
- {
- decryptString((COSString) pb, objNr, objGenNr);
- }
- else if (pb instanceof COSDictionary)
- {
- decryptDictionary((COSDictionary) pb, objNr, objGenNr);
- }
- else if (pb instanceof COSArray)
- {
- final COSArray array = (COSArray) pb;
- for (int aIdx = 0, len = array.size(); aIdx < len; aIdx++)
- {
- if (array.get(aIdx) instanceof COSString)
- {
- decryptString((COSString) array.get(aIdx), objNr, objGenNr);
- }
- }
- }
+ decrypt(pb, objNr, objGenNr);
}
pdfObject.setObject(pb);