pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1641076 - /pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/reflect/FontValidationProcess.java
Date Sat, 22 Nov 2014 14:47:53 GMT
Author: tilman
Date: Sat Nov 22 14:47:53 2014
New Revision: 1641076

URL: http://svn.apache.org/r1641076
Log:
PDFBOX-1864: code cleanup

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

Modified: pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/reflect/FontValidationProcess.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/reflect/FontValidationProcess.java?rev=1641076&r1=1641075&r2=1641076&view=diff
==============================================================================
--- pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/reflect/FontValidationProcess.java
(original)
+++ pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/reflect/FontValidationProcess.java
Sat Nov 22 14:47:53 2014
@@ -34,7 +34,6 @@ import static org.apache.pdfbox.prefligh
 import org.apache.pdfbox.pdmodel.font.PDFont;
 import org.apache.pdfbox.pdmodel.font.PDSimpleFont;
 import org.apache.pdfbox.pdmodel.font.PDTrueTypeFont;
-import org.apache.pdfbox.pdmodel.font.PDType1Font;
 import org.apache.pdfbox.pdmodel.font.PDType3Font;
 import org.apache.pdfbox.preflight.PreflightConstants;
 import org.apache.pdfbox.preflight.PreflightContext;
@@ -53,13 +52,15 @@ import org.apache.pdfbox.preflight.Valid
 public class FontValidationProcess extends AbstractProcess
 {
 
+    @Override
     public void validate(PreflightContext context) throws ValidationException
     {
         PreflightPath vPath = context.getValidationPath();
-        if (vPath.isEmpty()) {
+        if (vPath.isEmpty()) 
+        {
             return;
         }
-        else if (!vPath.isExpectedType(PDFont.class)) 
+        if (!vPath.isExpectedType(PDFont.class)) 
         {
             context.addValidationError(new ValidationError(PreflightConstants.ERROR_FONTS_INVALID_DATA,
"Font validation process needs at least one PDFont object"));
         } 



Mime
View raw message