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 2014/07/21 20:01:33 UTC
svn commit: r1612363 -
/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/util/operator/GRestore.java
Author: tilman
Date: Mon Jul 21 18:01:33 2014
New Revision: 1612363
URL: http://svn.apache.org/r1612363
Log:
PDFBOX-2214: graphics stack must have at least one element because of peek() in PDFStreamEngine
Modified:
pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/util/operator/GRestore.java
Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/util/operator/GRestore.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/util/operator/GRestore.java?rev=1612363&r1=1612362&r2=1612363&view=diff
==============================================================================
--- pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/util/operator/GRestore.java (original)
+++ pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/util/operator/GRestore.java Mon Jul 21 18:01:33 2014
@@ -43,15 +43,15 @@ public class GRestore extends OperatorPr
*/
public void process(PDFOperator operator, List<COSBase> arguments)
{
- if (context.getGraphicsStack().size() > 0)
- {
- context.setGraphicsState( (PDGraphicsState)context.getGraphicsStack().pop() );
- }
- else
- {
+ if (context.getGraphicsStack().size() > 0)
+ {
+ context.setGraphicsState((PDGraphicsState) context.getGraphicsStack().pop());
+ }
+ else
+ {
// this shouldn't happen but it does, see PDFBOX-161
- // TODO make this self healing mechanism optional for preflight??
- LOG.debug("GRestore: no graphics state left to be restored.");
- }
+ // TODO make this self healing mechanism optional for preflight??
+ LOG.error("GRestore: no graphics state left to be restored.");
+ }
}
}