You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Michael Klink (JIRA)" <ji...@apache.org> on 2018/06/13 07:42:00 UTC

[jira] [Commented] (PDFBOX-2602) Enhance command line tools

    [ https://issues.apache.org/jira/browse/PDFBOX-2602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16510731#comment-16510731 ] 

Michael Klink commented on PDFBOX-2602:
---------------------------------------

In the course of commit 1826088 a simple error slipped in:

{code:title=org.apache.pdfbox.tools.Decrypt}
    private void parseCommandLine(String[] args)
    {
        Options options = defineOptions();
        CommandLine commandLine = parseArguments(options, args);
        
        this.alias = commandLine.getOptionValue(ALIAS);
        this.password = commandLine.getOptionValue(ALIAS, "");
        this.keyStore = commandLine.getOptionValue(KEYSTORE);
{code}

The line setting {{this.password}} surely should have been

{code}
        this.password = commandLine.getOptionValue(PASSWORD, "");
{code}


> Enhance command line tools
> --------------------------
>
>                 Key: PDFBOX-2602
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2602
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 1.8.8, 2.0.0
>            Reporter: Maruan Sahyoun
>            Priority: Minor
>             Fix For: 3.0.0 PDFBox
>
>
> The command line tools shall be enhanced to have the same behavior across all tools.
> From the discussion on the dev mailing list
> - add an -h option to print the usage
> - print the usage to System.err and use an exit code of 1 if there was an invalid command line parameter
> - print messages on exceptions to System.err
> - rethrow the exception so java can handle it if it will terminate afterwards anyway
> - use an exit code of 1if rethrowing doesn't make sense



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org