xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerem...@apache.org
Subject svn commit: r372180 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/CommandLineOptions.java
Date Wed, 25 Jan 2006 10:09:07 GMT
Author: jeremias
Date: Wed Jan 25 02:09:01 2006
New Revision: 372180

URL: http://svn.apache.org/viewcvs?rev=372180&view=rev
Log:
Avoid NPE when a malformed command-line is specified.

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/CommandLineOptions.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/CommandLineOptions.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/CommandLineOptions.java?rev=372180&r1=372179&r2=372180&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/CommandLineOptions.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/CommandLineOptions.java Wed Jan 25 02:09:01
2006
@@ -153,12 +153,12 @@
 
         inputHandler = createInputHandler();
 
-        if (outputmode.equals(MimeConstants.MIME_FOP_AWT_PREVIEW)) {
+        if (MimeConstants.MIME_FOP_AWT_PREVIEW.equals(outputmode)) {
             AWTRenderer renderer = new AWTRenderer();
             renderer.setRenderable(inputHandler); //set before user agent!
             renderer.setUserAgent(foUserAgent);
             foUserAgent.setRendererOverride(renderer);
-        } else if (outputmode.equals(MimeConstants.MIME_FOP_AREA_TREE)
+        } else if (MimeConstants.MIME_FOP_AREA_TREE.equals(outputmode)
                && mimicRenderer != null) {
             // render from FO to Intermediate Format
             Renderer targetRenderer = foUserAgent.getRendererFactory().createRenderer(



---------------------------------------------------------------------
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