[daisy] daisy backuptool arguments
Andreas Deininger
adeininger at googlemail.com
Mon Oct 29 08:30:36 CST 2007
2007/10/29, Elvis Willems <ew at schaubroeck.be>:
> Hi,
>
> I wanted to use the daisy repository backup tool today, and noticed that
> it does not give the appropriate error message when one of the arguments
> "-r", "-b" or "-l" is missing.
> Instead you will get the not so elegant message:
>
> /java.lang.NullPointerException
> at java.io.File.<init>(File.java:222)
> at org.outerj.daisy.backupTool.BackupTool.main(BackupTool.java:69)/
>
> A quick source code check revealed why...
> At lines 64 and 65 of
> "/applications/backuptool/src/java/org/outerj/daisy/backupTool/BackupTool.java/"
> you will find :
>
> /} else if (!cmd.hasOption('l') && !(cmd.hasOption('b') ||
> cmd.hasOption('r'))) {
> System.out.println("The -l and -b or -r options are required.");
> /
> However, the tool needs to have the arguments 'l' and 'b' or 'r'.
> In this case, the correct syntax would be:
>
> /} else if (!cmd.hasOption('l') || !(cmd.hasOption('b') &&
> cmd.hasOption('r'))) {
> System.out.println("The -l and -b or -r options are required.");
> /
> Also, maybe the information concerning the usage of this tool could be
> more clear about this...
You may vote for another JIRA issue: :-)
http://issues.cocoondev.org/browse/DSY-470
and maybe add a comment linking to your previous post (or even better,
attach a patch for that issue ;-)).
Regards
Andreas
More information about the daisy
mailing list