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 2015/03/01 13:16:49 UTC
svn commit: r1663089 - in
/pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation:
LineAnnotationValidator.java SquareCircleAnnotationValidator.java
Author: tilman
Date: Sun Mar 1 12:16:49 2015
New Revision: 1663089
URL: http://svn.apache.org/r1663089
Log:
PDFBOX-2576: combine if statements
Modified:
pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/LineAnnotationValidator.java
pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/SquareCircleAnnotationValidator.java
Modified: pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/LineAnnotationValidator.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/LineAnnotationValidator.java?rev=1663089&r1=1663088&r2=1663089&view=diff
==============================================================================
--- pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/LineAnnotationValidator.java (original)
+++ pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/LineAnnotationValidator.java Sun Mar 1 12:16:49 2015
@@ -68,14 +68,11 @@ public class LineAnnotationValidator ext
*/
protected boolean checkIColors() throws ValidationException
{
- if (this.pdLine.getInteriorColor() != null)
+ if (this.pdLine.getInteriorColor() != null && !searchRGBProfile())
{
- if (!searchRGBProfile())
- {
- ctx.addValidationError(new ValidationError(ERROR_ANNOT_FORBIDDEN_COLOR,
- "Annotation uses a Color profile which isn't the same than the profile contained by the OutputIntent"));
- return false;
- }
+ ctx.addValidationError(new ValidationError(ERROR_ANNOT_FORBIDDEN_COLOR,
+ "Annotation uses a Color profile which isn't the same than the profile contained by the OutputIntent"));
+ return false;
}
return true;
}
Modified: pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/SquareCircleAnnotationValidator.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/SquareCircleAnnotationValidator.java?rev=1663089&r1=1663088&r2=1663089&view=diff
==============================================================================
--- pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/SquareCircleAnnotationValidator.java (original)
+++ pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/annotation/SquareCircleAnnotationValidator.java Sun Mar 1 12:16:49 2015
@@ -68,14 +68,11 @@ public class SquareCircleAnnotationValid
*/
protected boolean checkIColors() throws ValidationException
{
- if (this.pdSquareCircle.getInteriorColor() != null)
+ if (this.pdSquareCircle.getInteriorColor() != null && !searchRGBProfile())
{
- if (!searchRGBProfile())
- {
- ctx.addValidationError(new ValidationError(ERROR_ANNOT_FORBIDDEN_COLOR,
- "Annotation uses a Color profile which isn't the same than the profile contained by the OutputIntent"));
- return false;
- }
+ ctx.addValidationError(new ValidationError(ERROR_ANNOT_FORBIDDEN_COLOR,
+ "Annotation uses a Color profile which isn't the same than the profile contained by the OutputIntent"));
+ return false;
}
return true;
}