opennlp-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörn Kottmann <kottm...@gmail.com>
Subject Re: svn commit: r1145566 - /incubator/opennlp/trunk/opennlp-tools/src/main/java/opennlp/tools/cmdline/sentdetect/SentenceDetectorEvaluatorTool.java
Date Tue, 12 Jul 2011 12:43:36 GMT
On 7/12/11 2:31 PM, colen@apache.org wrote:
> +    Charset encoding = params.getEncoding();
>
>       if (encoding == null) {
>         System.out.println(getHelp());
>         throw new TerminateToolException(1);
>       }

The case encoding == null will never happen, since
encoding is a mandatory parameter. So these three lines
should be removed.

The call to validateArguments will return false if the encoding
is not specified, and the call to ArgumentParser.parse will fail if
the Charset cannot be created, e.g invalid name, not support on platform.

Jörn


Mime
View raw message