aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGlenn Adams <gadams@apache.org>2012-05-22 18:26:15 +0000
committerGlenn Adams <gadams@apache.org>2012-05-22 18:26:15 +0000
commit3f7239142b1221de3b7b2ce7f5ca32ce03f67a14 (patch)
treeb4964f3cd4e510cce961eec0c8ce3a1110cbf5d8 /src
parent4510618429e54b83d09e13d872269bc449b703d2 (diff)
downloadxmlgraphics-fop-3f7239142b1221de3b7b2ce7f5ca32ce03f67a14.tar.gz
xmlgraphics-fop-3f7239142b1221de3b7b2ce7f5ca32ce03f67a14.zip
Bugzilla #52144: Fix crash on use of version switch (-v). Submitted by Luis Bernardo.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1341585 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/java/org/apache/fop/cli/CommandLineOptions.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/cli/CommandLineOptions.java b/src/java/org/apache/fop/cli/CommandLineOptions.java
index 08c4cfb68..7d5752d6d 100644
--- a/src/java/org/apache/fop/cli/CommandLineOptions.java
+++ b/src/java/org/apache/fop/cli/CommandLineOptions.java
@@ -357,8 +357,11 @@ public class CommandLineOptions {
} else if (args[i].equals("-a")) {
this.renderingOptions.put(Accessibility.ACCESSIBILITY, Boolean.TRUE);
} else if (args[i].equals("-v")) {
- /* Currently just print the version */
+ /* verbose mode although users may expect version; currently just print the version */
printVersion();
+ if (args.length == 1) {
+ return false;
+ }
} else if (args[i].equals("-param")) {
if (i + 2 < args.length) {
String name = args[++i];