pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1612363 - /pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/util/operator/GRestore.java
Date Mon, 21 Jul 2014 18:01:33 GMT
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.");
+        }
     }
 }



Mime
View raw message