Hi Shannon,

  That can easily be addressed in the same JIRA ticket/patch, and yes,
checking for null and then returning 0 is fine.

  -jake

On Tue, Jun 1, 2010 at 5:16 PM, Shannon Quinn <[email protected]> wrote:

> Hi all,
>
> I'm putting the finishing touches on a new JIRA ticket to handle this issue
> I brought up previously (i.e. I'm getting all the patch files together that
> I can for every -h error I find), and I came across another issue:
>
> When I run "mahout transpose -h", there's a NullPointerException that's
> thrown, because in the run() method of TransposeJob there isn't any check
> to
> see if the Map<String, String> that is returned from AbstractJob's
> parseArguments() method is null (i.e. an OptionError occurred - as a result
> of, say, giving a "-h" flag) and Integer.parseInt() is subsequently called
> on a null object.
>
> Two things:
> 1) I'm not sure what the Mahout protocol for handling this would be; before
> parseArguments() returns null, it prints out the help information, so it
> seems to me that nothing further needs to be done except for stopping
> execution before the call to Integer.parseInt() is made and the
> NullPointerException is thrown. Should I just return 0 from the run()
> method?
>
> 2) Should I make this a different ticket? Or include it with "-h causes
> problems"?
>
> Thanks! Sorry for the naive questions.
>
> Regards,
> Shannon
>

Reply via email to