pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jahew...@apache.org
Subject svn commit: r1636009 - /pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/graphic/StandardColorSpaceHelper.java
Date Sat, 01 Nov 2014 18:34:55 GMT
Author: jahewson
Date: Sat Nov  1 18:34:54 2014
New Revision: 1636009

URL: http://svn.apache.org/r1636009
Log:
PDFBOX-2403: Preflight - better color space error messages, thanks to Ralf Hauser

Modified:
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/graphic/StandardColorSpaceHelper.java

Modified: pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/graphic/StandardColorSpaceHelper.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/graphic/StandardColorSpaceHelper.java?rev=1636009&r1=1636008&r2=1636009&view=diff
==============================================================================
--- pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/graphic/StandardColorSpaceHelper.java
(original)
+++ pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/graphic/StandardColorSpaceHelper.java
Sat Nov  1 18:34:54 2014
@@ -269,7 +269,7 @@ public class StandardColorSpaceHelper im
         catch (IOException e)
         {
             context.addValidationError(new ValidationError(ERROR_GRAPHIC_INVALID_COLOR_SPACE,
-                    "Unable to read ICCBase color space. Caused by : " + e.getMessage(),
e));
+                    "Unable to read ICCBase color space. Caused by : " + e.getMessage()));
         }
     }
 
@@ -328,7 +328,7 @@ public class StandardColorSpaceHelper im
         catch (IOException e)
         {
             context.addValidationError(new ValidationError(ERROR_GRAPHIC_INVALID_COLOR_SPACE,
-                    "Unable to read DeviceN color space : " + e.getMessage(), e));
+                    "Unable to read DeviceN color space : " + e.getMessage()));
         }
     }
 
@@ -395,7 +395,7 @@ public class StandardColorSpaceHelper im
         catch (IOException e)
         {
             context.addValidationError(new ValidationError(ERROR_GRAPHIC_INVALID_COLOR_SPACE,
-                    "Unable to read Separation color space : " + e.getMessage(), e));
+                    "Unable to read Separation color space : " + e.getMessage()));
         }
     }
 
@@ -419,18 +419,15 @@ public class StandardColorSpaceHelper im
 
             try
             {
-                if (pdcs.getName().equals(ColorSpaces.DeviceCMYK.getLabel()) &&
-                    resources.hasColorSpace(COSName.DEFAULT_CMYK))
+                if (pdcs.getName().equals(ColorSpaces.DeviceCMYK.getLabel()))
                 {
                     defaultCS = resources.getColorSpace(COSName.DEFAULT_CMYK);
                 }
-                else if (pdcs.getName().equals(ColorSpaces.DeviceRGB.getLabel()) &&
-                         resources.hasColorSpace(COSName.DEFAULT_RGB))
+                else if (pdcs.getName().equals(ColorSpaces.DeviceRGB.getLabel()))
                 {
                     defaultCS = resources.getColorSpace(COSName.DEFAULT_RGB);
                 }
-                else if (pdcs.getName().equals(ColorSpaces.DeviceGray.getLabel()) &&
-                         resources.hasColorSpace(COSName.DEFAULT_GRAY))
+                else if (pdcs.getName().equals(ColorSpaces.DeviceGray.getLabel()))
                 {
                     defaultCS = resources.getColorSpace(COSName.DEFAULT_GRAY);
                 }
@@ -438,7 +435,7 @@ public class StandardColorSpaceHelper im
             catch (IOException e)
             {
                 context.addValidationError(new ValidationError(ERROR_GRAPHIC_INVALID_COLOR_SPACE,
-                        "Unable to read default color space : " + e.getMessage(), e));
+                        "Unable to read default color space : " + e.getMessage()));
             }
 
             if (defaultCS != null)



Mime
View raw message