pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1601286 - /pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/TrailerValidationProcess.java
Date Mon, 09 Jun 2014 00:25:03 GMT
Author: tilman
Date: Mon Jun  9 00:25:03 2014
New Revision: 1601286

URL: http://svn.apache.org/r1601286
Log:
PDFBOX-1600: exception is not thrown in no-args constructor

Modified:
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/TrailerValidationProcess.java

Modified: pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/TrailerValidationProcess.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/TrailerValidationProcess.java?rev=1601286&r1=1601285&r2=1601286&view=diff
==============================================================================
--- pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/TrailerValidationProcess.java
(original)
+++ pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/TrailerValidationProcess.java
Mon Jun  9 00:25:03 2014
@@ -105,27 +105,14 @@ public class TrailerValidationProcess ex
         else
         {
             COSDictionary last = ctx.getXrefTableResolver().getLastTrailer();
-            COSDocument cosDoc = null;
-            try
+            COSDocument cosDoc = new COSDocument();
+            checkMainTrailer(ctx, first);
+            if (!compareIds(first, last, cosDoc))
             {
-                cosDoc = new COSDocument();
-                checkMainTrailer(ctx, first);
-                if (!compareIds(first, last, cosDoc))
-                {
-                    addValidationError(ctx, new ValidationError(PreflightConstants.ERROR_SYNTAX_TRAILER_ID_CONSISTENCY,
-                            "ID is different in the first and the last trailer"));
-                }
-
-            }
-            catch (IOException e)
-            {
-                addValidationError(ctx, new ValidationError(PreflightConstants.ERROR_SYNTAX_TRAILER,
-                        "Unable to parse trailers of the linearized PDF"));
-            }
-            finally
-            {
-                COSUtils.closeDocumentQuietly(cosDoc);
+                addValidationError(ctx, new ValidationError(PreflightConstants.ERROR_SYNTAX_TRAILER_ID_CONSISTENCY,
+                        "ID is different in the first and the last trailer"));
             }
+            COSUtils.closeDocumentQuietly(cosDoc);
         }
     }
 



Mime
View raw message