pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1603976 - /pdfbox/branches/1.8/preflight/src/main/java/org/apache/pdfbox/preflight/content/ContentStreamEngine.java
Date Thu, 19 Jun 2014 17:44:54 GMT
Author: tilman
Date: Thu Jun 19 17:44:54 2014
New Revision: 1603976

URL: http://svn.apache.org/r1603976
Log:
PDFBOX-2151: revert commit that doesn't belong

Modified:
    pdfbox/branches/1.8/preflight/src/main/java/org/apache/pdfbox/preflight/content/ContentStreamEngine.java

Modified: pdfbox/branches/1.8/preflight/src/main/java/org/apache/pdfbox/preflight/content/ContentStreamEngine.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/preflight/src/main/java/org/apache/pdfbox/preflight/content/ContentStreamEngine.java?rev=1603976&r1=1603975&r2=1603976&view=diff
==============================================================================
--- pdfbox/branches/1.8/preflight/src/main/java/org/apache/pdfbox/preflight/content/ContentStreamEngine.java
(original)
+++ pdfbox/branches/1.8/preflight/src/main/java/org/apache/pdfbox/preflight/content/ContentStreamEngine.java
Thu Jun 19 17:44:54 2014
@@ -216,7 +216,6 @@ public abstract class ContentStreamEngin
         registerOperatorProcessor("sh", stubOp);
     }
 
-    @Override
     public final void registerOperatorProcessor(String operator, OperatorProcessor op)
     {
         super.registerOperatorProcessor(operator, op);
@@ -324,19 +323,17 @@ public abstract class ContentStreamEngin
                 }
                 catch (IllegalArgumentException e)
                 {
-                    // The color space is unknown. Try to access the resources dictionary,
-                    // the color space can be a reference.
-                    Map<String, PDColorSpace> colorSpaces = this.getResources().getColorSpaces();
-                    if (colorSpaces != null)
+                    /*
+                     * The color space is unknown. Try to access the resources dictionary,
the color space can be a
+                     * reference.
+                     */
+                    PDColorSpace pdCS = (PDColorSpace) this.getColorSpaces().get(colorSpace);
+                    if (pdCS != null)
                     {
-                        PDColorSpace pdCS = colorSpaces.get(colorSpace);
-                        if (pdCS != null)
-                        {
-                            cs = ColorSpaces.valueOf(pdCS.getName());
-                            PreflightConfiguration cfg = context.getConfig();
-                            ColorSpaceHelperFactory csFact = cfg.getColorSpaceHelperFact();
-                            csHelper = csFact.getColorSpaceHelper(context, pdCS, ColorSpaceRestriction.ONLY_DEVICE);
-                        }
+                        cs = ColorSpaces.valueOf(pdCS.getName());
+                        PreflightConfiguration cfg = context.getConfig();
+                        ColorSpaceHelperFactory csFact = cfg.getColorSpaceHelperFact();
+                        csHelper = csFact.getColorSpaceHelper(context, pdCS, ColorSpaceRestriction.ONLY_DEVICE);
                     }
                 }
 



Mime
View raw message