aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2006-01-25 10:09:01 +0000
committerJeremias Maerki <jeremias@apache.org>2006-01-25 10:09:01 +0000
commit5bf86498b12319459fdfc24c47e6a4ef8731b046 (patch)
treef94cc35ccbdcb2d5a0181f0c714bbe6cf7603d8c
parent252c6c0648251301156920d6a1c861025c4a8a18 (diff)
downloadxmlgraphics-fop-5bf86498b12319459fdfc24c47e6a4ef8731b046.tar.gz
xmlgraphics-fop-5bf86498b12319459fdfc24c47e6a4ef8731b046.zip
Avoid NPE when a malformed command-line is specified.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@372180 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/java/org/apache/fop/cli/CommandLineOptions.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/cli/CommandLineOptions.java b/src/java/org/apache/fop/cli/CommandLineOptions.java
index cc52dea05..e955f7e8c 100644
--- a/src/java/org/apache/fop/cli/CommandLineOptions.java
+++ b/src/java/org/apache/fop/cli/CommandLineOptions.java
@@ -153,12 +153,12 @@ public class CommandLineOptions {
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(