xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerem...@apache.org
Subject svn commit: r649283 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRenderer.java
Date Thu, 17 Apr 2008 21:25:02 GMT
Author: jeremias
Date: Thu Apr 17 14:25:02 2008
New Revision: 649283

URL: http://svn.apache.org/viewvc?rev=649283&view=rev
Log:
Throw a useful exception when the user agent isn't set on the renderer. This has been a problem
for more than one person setting up their own renderer using FOUserAgent.setRendererOverride().

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRenderer.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRenderer.java?rev=649283&r1=649282&r2=649283&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRenderer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRenderer.java Thu Apr 17
14:25:02 2008
@@ -124,12 +124,19 @@
 
     /** {@inheritDoc} */
     public FOUserAgent getUserAgent() {
+        if (userAgent == null) {
+            throw new IllegalStateException("FOUserAgent has not been set on Renderer");
+        }
         return userAgent;
     }
 
     /** {@inheritDoc} */
     public void startRenderer(OutputStream outputStream)
-        throws IOException { }
+            throws IOException {
+        if (userAgent == null) {
+            throw new IllegalStateException("FOUserAgent has not been set on Renderer");
+        }
+    }
 
     /** {@inheritDoc} */
     public void stopRenderer()



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org


Mime
View raw message