Bug 53248 - [PATCH] fop test.fo -print throws exception
Summary: [PATCH] fop test.fo -print throws exception
Status: CLOSED FIXED
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: general (show other bugs)
Version: trunk
Hardware: All All
: P2 minor
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-16 23:33 UTC by Luis Bernardo
Modified: 2012-05-20 14:33 UTC (History)
0 users



Attachments
patch file (2.63 KB, application/octet-stream)
2012-05-16 23:33 UTC, Luis Bernardo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luis Bernardo 2012-05-16 23:33:00 UTC
Created attachment 28795 [details]
patch file

The command "fop xslfo.fo -print" throws the exception:

C:\>fop xslfo.fo -print
May 16, 2012 10:32:37 PM org.apache.fop.cli.Main startFOP
SEVERE: Exception
java.lang.ArrayIndexOutOfBoundsException: 2
        at
org.apache.fop.cli.CommandLineOptions.parsePrintOutputOption(CommandL
ineOptions.java:559)
        at
org.apache.fop.cli.CommandLineOptions.parseOptions(CommandLineOptions
.java:325)
        at
org.apache.fop.cli.CommandLineOptions.parse(CommandLineOptions.java:1
62)
        at org.apache.fop.cli.Main.startFOP(Main.java:158)
        at org.apache.fop.cli.Main.main(Main.java:205)

Note that the command is valid according to "fop -print help".

This minor patch fixes the issue and includes a simple unit test.
Comment 1 Glenn Adams 2012-05-17 01:23:37 UTC
applied at http://svn.apache.org/viewvc?rev=1339441&view=rev

thanks luis! please close after verification