]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Bugzilla#53563: Removed a method call that could cause a java.awt.HeadlessException...
authorMehdi Houshmand <mehdi@apache.org>
Wed, 18 Jul 2012 09:12:10 +0000 (09:12 +0000)
committerMehdi Houshmand <mehdi@apache.org>
Wed, 18 Jul 2012 09:12:10 +0000 (09:12 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1362823 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/render/pcl/PCLGraphics2D.java
status.xml

index 3fc9881100771c14c839aa01e83baaf1b1546707..0fbf86c2cae82f608b1c3fb9a8636759b3515fe0 100644 (file)
@@ -25,7 +25,6 @@ import java.awt.Dimension;
 import java.awt.Graphics;
 import java.awt.Graphics2D;
 import java.awt.GraphicsConfiguration;
-import java.awt.GraphicsEnvironment;
 import java.awt.Image;
 import java.awt.Paint;
 import java.awt.Shape;
@@ -44,6 +43,7 @@ import java.text.AttributedCharacterIterator;
 
 import org.apache.xmlgraphics.java2d.AbstractGraphics2D;
 import org.apache.xmlgraphics.java2d.GraphicContext;
+import org.apache.xmlgraphics.java2d.GraphicsConfigurationWithTransparency;
 import org.apache.xmlgraphics.util.UnitConv;
 
 /**
@@ -127,8 +127,7 @@ public class PCLGraphics2D extends AbstractGraphics2D {
 
     /** {@inheritDoc} */
     public GraphicsConfiguration getDeviceConfiguration() {
-        return GraphicsEnvironment.getLocalGraphicsEnvironment()
-                .getDefaultScreenDevice().getDefaultConfiguration();
+        return new GraphicsConfigurationWithTransparency();
     }
 
     /**
index 05b8694d2761993c60d859869bd454e6d1cc87e7..c5448e477d5fc54d59a5aae427ad51b7d7d26eb5 100644 (file)
       documents. Example: the fix of marks layering will be such a case when it's done.
     -->
     <release version="FOP Trunk" date="TBD">
+      <action context="Renderers" dev="MH" type="add" fixes-bug="53563" importance="low">
+        Removed a method call to the java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice()
+        that could (in a headless environment) throw a java.awt.HeadlessException
+      </action>
       <action context="Renderers" dev="VH" type="add" importance="high">
         When PDF accessibility is enabled, treat repeated table headings as artifacts. This allows 
         screen readers to read the header only once at the beginning of the table and the footer